You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@allura.apache.org by Deshani Geethika <de...@gmail.com> on 2018/05/01 16:45:15 UTC

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Hi all,

During last few days, I spent time on reading the Allura documentation and
on getting familiarized with Allura codebase.

Then, I have started to work on the ticket - #1699 Fix incoming email for
wiki pages with space in the title
<https://forge-allura.apache.org/p/allura/tickets/1699/>. According to my
understanding, it is required to replace the spaces in the title with null
string (or with some character). Therefore, the getter method for
email_address which is in Page.class in ForgeWiki/forgewiki/model/wiki.py
should be changed as below.


@property
def email_address(self):
       if context.app.config.options.get('AllowEmailPosting', True):
               domain = self.email_domain
    * self.title.replace(‘ ‘,’’) // Added line*
               return '%s@%s%s' % (self.title.replace('/', '.'), domain,
config.common_suffix)
       else:
               return tg_config.get('forgemail.return_path')

Could you tell me whether, do I need to modify any method other than the
above one?


Regards!

On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
deshanigeethika@gmail.com> wrote:

> Hi Dave,
>
> Thanks for the detailed explanation. I will start working on this and come
> back to you with my progress
>
> Regards!
>
> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <da...@brondsema.net>
> wrote:
>
>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
>> > Hi Dave,
>> >
>> > As per GSoC official time-line, from 23rd April to 14th May period is
>> > considered as "Community Bonding Period".
>> >
>> > During this period I would like to finalize my design and separate my
>> > project into several tickets. Also, I would like to get more
>> familiarized
>> > with Allura code-base and Allura team.
>> >
>> > Could you guide me what would be the best way to start off with.
>> >
>> > Regards!
>> >
>>
>> Sounds like good goals for the community bonding period.
>>
>> I've added you as a developer on our self-hosted Allura project
>> https://forge-allura.apache.org/p/allura/ which means you can assign
>> tickets to
>> yourself, make new ones, update existing ones, etc.  I'd recommend having
>> many
>> small incremental tickets (perhaps even smaller pieces of work than you
>> outlined
>> in the project proposal), so that its easy to manage them and review
>> them.  And
>> of course you don't need to make them all right away :)
>>
>> To familiarize yourself with Allura, you can read more of the
>> documentation -
>> assuming you haven't read it all already ;)
>> https://forge-allura.apache.org/docs/
>>
>> And working on Allura code itself is best.  Find an existing ticket or
>> anything
>> you notice that could be made better, and make a fix for it.  A really
>> easy one
>> that I could suggest is https://forge-allura.apache.or
>> g/p/allura/tickets/1699/
>>
>> I've also noticed that our test suite has failed the past few times:
>> https://builds.apache.org/blue/organizations/jenkins/Allura/activity  It
>> probably is related to the "Make debug pages and post permalinks work
>> correctly
>> when behind a proxy" commit.  You could take a look at fixing that if you
>> want.
>> Otherwise I will soon.
>>
>> Lastly, reviewing other people's work is a good way to get familiar with
>> the
>> code and best practices.  I will have a fix for
>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming soon, so
>> watch out
>> for that.  You won't be able to merge my branch to master, but it can be
>> a good
>> way for you to learn from others.  And any constructive feedback would be
>> welcome too, of course.
>>
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
>
>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
Nice - with this merged it seems like a good spot to do a release of Allura.  I
will get that started soon, probably tomorrow.

On 9/18/18 3:14 AM, Deshani Geethika wrote:
> Thanks a lot. I've changed the entry point name into "activity" and added a
> merge request (
> https://forge-allura.apache.org/p/allura/git/merge-requests/282/)
> 
> On Tue, Sep 18, 2018 at 3:18 AM Dave Brondsema <da...@brondsema.net> wrote:
> 
>> I added some logging to SectionsUtil.load_sections to see what it was
>> getting
>> from the config, and other variables.  Looks like the problem is that the
>> section name (entry point name) is "followers" so that needs to be used.
>>
>>
>> On 9/16/18 2:37 PM, Deshani Geethika wrote:
>>> Hi Dave,
>>>
>>> To move up the activity section in dashboard and profile I've modified
>> the
>>> development.ini file. For the user profile, the section order was there
>> but
>>> commented, so that I've uncommented the line. For the dashboard section
>>> order, I've added a similar line, but it doesn't work. (activity section
>> is
>>> not moving up) Do you have any idea about this?
>>> I have committed my changes to the repo. (
>>>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/1955539543430eb71e56a995307135d258247b74/
>>> )
>>>
>>> Regards!
>>>
>>> On Thu, Aug 30, 2018 at 1:27 AM Dave Brondsema <da...@brondsema.net>
>> wrote:
>>>
>>>> Hi!
>>>>
>>>> I've merged that merge request, it looks good.  I think the title text
>> is
>>>> ok.
>>>> The layout of the logo runs into the main gray content though.  It'd be
>>>> nice if
>>>> it had a bit of space like it does on the user profile page, for
>> example.
>>>> I see
>>>> on the user profile page there is an empty <h2 class="project_summary">
>>>> that
>>>> helps push it down.
>>>>
>>>> Another thing that could be polished is the placement of the Activity
>> box
>>>> in the
>>>> right column.  On both the dashboard and the profile pages it is part
>> way
>>>> down
>>>> the column, and I think it'd be better at the top of the column.  That
>>>> might be
>>>> fixable by CSS rules, but also by the ordering of the widgets.  If it is
>>>> the
>>>> first widget then when it floats to the right its ok at the top of the
>>>> column.
>>>> So either by code, or .ini config file you could make it first in the
>>>> profile_sections.order and personal_dashboard_sections.order
>>>>
>>>> On 8/29/18 6:44 AM, Deshani Geethika wrote:
>>>>> Hi Dave,
>>>>>
>>>>> Sorry for the delays. I've done some fixes on dashboard styles and
>> added
>>>> a
>>>>> merge request (
>>>>> https://forge-allura.apache.org/p/allura/git/merge-requests/271/)
>>>>> Please review it and let me know if any improvements required.
>>>>>
>>>>> Also, for the dashboard title, currently it is shown as *username /
>>>>> Dashboard *(eg: Admin1 / Dashboard). Is it alright? Otherwise, do you
>>>> have
>>>>> a better idea for the dashboard title?
>>>>>
>>>>> Regards!
>>>>>
>>>>> On Fri, Jul 27, 2018 at 9:17 PM Deshani Geethika <
>>>> deshanigeethika@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thanks a lot. Will try these and let you know
>>>>>>
>>>>>> On Fri, Jul 27, 2018 at 8:52 PM Dave Brondsema <da...@brondsema.net>
>>>> wrote:
>>>>>>
>>>>>>> Sure, here's some thoughts:
>>>>>>>
>>>>>>> Inheriting from TestGitRepo means it gets all the test_* functions,
>> so
>>>>>>> when I
>>>>>>> ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we
>>>>>>> don't want
>>>>>>> to happen.  So I'd remove that inheritance.  You probably will have
>> to
>>>>>>> duplicate
>>>>>>> the setup_with_tools() function in this file then.
>>>>>>>
>>>>>>> Actually, inheriting from _TestCase in
>>>>>>> forgegit/tests/functional/test_controllers.py might be a good option.
>>>> It
>>>>>>> has
>>>>>>> some setup functions you can use (so you don't have to duplicate
>>>>>>> setup_with_tools) and it doesn't have any test_* functions.
>>>>>>>
>>>>>>> The super() call is supposed to use its own name, like
>>>>>>> super(TestMergeRequestsSection, self).setUp()  Not sure if that
>> makes a
>>>>>>> difference here or not.
>>>>>>>
>>>>>>> merge_request() is a function but you don't have parenthesis on `mr=
>>>>>>> self.merge_request` so that function isn't running.
>>>>>>>
>>>>>>> I realized what happened earlier when I didn't see the "Tickets"
>>>> section
>>>>>>> in the
>>>>>>> HTML output of the tickets test!  When I was trying this test now, I
>>>> got a
>>>>>>> similar situation where the "Merge Requests" section isn't in the
>> HTML
>>>>>>> output at
>>>>>>> all either.  So I looked in the 'test.log' file (where logging goes
>> to
>>>>>>> during
>>>>>>> tests) and saw "Error rendering section MergeRequestsSection: ..."
>> with
>>>>>>> error
>>>>>>> details.  So these sections trap errors and log them, instead of
>>>> letting
>>>>>>> the
>>>>>>> whole page error.  So looking at the test.log output can help see
>> those
>>>>>>> errors
>>>>>>> when they happen.
>>>>>>>
>>>>>>> You may need to run ThreadLocalODMSession.flush_all() after creating
>>>> the
>>>>>>> merge
>>>>>>> request object.  That is a common test pattern we have when tests
>>>> create
>>>>>>> something and then need to view it.  (Mainly needed in tests, since
>>>>>>> regular web
>>>>>>> pages will flush at the end of each request).
>>>>>>>
>>>>>>> Hope that helps, let me know how far you get, and I can look at it
>> some
>>>>>>> more if
>>>>>>> needed :)
>>>>>>>
>>>>>>> On 7/27/18 9:11 AM, Deshani Geethika wrote:
>>>>>>>> Hi Dave,
>>>>>>>>
>>>>>>>> I have started to write a test case for Merge Requests Section. For
>>>>>>> that I
>>>>>>>> have followed ForgeGit tests but it doesn't work for me. I was
>> trying
>>>> to
>>>>>>>> create a merge request and see whether it appears in dashboard.
>>>>>>>>
>>>>>>>> I've pushed the code into my fork
>>>>>>>> <
>>>>>>>
>>>>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/
>>>>>>>> .
>>>>>>>> Can you kindly take a look at that? Also, please let me know any
>>>>>>> debugging
>>>>>>>> process can be done for methods called internally when creating a
>>>> merge
>>>>>>>> request.
>>>>>>>>
>>>>>>>> Regards!
>>>>>>>>
>>>>>>>> On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <
>>>>>>> deshanigeethika@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Dave,
>>>>>>>>>
>>>>>>>>> Thank you for sharing these valuable information. I have added a
>>>> merge
>>>>>>>>> request <
>>>>>>> https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
>>>>>>>>> Please review it and let me know any further improvements.
>>>>>>>>>
>>>>>>>>> Regards!
>>>>>>>>>
>>>>>>>>> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <dave@brondsema.net
>>>
>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
>>>>>>>>>>> Hi Dave,
>>>>>>>>>>>
>>>>>>>>>>> I have tried with adding above lines, but still doesn't work. Can
>>>> you
>>>>>>>>>> take
>>>>>>>>>>> a look at my implementation
>>>>>>>>>>> <
>>>>>>>>>>
>>>>>>>
>>>>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
>>>>>>>>>>>
>>>>>>>>>>> ?
>>>>>>>>>>>
>>>>>>>>>>> Thanks!
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Here's some debugging process I did, you can try it too:
>>>>>>>>>>
>>>>>>>>>> Tests use the MockSOLR class instead of a real solr instance (so
>>>> that
>>>>>>> you
>>>>>>>>>> don't
>>>>>>>>>> need solr to run tests).  I knew that, so I started by going to
>>>>>>>>>> MockSOLR.search() and putting in some print statements to debug
>> it.
>>>>>>> At
>>>>>>>>>> the
>>>>>>>>>> beginning of search() I added:
>>>>>>>>>>
>>>>>>>>>>         print q
>>>>>>>>>>         print fq
>>>>>>>>>>
>>>>>>>>>> And inside the "for obj in self.db.values():" loop, I added "print
>>>>>>> obj"
>>>>>>>>>>
>>>>>>>>>> My idea was to see what query is happening and what the stored
>>>> objects
>>>>>>>>>> are, and
>>>>>>>>>> see what's not working.  I ran just the single test with
>> `nosetests
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>
>>>>
>> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
>>>>>>>>>> I noticed there was a 'project_id_s' in the search query, and
>> there
>>>>>>>>>> shouldn't
>>>>>>>>>> be.  But after a bit of trial & error to see what was happening, I
>>>>>>>>>> realized that
>>>>>>>>>> was coming from a "update_bin_count" background task, and that
>>>> wasn't
>>>>>>>>>> related to
>>>>>>>>>> the test really.
>>>>>>>>>>
>>>>>>>>>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all
>> the
>>>>>>>>>> background
>>>>>>>>>> tasks for now and did it again, and there wasn't any of my print
>>>>>>>>>> statements
>>>>>>>>>> occurring.  So the dashboard ticket search wasn't even happening
>> it
>>>>>>> seems.
>>>>>>>>>>
>>>>>>>>>> Then I printed the "response.html" variable to look at the whole
>>>>>>>>>> dashboard page
>>>>>>>>>> and I didn't see the Tickets section in it at all.  So indeed,
>> that
>>>>>>>>>> section
>>>>>>>>>> isn't included in this test at all for some reason.
>>>>>>>>>>
>>>>>>>>>> Hopefully those are some helpful examples for this particular
>>>>>>> situation
>>>>>>>>>> and also
>>>>>>>>>> ideas for how to debug high level (like "is it even running?") and
>>>> low
>>>>>>>>>> level (to
>>>>>>>>>> see where things might be not working).
>>>>>>>>>>
>>>>>>>>>> Next step of course is to figure out why in this test the
>> dashboard
>>>>>>>>>> section
>>>>>>>>>> isn't even running.  I'll let you work on that.  My general
>> strategy
>>>>>>> is
>>>>>>>>>> to put
>>>>>>>>>> debugging in various places to confirm if things are running with
>>>> the
>>>>>>>>>> right
>>>>>>>>>> values, or where they aren't, and narrow down to the spot where it
>>>>>>> goes
>>>>>>>>>> wrong.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>>>>> http://www.brondsema.net : personal
>>>>>>>>>> http://www.splike.com : programming
>>>>>>>>>>               <><
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> *Deshani Geethika*
>>>>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>> http://www.brondsema.net : personal
>>>>>>> http://www.splike.com : programming
>>>>>>>               <><
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Deshani Geethika*
>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dave Brondsema : dave@brondsema.net
>>>> http://www.brondsema.net : personal
>>>> http://www.splike.com : programming
>>>>               <><
>>>>
>>>
>>>
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
> 
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Thanks a lot. I've changed the entry point name into "activity" and added a
merge request (
https://forge-allura.apache.org/p/allura/git/merge-requests/282/)

On Tue, Sep 18, 2018 at 3:18 AM Dave Brondsema <da...@brondsema.net> wrote:

> I added some logging to SectionsUtil.load_sections to see what it was
> getting
> from the config, and other variables.  Looks like the problem is that the
> section name (entry point name) is "followers" so that needs to be used.
>
>
> On 9/16/18 2:37 PM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > To move up the activity section in dashboard and profile I've modified
> the
> > development.ini file. For the user profile, the section order was there
> but
> > commented, so that I've uncommented the line. For the dashboard section
> > order, I've added a similar line, but it doesn't work. (activity section
> is
> > not moving up) Do you have any idea about this?
> > I have committed my changes to the repo. (
> >
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/1955539543430eb71e56a995307135d258247b74/
> > )
> >
> > Regards!
> >
> > On Thu, Aug 30, 2018 at 1:27 AM Dave Brondsema <da...@brondsema.net>
> wrote:
> >
> >> Hi!
> >>
> >> I've merged that merge request, it looks good.  I think the title text
> is
> >> ok.
> >> The layout of the logo runs into the main gray content though.  It'd be
> >> nice if
> >> it had a bit of space like it does on the user profile page, for
> example.
> >> I see
> >> on the user profile page there is an empty <h2 class="project_summary">
> >> that
> >> helps push it down.
> >>
> >> Another thing that could be polished is the placement of the Activity
> box
> >> in the
> >> right column.  On both the dashboard and the profile pages it is part
> way
> >> down
> >> the column, and I think it'd be better at the top of the column.  That
> >> might be
> >> fixable by CSS rules, but also by the ordering of the widgets.  If it is
> >> the
> >> first widget then when it floats to the right its ok at the top of the
> >> column.
> >> So either by code, or .ini config file you could make it first in the
> >> profile_sections.order and personal_dashboard_sections.order
> >>
> >> On 8/29/18 6:44 AM, Deshani Geethika wrote:
> >>> Hi Dave,
> >>>
> >>> Sorry for the delays. I've done some fixes on dashboard styles and
> added
> >> a
> >>> merge request (
> >>> https://forge-allura.apache.org/p/allura/git/merge-requests/271/)
> >>> Please review it and let me know if any improvements required.
> >>>
> >>> Also, for the dashboard title, currently it is shown as *username /
> >>> Dashboard *(eg: Admin1 / Dashboard). Is it alright? Otherwise, do you
> >> have
> >>> a better idea for the dashboard title?
> >>>
> >>> Regards!
> >>>
> >>> On Fri, Jul 27, 2018 at 9:17 PM Deshani Geethika <
> >> deshanigeethika@gmail.com>
> >>> wrote:
> >>>
> >>>> Thanks a lot. Will try these and let you know
> >>>>
> >>>> On Fri, Jul 27, 2018 at 8:52 PM Dave Brondsema <da...@brondsema.net>
> >> wrote:
> >>>>
> >>>>> Sure, here's some thoughts:
> >>>>>
> >>>>> Inheriting from TestGitRepo means it gets all the test_* functions,
> so
> >>>>> when I
> >>>>> ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we
> >>>>> don't want
> >>>>> to happen.  So I'd remove that inheritance.  You probably will have
> to
> >>>>> duplicate
> >>>>> the setup_with_tools() function in this file then.
> >>>>>
> >>>>> Actually, inheriting from _TestCase in
> >>>>> forgegit/tests/functional/test_controllers.py might be a good option.
> >> It
> >>>>> has
> >>>>> some setup functions you can use (so you don't have to duplicate
> >>>>> setup_with_tools) and it doesn't have any test_* functions.
> >>>>>
> >>>>> The super() call is supposed to use its own name, like
> >>>>> super(TestMergeRequestsSection, self).setUp()  Not sure if that
> makes a
> >>>>> difference here or not.
> >>>>>
> >>>>> merge_request() is a function but you don't have parenthesis on `mr=
> >>>>> self.merge_request` so that function isn't running.
> >>>>>
> >>>>> I realized what happened earlier when I didn't see the "Tickets"
> >> section
> >>>>> in the
> >>>>> HTML output of the tickets test!  When I was trying this test now, I
> >> got a
> >>>>> similar situation where the "Merge Requests" section isn't in the
> HTML
> >>>>> output at
> >>>>> all either.  So I looked in the 'test.log' file (where logging goes
> to
> >>>>> during
> >>>>> tests) and saw "Error rendering section MergeRequestsSection: ..."
> with
> >>>>> error
> >>>>> details.  So these sections trap errors and log them, instead of
> >> letting
> >>>>> the
> >>>>> whole page error.  So looking at the test.log output can help see
> those
> >>>>> errors
> >>>>> when they happen.
> >>>>>
> >>>>> You may need to run ThreadLocalODMSession.flush_all() after creating
> >> the
> >>>>> merge
> >>>>> request object.  That is a common test pattern we have when tests
> >> create
> >>>>> something and then need to view it.  (Mainly needed in tests, since
> >>>>> regular web
> >>>>> pages will flush at the end of each request).
> >>>>>
> >>>>> Hope that helps, let me know how far you get, and I can look at it
> some
> >>>>> more if
> >>>>> needed :)
> >>>>>
> >>>>> On 7/27/18 9:11 AM, Deshani Geethika wrote:
> >>>>>> Hi Dave,
> >>>>>>
> >>>>>> I have started to write a test case for Merge Requests Section. For
> >>>>> that I
> >>>>>> have followed ForgeGit tests but it doesn't work for me. I was
> trying
> >> to
> >>>>>> create a merge request and see whether it appears in dashboard.
> >>>>>>
> >>>>>> I've pushed the code into my fork
> >>>>>> <
> >>>>>
> >>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/
> >>>>>> .
> >>>>>> Can you kindly take a look at that? Also, please let me know any
> >>>>> debugging
> >>>>>> process can be done for methods called internally when creating a
> >> merge
> >>>>>> request.
> >>>>>>
> >>>>>> Regards!
> >>>>>>
> >>>>>> On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <
> >>>>> deshanigeethika@gmail.com>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hi Dave,
> >>>>>>>
> >>>>>>> Thank you for sharing these valuable information. I have added a
> >> merge
> >>>>>>> request <
> >>>>> https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
> >>>>>>> Please review it and let me know any further improvements.
> >>>>>>>
> >>>>>>> Regards!
> >>>>>>>
> >>>>>>> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <dave@brondsema.net
> >
> >>>>> wrote:
> >>>>>>>
> >>>>>>>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
> >>>>>>>>> Hi Dave,
> >>>>>>>>>
> >>>>>>>>> I have tried with adding above lines, but still doesn't work. Can
> >> you
> >>>>>>>> take
> >>>>>>>>> a look at my implementation
> >>>>>>>>> <
> >>>>>>>>
> >>>>>
> >>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
> >>>>>>>>>
> >>>>>>>>> ?
> >>>>>>>>>
> >>>>>>>>> Thanks!
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>> Here's some debugging process I did, you can try it too:
> >>>>>>>>
> >>>>>>>> Tests use the MockSOLR class instead of a real solr instance (so
> >> that
> >>>>> you
> >>>>>>>> don't
> >>>>>>>> need solr to run tests).  I knew that, so I started by going to
> >>>>>>>> MockSOLR.search() and putting in some print statements to debug
> it.
> >>>>> At
> >>>>>>>> the
> >>>>>>>> beginning of search() I added:
> >>>>>>>>
> >>>>>>>>         print q
> >>>>>>>>         print fq
> >>>>>>>>
> >>>>>>>> And inside the "for obj in self.db.values():" loop, I added "print
> >>>>> obj"
> >>>>>>>>
> >>>>>>>> My idea was to see what query is happening and what the stored
> >> objects
> >>>>>>>> are, and
> >>>>>>>> see what's not working.  I ran just the single test with
> `nosetests
> >>>>>>>>
> >>>>>>>>
> >>>>>
> >>
> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
> >>>>>>>> I noticed there was a 'project_id_s' in the search query, and
> there
> >>>>>>>> shouldn't
> >>>>>>>> be.  But after a bit of trial & error to see what was happening, I
> >>>>>>>> realized that
> >>>>>>>> was coming from a "update_bin_count" background task, and that
> >> wasn't
> >>>>>>>> related to
> >>>>>>>> the test really.
> >>>>>>>>
> >>>>>>>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all
> the
> >>>>>>>> background
> >>>>>>>> tasks for now and did it again, and there wasn't any of my print
> >>>>>>>> statements
> >>>>>>>> occurring.  So the dashboard ticket search wasn't even happening
> it
> >>>>> seems.
> >>>>>>>>
> >>>>>>>> Then I printed the "response.html" variable to look at the whole
> >>>>>>>> dashboard page
> >>>>>>>> and I didn't see the Tickets section in it at all.  So indeed,
> that
> >>>>>>>> section
> >>>>>>>> isn't included in this test at all for some reason.
> >>>>>>>>
> >>>>>>>> Hopefully those are some helpful examples for this particular
> >>>>> situation
> >>>>>>>> and also
> >>>>>>>> ideas for how to debug high level (like "is it even running?") and
> >> low
> >>>>>>>> level (to
> >>>>>>>> see where things might be not working).
> >>>>>>>>
> >>>>>>>> Next step of course is to figure out why in this test the
> dashboard
> >>>>>>>> section
> >>>>>>>> isn't even running.  I'll let you work on that.  My general
> strategy
> >>>>> is
> >>>>>>>> to put
> >>>>>>>> debugging in various places to confirm if things are running with
> >> the
> >>>>>>>> right
> >>>>>>>> values, or where they aren't, and narrow down to the spot where it
> >>>>> goes
> >>>>>>>> wrong.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>>>> http://www.brondsema.net : personal
> >>>>>>>> http://www.splike.com : programming
> >>>>>>>>               <><
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> *Deshani Geethika*
> >>>>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Dave Brondsema : dave@brondsema.net
> >>>>> http://www.brondsema.net : personal
> >>>>> http://www.splike.com : programming
> >>>>>               <><
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> *Deshani Geethika*
> >>>> Undergraduate at Department of Computer Science and Engineering
> >>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >> Dave Brondsema : dave@brondsema.net
> >> http://www.brondsema.net : personal
> >> http://www.splike.com : programming
> >>               <><
> >>
> >
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
I added some logging to SectionsUtil.load_sections to see what it was getting
from the config, and other variables.  Looks like the problem is that the
section name (entry point name) is "followers" so that needs to be used.


On 9/16/18 2:37 PM, Deshani Geethika wrote:
> Hi Dave,
> 
> To move up the activity section in dashboard and profile I've modified the
> development.ini file. For the user profile, the section order was there but
> commented, so that I've uncommented the line. For the dashboard section
> order, I've added a similar line, but it doesn't work. (activity section is
> not moving up) Do you have any idea about this?
> I have committed my changes to the repo. (
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/1955539543430eb71e56a995307135d258247b74/
> )
> 
> Regards!
> 
> On Thu, Aug 30, 2018 at 1:27 AM Dave Brondsema <da...@brondsema.net> wrote:
> 
>> Hi!
>>
>> I've merged that merge request, it looks good.  I think the title text is
>> ok.
>> The layout of the logo runs into the main gray content though.  It'd be
>> nice if
>> it had a bit of space like it does on the user profile page, for example.
>> I see
>> on the user profile page there is an empty <h2 class="project_summary">
>> that
>> helps push it down.
>>
>> Another thing that could be polished is the placement of the Activity box
>> in the
>> right column.  On both the dashboard and the profile pages it is part way
>> down
>> the column, and I think it'd be better at the top of the column.  That
>> might be
>> fixable by CSS rules, but also by the ordering of the widgets.  If it is
>> the
>> first widget then when it floats to the right its ok at the top of the
>> column.
>> So either by code, or .ini config file you could make it first in the
>> profile_sections.order and personal_dashboard_sections.order
>>
>> On 8/29/18 6:44 AM, Deshani Geethika wrote:
>>> Hi Dave,
>>>
>>> Sorry for the delays. I've done some fixes on dashboard styles and added
>> a
>>> merge request (
>>> https://forge-allura.apache.org/p/allura/git/merge-requests/271/)
>>> Please review it and let me know if any improvements required.
>>>
>>> Also, for the dashboard title, currently it is shown as *username /
>>> Dashboard *(eg: Admin1 / Dashboard). Is it alright? Otherwise, do you
>> have
>>> a better idea for the dashboard title?
>>>
>>> Regards!
>>>
>>> On Fri, Jul 27, 2018 at 9:17 PM Deshani Geethika <
>> deshanigeethika@gmail.com>
>>> wrote:
>>>
>>>> Thanks a lot. Will try these and let you know
>>>>
>>>> On Fri, Jul 27, 2018 at 8:52 PM Dave Brondsema <da...@brondsema.net>
>> wrote:
>>>>
>>>>> Sure, here's some thoughts:
>>>>>
>>>>> Inheriting from TestGitRepo means it gets all the test_* functions, so
>>>>> when I
>>>>> ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we
>>>>> don't want
>>>>> to happen.  So I'd remove that inheritance.  You probably will have to
>>>>> duplicate
>>>>> the setup_with_tools() function in this file then.
>>>>>
>>>>> Actually, inheriting from _TestCase in
>>>>> forgegit/tests/functional/test_controllers.py might be a good option.
>> It
>>>>> has
>>>>> some setup functions you can use (so you don't have to duplicate
>>>>> setup_with_tools) and it doesn't have any test_* functions.
>>>>>
>>>>> The super() call is supposed to use its own name, like
>>>>> super(TestMergeRequestsSection, self).setUp()  Not sure if that makes a
>>>>> difference here or not.
>>>>>
>>>>> merge_request() is a function but you don't have parenthesis on `mr=
>>>>> self.merge_request` so that function isn't running.
>>>>>
>>>>> I realized what happened earlier when I didn't see the "Tickets"
>> section
>>>>> in the
>>>>> HTML output of the tickets test!  When I was trying this test now, I
>> got a
>>>>> similar situation where the "Merge Requests" section isn't in the HTML
>>>>> output at
>>>>> all either.  So I looked in the 'test.log' file (where logging goes to
>>>>> during
>>>>> tests) and saw "Error rendering section MergeRequestsSection: ..." with
>>>>> error
>>>>> details.  So these sections trap errors and log them, instead of
>> letting
>>>>> the
>>>>> whole page error.  So looking at the test.log output can help see those
>>>>> errors
>>>>> when they happen.
>>>>>
>>>>> You may need to run ThreadLocalODMSession.flush_all() after creating
>> the
>>>>> merge
>>>>> request object.  That is a common test pattern we have when tests
>> create
>>>>> something and then need to view it.  (Mainly needed in tests, since
>>>>> regular web
>>>>> pages will flush at the end of each request).
>>>>>
>>>>> Hope that helps, let me know how far you get, and I can look at it some
>>>>> more if
>>>>> needed :)
>>>>>
>>>>> On 7/27/18 9:11 AM, Deshani Geethika wrote:
>>>>>> Hi Dave,
>>>>>>
>>>>>> I have started to write a test case for Merge Requests Section. For
>>>>> that I
>>>>>> have followed ForgeGit tests but it doesn't work for me. I was trying
>> to
>>>>>> create a merge request and see whether it appears in dashboard.
>>>>>>
>>>>>> I've pushed the code into my fork
>>>>>> <
>>>>>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/
>>>>>> .
>>>>>> Can you kindly take a look at that? Also, please let me know any
>>>>> debugging
>>>>>> process can be done for methods called internally when creating a
>> merge
>>>>>> request.
>>>>>>
>>>>>> Regards!
>>>>>>
>>>>>> On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <
>>>>> deshanigeethika@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> Thank you for sharing these valuable information. I have added a
>> merge
>>>>>>> request <
>>>>> https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
>>>>>>> Please review it and let me know any further improvements.
>>>>>>>
>>>>>>> Regards!
>>>>>>>
>>>>>>> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net>
>>>>> wrote:
>>>>>>>
>>>>>>>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
>>>>>>>>> Hi Dave,
>>>>>>>>>
>>>>>>>>> I have tried with adding above lines, but still doesn't work. Can
>> you
>>>>>>>> take
>>>>>>>>> a look at my implementation
>>>>>>>>> <
>>>>>>>>
>>>>>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
>>>>>>>>>
>>>>>>>>> ?
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>>
>>>>>>>>
>>>>>>>> Here's some debugging process I did, you can try it too:
>>>>>>>>
>>>>>>>> Tests use the MockSOLR class instead of a real solr instance (so
>> that
>>>>> you
>>>>>>>> don't
>>>>>>>> need solr to run tests).  I knew that, so I started by going to
>>>>>>>> MockSOLR.search() and putting in some print statements to debug it.
>>>>> At
>>>>>>>> the
>>>>>>>> beginning of search() I added:
>>>>>>>>
>>>>>>>>         print q
>>>>>>>>         print fq
>>>>>>>>
>>>>>>>> And inside the "for obj in self.db.values():" loop, I added "print
>>>>> obj"
>>>>>>>>
>>>>>>>> My idea was to see what query is happening and what the stored
>> objects
>>>>>>>> are, and
>>>>>>>> see what's not working.  I ran just the single test with `nosetests
>>>>>>>>
>>>>>>>>
>>>>>
>> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
>>>>>>>> I noticed there was a 'project_id_s' in the search query, and there
>>>>>>>> shouldn't
>>>>>>>> be.  But after a bit of trial & error to see what was happening, I
>>>>>>>> realized that
>>>>>>>> was coming from a "update_bin_count" background task, and that
>> wasn't
>>>>>>>> related to
>>>>>>>> the test really.
>>>>>>>>
>>>>>>>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
>>>>>>>> background
>>>>>>>> tasks for now and did it again, and there wasn't any of my print
>>>>>>>> statements
>>>>>>>> occurring.  So the dashboard ticket search wasn't even happening it
>>>>> seems.
>>>>>>>>
>>>>>>>> Then I printed the "response.html" variable to look at the whole
>>>>>>>> dashboard page
>>>>>>>> and I didn't see the Tickets section in it at all.  So indeed, that
>>>>>>>> section
>>>>>>>> isn't included in this test at all for some reason.
>>>>>>>>
>>>>>>>> Hopefully those are some helpful examples for this particular
>>>>> situation
>>>>>>>> and also
>>>>>>>> ideas for how to debug high level (like "is it even running?") and
>> low
>>>>>>>> level (to
>>>>>>>> see where things might be not working).
>>>>>>>>
>>>>>>>> Next step of course is to figure out why in this test the dashboard
>>>>>>>> section
>>>>>>>> isn't even running.  I'll let you work on that.  My general strategy
>>>>> is
>>>>>>>> to put
>>>>>>>> debugging in various places to confirm if things are running with
>> the
>>>>>>>> right
>>>>>>>> values, or where they aren't, and narrow down to the spot where it
>>>>> goes
>>>>>>>> wrong.
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>>> http://www.brondsema.net : personal
>>>>>>>> http://www.splike.com : programming
>>>>>>>>               <><
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Deshani Geethika*
>>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Brondsema : dave@brondsema.net
>>>>> http://www.brondsema.net : personal
>>>>> http://www.splike.com : programming
>>>>>               <><
>>>>>
>>>>
>>>>
>>>> --
>>>> *Deshani Geethika*
>>>> Undergraduate at Department of Computer Science and Engineering
>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
> 
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

To move up the activity section in dashboard and profile I've modified the
development.ini file. For the user profile, the section order was there but
commented, so that I've uncommented the line. For the dashboard section
order, I've added a similar line, but it doesn't work. (activity section is
not moving up) Do you have any idea about this?
I have committed my changes to the repo. (
https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/1955539543430eb71e56a995307135d258247b74/
)

Regards!

On Thu, Aug 30, 2018 at 1:27 AM Dave Brondsema <da...@brondsema.net> wrote:

> Hi!
>
> I've merged that merge request, it looks good.  I think the title text is
> ok.
> The layout of the logo runs into the main gray content though.  It'd be
> nice if
> it had a bit of space like it does on the user profile page, for example.
> I see
> on the user profile page there is an empty <h2 class="project_summary">
> that
> helps push it down.
>
> Another thing that could be polished is the placement of the Activity box
> in the
> right column.  On both the dashboard and the profile pages it is part way
> down
> the column, and I think it'd be better at the top of the column.  That
> might be
> fixable by CSS rules, but also by the ordering of the widgets.  If it is
> the
> first widget then when it floats to the right its ok at the top of the
> column.
> So either by code, or .ini config file you could make it first in the
> profile_sections.order and personal_dashboard_sections.order
>
> On 8/29/18 6:44 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > Sorry for the delays. I've done some fixes on dashboard styles and added
> a
> > merge request (
> > https://forge-allura.apache.org/p/allura/git/merge-requests/271/)
> > Please review it and let me know if any improvements required.
> >
> > Also, for the dashboard title, currently it is shown as *username /
> > Dashboard *(eg: Admin1 / Dashboard). Is it alright? Otherwise, do you
> have
> > a better idea for the dashboard title?
> >
> > Regards!
> >
> > On Fri, Jul 27, 2018 at 9:17 PM Deshani Geethika <
> deshanigeethika@gmail.com>
> > wrote:
> >
> >> Thanks a lot. Will try these and let you know
> >>
> >> On Fri, Jul 27, 2018 at 8:52 PM Dave Brondsema <da...@brondsema.net>
> wrote:
> >>
> >>> Sure, here's some thoughts:
> >>>
> >>> Inheriting from TestGitRepo means it gets all the test_* functions, so
> >>> when I
> >>> ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we
> >>> don't want
> >>> to happen.  So I'd remove that inheritance.  You probably will have to
> >>> duplicate
> >>> the setup_with_tools() function in this file then.
> >>>
> >>> Actually, inheriting from _TestCase in
> >>> forgegit/tests/functional/test_controllers.py might be a good option.
> It
> >>> has
> >>> some setup functions you can use (so you don't have to duplicate
> >>> setup_with_tools) and it doesn't have any test_* functions.
> >>>
> >>> The super() call is supposed to use its own name, like
> >>> super(TestMergeRequestsSection, self).setUp()  Not sure if that makes a
> >>> difference here or not.
> >>>
> >>> merge_request() is a function but you don't have parenthesis on `mr=
> >>> self.merge_request` so that function isn't running.
> >>>
> >>> I realized what happened earlier when I didn't see the "Tickets"
> section
> >>> in the
> >>> HTML output of the tickets test!  When I was trying this test now, I
> got a
> >>> similar situation where the "Merge Requests" section isn't in the HTML
> >>> output at
> >>> all either.  So I looked in the 'test.log' file (where logging goes to
> >>> during
> >>> tests) and saw "Error rendering section MergeRequestsSection: ..." with
> >>> error
> >>> details.  So these sections trap errors and log them, instead of
> letting
> >>> the
> >>> whole page error.  So looking at the test.log output can help see those
> >>> errors
> >>> when they happen.
> >>>
> >>> You may need to run ThreadLocalODMSession.flush_all() after creating
> the
> >>> merge
> >>> request object.  That is a common test pattern we have when tests
> create
> >>> something and then need to view it.  (Mainly needed in tests, since
> >>> regular web
> >>> pages will flush at the end of each request).
> >>>
> >>> Hope that helps, let me know how far you get, and I can look at it some
> >>> more if
> >>> needed :)
> >>>
> >>> On 7/27/18 9:11 AM, Deshani Geethika wrote:
> >>>> Hi Dave,
> >>>>
> >>>> I have started to write a test case for Merge Requests Section. For
> >>> that I
> >>>> have followed ForgeGit tests but it doesn't work for me. I was trying
> to
> >>>> create a merge request and see whether it appears in dashboard.
> >>>>
> >>>> I've pushed the code into my fork
> >>>> <
> >>>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/
> >>>> .
> >>>> Can you kindly take a look at that? Also, please let me know any
> >>> debugging
> >>>> process can be done for methods called internally when creating a
> merge
> >>>> request.
> >>>>
> >>>> Regards!
> >>>>
> >>>> On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <
> >>> deshanigeethika@gmail.com>
> >>>> wrote:
> >>>>
> >>>>> Hi Dave,
> >>>>>
> >>>>> Thank you for sharing these valuable information. I have added a
> merge
> >>>>> request <
> >>> https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
> >>>>> Please review it and let me know any further improvements.
> >>>>>
> >>>>> Regards!
> >>>>>
> >>>>> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net>
> >>> wrote:
> >>>>>
> >>>>>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
> >>>>>>> Hi Dave,
> >>>>>>>
> >>>>>>> I have tried with adding above lines, but still doesn't work. Can
> you
> >>>>>> take
> >>>>>>> a look at my implementation
> >>>>>>> <
> >>>>>>
> >>>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
> >>>>>>>
> >>>>>>> ?
> >>>>>>>
> >>>>>>> Thanks!
> >>>>>>>
> >>>>>>
> >>>>>> Here's some debugging process I did, you can try it too:
> >>>>>>
> >>>>>> Tests use the MockSOLR class instead of a real solr instance (so
> that
> >>> you
> >>>>>> don't
> >>>>>> need solr to run tests).  I knew that, so I started by going to
> >>>>>> MockSOLR.search() and putting in some print statements to debug it.
> >>> At
> >>>>>> the
> >>>>>> beginning of search() I added:
> >>>>>>
> >>>>>>         print q
> >>>>>>         print fq
> >>>>>>
> >>>>>> And inside the "for obj in self.db.values():" loop, I added "print
> >>> obj"
> >>>>>>
> >>>>>> My idea was to see what query is happening and what the stored
> objects
> >>>>>> are, and
> >>>>>> see what's not working.  I ran just the single test with `nosetests
> >>>>>>
> >>>>>>
> >>>
> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
> >>>>>> I noticed there was a 'project_id_s' in the search query, and there
> >>>>>> shouldn't
> >>>>>> be.  But after a bit of trial & error to see what was happening, I
> >>>>>> realized that
> >>>>>> was coming from a "update_bin_count" background task, and that
> wasn't
> >>>>>> related to
> >>>>>> the test really.
> >>>>>>
> >>>>>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
> >>>>>> background
> >>>>>> tasks for now and did it again, and there wasn't any of my print
> >>>>>> statements
> >>>>>> occurring.  So the dashboard ticket search wasn't even happening it
> >>> seems.
> >>>>>>
> >>>>>> Then I printed the "response.html" variable to look at the whole
> >>>>>> dashboard page
> >>>>>> and I didn't see the Tickets section in it at all.  So indeed, that
> >>>>>> section
> >>>>>> isn't included in this test at all for some reason.
> >>>>>>
> >>>>>> Hopefully those are some helpful examples for this particular
> >>> situation
> >>>>>> and also
> >>>>>> ideas for how to debug high level (like "is it even running?") and
> low
> >>>>>> level (to
> >>>>>> see where things might be not working).
> >>>>>>
> >>>>>> Next step of course is to figure out why in this test the dashboard
> >>>>>> section
> >>>>>> isn't even running.  I'll let you work on that.  My general strategy
> >>> is
> >>>>>> to put
> >>>>>> debugging in various places to confirm if things are running with
> the
> >>>>>> right
> >>>>>> values, or where they aren't, and narrow down to the spot where it
> >>> goes
> >>>>>> wrong.
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>> http://www.brondsema.net : personal
> >>>>>> http://www.splike.com : programming
> >>>>>>               <><
> >>>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> *Deshani Geethika*
> >>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Dave Brondsema : dave@brondsema.net
> >>> http://www.brondsema.net : personal
> >>> http://www.splike.com : programming
> >>>               <><
> >>>
> >>
> >>
> >> --
> >> *Deshani Geethika*
> >> Undergraduate at Department of Computer Science and Engineering
> >> Faculty of Engineering - University of Moratuwa Sri Lanka
> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>
> >>
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
Hi!

I've merged that merge request, it looks good.  I think the title text is ok.
The layout of the logo runs into the main gray content though.  It'd be nice if
it had a bit of space like it does on the user profile page, for example.  I see
on the user profile page there is an empty <h2 class="project_summary"> that
helps push it down.

Another thing that could be polished is the placement of the Activity box in the
right column.  On both the dashboard and the profile pages it is part way down
the column, and I think it'd be better at the top of the column.  That might be
fixable by CSS rules, but also by the ordering of the widgets.  If it is the
first widget then when it floats to the right its ok at the top of the column.
So either by code, or .ini config file you could make it first in the
profile_sections.order and personal_dashboard_sections.order

On 8/29/18 6:44 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> Sorry for the delays. I've done some fixes on dashboard styles and added a
> merge request (
> https://forge-allura.apache.org/p/allura/git/merge-requests/271/)
> Please review it and let me know if any improvements required.
> 
> Also, for the dashboard title, currently it is shown as *username /
> Dashboard *(eg: Admin1 / Dashboard). Is it alright? Otherwise, do you have
> a better idea for the dashboard title?
> 
> Regards!
> 
> On Fri, Jul 27, 2018 at 9:17 PM Deshani Geethika <de...@gmail.com>
> wrote:
> 
>> Thanks a lot. Will try these and let you know
>>
>> On Fri, Jul 27, 2018 at 8:52 PM Dave Brondsema <da...@brondsema.net> wrote:
>>
>>> Sure, here's some thoughts:
>>>
>>> Inheriting from TestGitRepo means it gets all the test_* functions, so
>>> when I
>>> ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we
>>> don't want
>>> to happen.  So I'd remove that inheritance.  You probably will have to
>>> duplicate
>>> the setup_with_tools() function in this file then.
>>>
>>> Actually, inheriting from _TestCase in
>>> forgegit/tests/functional/test_controllers.py might be a good option.  It
>>> has
>>> some setup functions you can use (so you don't have to duplicate
>>> setup_with_tools) and it doesn't have any test_* functions.
>>>
>>> The super() call is supposed to use its own name, like
>>> super(TestMergeRequestsSection, self).setUp()  Not sure if that makes a
>>> difference here or not.
>>>
>>> merge_request() is a function but you don't have parenthesis on `mr=
>>> self.merge_request` so that function isn't running.
>>>
>>> I realized what happened earlier when I didn't see the "Tickets" section
>>> in the
>>> HTML output of the tickets test!  When I was trying this test now, I got a
>>> similar situation where the "Merge Requests" section isn't in the HTML
>>> output at
>>> all either.  So I looked in the 'test.log' file (where logging goes to
>>> during
>>> tests) and saw "Error rendering section MergeRequestsSection: ..." with
>>> error
>>> details.  So these sections trap errors and log them, instead of letting
>>> the
>>> whole page error.  So looking at the test.log output can help see those
>>> errors
>>> when they happen.
>>>
>>> You may need to run ThreadLocalODMSession.flush_all() after creating the
>>> merge
>>> request object.  That is a common test pattern we have when tests create
>>> something and then need to view it.  (Mainly needed in tests, since
>>> regular web
>>> pages will flush at the end of each request).
>>>
>>> Hope that helps, let me know how far you get, and I can look at it some
>>> more if
>>> needed :)
>>>
>>> On 7/27/18 9:11 AM, Deshani Geethika wrote:
>>>> Hi Dave,
>>>>
>>>> I have started to write a test case for Merge Requests Section. For
>>> that I
>>>> have followed ForgeGit tests but it doesn't work for me. I was trying to
>>>> create a merge request and see whether it appears in dashboard.
>>>>
>>>> I've pushed the code into my fork
>>>> <
>>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/
>>>> .
>>>> Can you kindly take a look at that? Also, please let me know any
>>> debugging
>>>> process can be done for methods called internally when creating a merge
>>>> request.
>>>>
>>>> Regards!
>>>>
>>>> On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <
>>> deshanigeethika@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> Thank you for sharing these valuable information. I have added a merge
>>>>> request <
>>> https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
>>>>> Please review it and let me know any further improvements.
>>>>>
>>>>> Regards!
>>>>>
>>>>> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net>
>>> wrote:
>>>>>
>>>>>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> I have tried with adding above lines, but still doesn't work. Can you
>>>>>> take
>>>>>>> a look at my implementation
>>>>>>> <
>>>>>>
>>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
>>>>>>>
>>>>>>> ?
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>
>>>>>> Here's some debugging process I did, you can try it too:
>>>>>>
>>>>>> Tests use the MockSOLR class instead of a real solr instance (so that
>>> you
>>>>>> don't
>>>>>> need solr to run tests).  I knew that, so I started by going to
>>>>>> MockSOLR.search() and putting in some print statements to debug it.
>>> At
>>>>>> the
>>>>>> beginning of search() I added:
>>>>>>
>>>>>>         print q
>>>>>>         print fq
>>>>>>
>>>>>> And inside the "for obj in self.db.values():" loop, I added "print
>>> obj"
>>>>>>
>>>>>> My idea was to see what query is happening and what the stored objects
>>>>>> are, and
>>>>>> see what's not working.  I ran just the single test with `nosetests
>>>>>>
>>>>>>
>>> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
>>>>>> I noticed there was a 'project_id_s' in the search query, and there
>>>>>> shouldn't
>>>>>> be.  But after a bit of trial & error to see what was happening, I
>>>>>> realized that
>>>>>> was coming from a "update_bin_count" background task, and that wasn't
>>>>>> related to
>>>>>> the test really.
>>>>>>
>>>>>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
>>>>>> background
>>>>>> tasks for now and did it again, and there wasn't any of my print
>>>>>> statements
>>>>>> occurring.  So the dashboard ticket search wasn't even happening it
>>> seems.
>>>>>>
>>>>>> Then I printed the "response.html" variable to look at the whole
>>>>>> dashboard page
>>>>>> and I didn't see the Tickets section in it at all.  So indeed, that
>>>>>> section
>>>>>> isn't included in this test at all for some reason.
>>>>>>
>>>>>> Hopefully those are some helpful examples for this particular
>>> situation
>>>>>> and also
>>>>>> ideas for how to debug high level (like "is it even running?") and low
>>>>>> level (to
>>>>>> see where things might be not working).
>>>>>>
>>>>>> Next step of course is to figure out why in this test the dashboard
>>>>>> section
>>>>>> isn't even running.  I'll let you work on that.  My general strategy
>>> is
>>>>>> to put
>>>>>> debugging in various places to confirm if things are running with the
>>>>>> right
>>>>>> values, or where they aren't, and narrow down to the spot where it
>>> goes
>>>>>> wrong.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>> http://www.brondsema.net : personal
>>>>>> http://www.splike.com : programming
>>>>>>               <><
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Deshani Geethika*
>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Dave Brondsema : dave@brondsema.net
>>> http://www.brondsema.net : personal
>>> http://www.splike.com : programming
>>>               <><
>>>
>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

Sorry for the delays. I've done some fixes on dashboard styles and added a
merge request (
https://forge-allura.apache.org/p/allura/git/merge-requests/271/)
Please review it and let me know if any improvements required.

Also, for the dashboard title, currently it is shown as *username /
Dashboard *(eg: Admin1 / Dashboard). Is it alright? Otherwise, do you have
a better idea for the dashboard title?

Regards!

On Fri, Jul 27, 2018 at 9:17 PM Deshani Geethika <de...@gmail.com>
wrote:

> Thanks a lot. Will try these and let you know
>
> On Fri, Jul 27, 2018 at 8:52 PM Dave Brondsema <da...@brondsema.net> wrote:
>
>> Sure, here's some thoughts:
>>
>> Inheriting from TestGitRepo means it gets all the test_* functions, so
>> when I
>> ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we
>> don't want
>> to happen.  So I'd remove that inheritance.  You probably will have to
>> duplicate
>> the setup_with_tools() function in this file then.
>>
>> Actually, inheriting from _TestCase in
>> forgegit/tests/functional/test_controllers.py might be a good option.  It
>> has
>> some setup functions you can use (so you don't have to duplicate
>> setup_with_tools) and it doesn't have any test_* functions.
>>
>> The super() call is supposed to use its own name, like
>> super(TestMergeRequestsSection, self).setUp()  Not sure if that makes a
>> difference here or not.
>>
>> merge_request() is a function but you don't have parenthesis on `mr=
>> self.merge_request` so that function isn't running.
>>
>> I realized what happened earlier when I didn't see the "Tickets" section
>> in the
>> HTML output of the tickets test!  When I was trying this test now, I got a
>> similar situation where the "Merge Requests" section isn't in the HTML
>> output at
>> all either.  So I looked in the 'test.log' file (where logging goes to
>> during
>> tests) and saw "Error rendering section MergeRequestsSection: ..." with
>> error
>> details.  So these sections trap errors and log them, instead of letting
>> the
>> whole page error.  So looking at the test.log output can help see those
>> errors
>> when they happen.
>>
>> You may need to run ThreadLocalODMSession.flush_all() after creating the
>> merge
>> request object.  That is a common test pattern we have when tests create
>> something and then need to view it.  (Mainly needed in tests, since
>> regular web
>> pages will flush at the end of each request).
>>
>> Hope that helps, let me know how far you get, and I can look at it some
>> more if
>> needed :)
>>
>> On 7/27/18 9:11 AM, Deshani Geethika wrote:
>> > Hi Dave,
>> >
>> > I have started to write a test case for Merge Requests Section. For
>> that I
>> > have followed ForgeGit tests but it doesn't work for me. I was trying to
>> > create a merge request and see whether it appears in dashboard.
>> >
>> > I've pushed the code into my fork
>> > <
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/
>> >.
>> > Can you kindly take a look at that? Also, please let me know any
>> debugging
>> > process can be done for methods called internally when creating a merge
>> > request.
>> >
>> > Regards!
>> >
>> > On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <
>> deshanigeethika@gmail.com>
>> > wrote:
>> >
>> >> Hi Dave,
>> >>
>> >> Thank you for sharing these valuable information. I have added a merge
>> >> request <
>> https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
>> >> Please review it and let me know any further improvements.
>> >>
>> >> Regards!
>> >>
>> >> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net>
>> wrote:
>> >>
>> >>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
>> >>>> Hi Dave,
>> >>>>
>> >>>> I have tried with adding above lines, but still doesn't work. Can you
>> >>> take
>> >>>> a look at my implementation
>> >>>> <
>> >>>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
>> >>>>
>> >>>> ?
>> >>>>
>> >>>> Thanks!
>> >>>>
>> >>>
>> >>> Here's some debugging process I did, you can try it too:
>> >>>
>> >>> Tests use the MockSOLR class instead of a real solr instance (so that
>> you
>> >>> don't
>> >>> need solr to run tests).  I knew that, so I started by going to
>> >>> MockSOLR.search() and putting in some print statements to debug it.
>> At
>> >>> the
>> >>> beginning of search() I added:
>> >>>
>> >>>         print q
>> >>>         print fq
>> >>>
>> >>> And inside the "for obj in self.db.values():" loop, I added "print
>> obj"
>> >>>
>> >>> My idea was to see what query is happening and what the stored objects
>> >>> are, and
>> >>> see what's not working.  I ran just the single test with `nosetests
>> >>>
>> >>>
>> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
>> >>> I noticed there was a 'project_id_s' in the search query, and there
>> >>> shouldn't
>> >>> be.  But after a bit of trial & error to see what was happening, I
>> >>> realized that
>> >>> was coming from a "update_bin_count" background task, and that wasn't
>> >>> related to
>> >>> the test really.
>> >>>
>> >>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
>> >>> background
>> >>> tasks for now and did it again, and there wasn't any of my print
>> >>> statements
>> >>> occurring.  So the dashboard ticket search wasn't even happening it
>> seems.
>> >>>
>> >>> Then I printed the "response.html" variable to look at the whole
>> >>> dashboard page
>> >>> and I didn't see the Tickets section in it at all.  So indeed, that
>> >>> section
>> >>> isn't included in this test at all for some reason.
>> >>>
>> >>> Hopefully those are some helpful examples for this particular
>> situation
>> >>> and also
>> >>> ideas for how to debug high level (like "is it even running?") and low
>> >>> level (to
>> >>> see where things might be not working).
>> >>>
>> >>> Next step of course is to figure out why in this test the dashboard
>> >>> section
>> >>> isn't even running.  I'll let you work on that.  My general strategy
>> is
>> >>> to put
>> >>> debugging in various places to confirm if things are running with the
>> >>> right
>> >>> values, or where they aren't, and narrow down to the spot where it
>> goes
>> >>> wrong.
>> >>>
>> >>>
>> >>> --
>> >>> Dave Brondsema : dave@brondsema.net
>> >>> http://www.brondsema.net : personal
>> >>> http://www.splike.com : programming
>> >>>               <><
>> >>>
>> >>
>> >>
>> >> --
>> >> *Deshani Geethika*
>> >> Undergraduate at Department of Computer Science and Engineering
>> >> Faculty of Engineering - University of Moratuwa Sri Lanka
>> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> >> <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Thanks a lot. Will try these and let you know

On Fri, Jul 27, 2018 at 8:52 PM Dave Brondsema <da...@brondsema.net> wrote:

> Sure, here's some thoughts:
>
> Inheriting from TestGitRepo means it gets all the test_* functions, so
> when I
> ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we
> don't want
> to happen.  So I'd remove that inheritance.  You probably will have to
> duplicate
> the setup_with_tools() function in this file then.
>
> Actually, inheriting from _TestCase in
> forgegit/tests/functional/test_controllers.py might be a good option.  It
> has
> some setup functions you can use (so you don't have to duplicate
> setup_with_tools) and it doesn't have any test_* functions.
>
> The super() call is supposed to use its own name, like
> super(TestMergeRequestsSection, self).setUp()  Not sure if that makes a
> difference here or not.
>
> merge_request() is a function but you don't have parenthesis on `mr=
> self.merge_request` so that function isn't running.
>
> I realized what happened earlier when I didn't see the "Tickets" section
> in the
> HTML output of the tickets test!  When I was trying this test now, I got a
> similar situation where the "Merge Requests" section isn't in the HTML
> output at
> all either.  So I looked in the 'test.log' file (where logging goes to
> during
> tests) and saw "Error rendering section MergeRequestsSection: ..." with
> error
> details.  So these sections trap errors and log them, instead of letting
> the
> whole page error.  So looking at the test.log output can help see those
> errors
> when they happen.
>
> You may need to run ThreadLocalODMSession.flush_all() after creating the
> merge
> request object.  That is a common test pattern we have when tests create
> something and then need to view it.  (Mainly needed in tests, since
> regular web
> pages will flush at the end of each request).
>
> Hope that helps, let me know how far you get, and I can look at it some
> more if
> needed :)
>
> On 7/27/18 9:11 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > I have started to write a test case for Merge Requests Section. For that
> I
> > have followed ForgeGit tests but it doesn't work for me. I was trying to
> > create a merge request and see whether it appears in dashboard.
> >
> > I've pushed the code into my fork
> > <
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/
> >.
> > Can you kindly take a look at that? Also, please let me know any
> debugging
> > process can be done for methods called internally when creating a merge
> > request.
> >
> > Regards!
> >
> > On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <
> deshanigeethika@gmail.com>
> > wrote:
> >
> >> Hi Dave,
> >>
> >> Thank you for sharing these valuable information. I have added a merge
> >> request <
> https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
> >> Please review it and let me know any further improvements.
> >>
> >> Regards!
> >>
> >> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net>
> wrote:
> >>
> >>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
> >>>> Hi Dave,
> >>>>
> >>>> I have tried with adding above lines, but still doesn't work. Can you
> >>> take
> >>>> a look at my implementation
> >>>> <
> >>>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
> >>>>
> >>>> ?
> >>>>
> >>>> Thanks!
> >>>>
> >>>
> >>> Here's some debugging process I did, you can try it too:
> >>>
> >>> Tests use the MockSOLR class instead of a real solr instance (so that
> you
> >>> don't
> >>> need solr to run tests).  I knew that, so I started by going to
> >>> MockSOLR.search() and putting in some print statements to debug it.  At
> >>> the
> >>> beginning of search() I added:
> >>>
> >>>         print q
> >>>         print fq
> >>>
> >>> And inside the "for obj in self.db.values():" loop, I added "print obj"
> >>>
> >>> My idea was to see what query is happening and what the stored objects
> >>> are, and
> >>> see what's not working.  I ran just the single test with `nosetests
> >>>
> >>>
> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
> >>> I noticed there was a 'project_id_s' in the search query, and there
> >>> shouldn't
> >>> be.  But after a bit of trial & error to see what was happening, I
> >>> realized that
> >>> was coming from a "update_bin_count" background task, and that wasn't
> >>> related to
> >>> the test really.
> >>>
> >>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
> >>> background
> >>> tasks for now and did it again, and there wasn't any of my print
> >>> statements
> >>> occurring.  So the dashboard ticket search wasn't even happening it
> seems.
> >>>
> >>> Then I printed the "response.html" variable to look at the whole
> >>> dashboard page
> >>> and I didn't see the Tickets section in it at all.  So indeed, that
> >>> section
> >>> isn't included in this test at all for some reason.
> >>>
> >>> Hopefully those are some helpful examples for this particular situation
> >>> and also
> >>> ideas for how to debug high level (like "is it even running?") and low
> >>> level (to
> >>> see where things might be not working).
> >>>
> >>> Next step of course is to figure out why in this test the dashboard
> >>> section
> >>> isn't even running.  I'll let you work on that.  My general strategy is
> >>> to put
> >>> debugging in various places to confirm if things are running with the
> >>> right
> >>> values, or where they aren't, and narrow down to the spot where it goes
> >>> wrong.
> >>>
> >>>
> >>> --
> >>> Dave Brondsema : dave@brondsema.net
> >>> http://www.brondsema.net : personal
> >>> http://www.splike.com : programming
> >>>               <><
> >>>
> >>
> >>
> >> --
> >> *Deshani Geethika*
> >> Undergraduate at Department of Computer Science and Engineering
> >> Faculty of Engineering - University of Moratuwa Sri Lanka
> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>
> >>
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
Sure, here's some thoughts:

Inheriting from TestGitRepo means it gets all the test_* functions, so when I
ran nosetests, it ran a lot of TestGitRepo.test_* tests too, which we don't want
to happen.  So I'd remove that inheritance.  You probably will have to duplicate
the setup_with_tools() function in this file then.

Actually, inheriting from _TestCase in
forgegit/tests/functional/test_controllers.py might be a good option.  It has
some setup functions you can use (so you don't have to duplicate
setup_with_tools) and it doesn't have any test_* functions.

The super() call is supposed to use its own name, like
super(TestMergeRequestsSection, self).setUp()  Not sure if that makes a
difference here or not.

merge_request() is a function but you don't have parenthesis on `mr=
self.merge_request` so that function isn't running.

I realized what happened earlier when I didn't see the "Tickets" section in the
HTML output of the tickets test!  When I was trying this test now, I got a
similar situation where the "Merge Requests" section isn't in the HTML output at
all either.  So I looked in the 'test.log' file (where logging goes to during
tests) and saw "Error rendering section MergeRequestsSection: ..." with error
details.  So these sections trap errors and log them, instead of letting the
whole page error.  So looking at the test.log output can help see those errors
when they happen.

You may need to run ThreadLocalODMSession.flush_all() after creating the merge
request object.  That is a common test pattern we have when tests create
something and then need to view it.  (Mainly needed in tests, since regular web
pages will flush at the end of each request).

Hope that helps, let me know how far you get, and I can look at it some more if
needed :)

On 7/27/18 9:11 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> I have started to write a test case for Merge Requests Section. For that I
> have followed ForgeGit tests but it doesn't work for me. I was trying to
> create a merge request and see whether it appears in dashboard.
> 
> I've pushed the code into my fork
> <https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/>.
> Can you kindly take a look at that? Also, please let me know any debugging
> process can be done for methods called internally when creating a merge
> request.
> 
> Regards!
> 
> On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <de...@gmail.com>
> wrote:
> 
>> Hi Dave,
>>
>> Thank you for sharing these valuable information. I have added a merge
>> request <https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
>> Please review it and let me know any further improvements.
>>
>> Regards!
>>
>> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net> wrote:
>>
>>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
>>>> Hi Dave,
>>>>
>>>> I have tried with adding above lines, but still doesn't work. Can you
>>> take
>>>> a look at my implementation
>>>> <
>>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
>>>>
>>>> ?
>>>>
>>>> Thanks!
>>>>
>>>
>>> Here's some debugging process I did, you can try it too:
>>>
>>> Tests use the MockSOLR class instead of a real solr instance (so that you
>>> don't
>>> need solr to run tests).  I knew that, so I started by going to
>>> MockSOLR.search() and putting in some print statements to debug it.  At
>>> the
>>> beginning of search() I added:
>>>
>>>         print q
>>>         print fq
>>>
>>> And inside the "for obj in self.db.values():" loop, I added "print obj"
>>>
>>> My idea was to see what query is happening and what the stored objects
>>> are, and
>>> see what's not working.  I ran just the single test with `nosetests
>>>
>>> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
>>> I noticed there was a 'project_id_s' in the search query, and there
>>> shouldn't
>>> be.  But after a bit of trial & error to see what was happening, I
>>> realized that
>>> was coming from a "update_bin_count" background task, and that wasn't
>>> related to
>>> the test really.
>>>
>>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
>>> background
>>> tasks for now and did it again, and there wasn't any of my print
>>> statements
>>> occurring.  So the dashboard ticket search wasn't even happening it seems.
>>>
>>> Then I printed the "response.html" variable to look at the whole
>>> dashboard page
>>> and I didn't see the Tickets section in it at all.  So indeed, that
>>> section
>>> isn't included in this test at all for some reason.
>>>
>>> Hopefully those are some helpful examples for this particular situation
>>> and also
>>> ideas for how to debug high level (like "is it even running?") and low
>>> level (to
>>> see where things might be not working).
>>>
>>> Next step of course is to figure out why in this test the dashboard
>>> section
>>> isn't even running.  I'll let you work on that.  My general strategy is
>>> to put
>>> debugging in various places to confirm if things are running with the
>>> right
>>> values, or where they aren't, and narrow down to the spot where it goes
>>> wrong.
>>>
>>>
>>> --
>>> Dave Brondsema : dave@brondsema.net
>>> http://www.brondsema.net : personal
>>> http://www.splike.com : programming
>>>               <><
>>>
>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I have started to write a test case for Merge Requests Section. For that I
have followed ForgeGit tests but it doesn't work for me. I was trying to
create a merge request and see whether it appears in dashboard.

I've pushed the code into my fork
<https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/96613c7854d116130455a343c814e853c2b5d812/>.
Can you kindly take a look at that? Also, please let me know any debugging
process can be done for methods called internally when creating a merge
request.

Regards!

On Tue, Jul 17, 2018 at 11:19 PM Deshani Geethika <de...@gmail.com>
wrote:

> Hi Dave,
>
> Thank you for sharing these valuable information. I have added a merge
> request <https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
> Please review it and let me know any further improvements.
>
> Regards!
>
> On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net> wrote:
>
>> On 7/16/18 9:49 AM, Deshani Geethika wrote:
>> > Hi Dave,
>> >
>> > I have tried with adding above lines, but still doesn't work. Can you
>> take
>> > a look at my implementation
>> > <
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
>> >
>> > ?
>> >
>> > Thanks!
>> >
>>
>> Here's some debugging process I did, you can try it too:
>>
>> Tests use the MockSOLR class instead of a real solr instance (so that you
>> don't
>> need solr to run tests).  I knew that, so I started by going to
>> MockSOLR.search() and putting in some print statements to debug it.  At
>> the
>> beginning of search() I added:
>>
>>         print q
>>         print fq
>>
>> And inside the "for obj in self.db.values():" loop, I added "print obj"
>>
>> My idea was to see what query is happening and what the stored objects
>> are, and
>> see what's not working.  I ran just the single test with `nosetests
>>
>> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
>> I noticed there was a 'project_id_s' in the search query, and there
>> shouldn't
>> be.  But after a bit of trial & error to see what was happening, I
>> realized that
>> was coming from a "update_bin_count" background task, and that wasn't
>> related to
>> the test really.
>>
>> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
>> background
>> tasks for now and did it again, and there wasn't any of my print
>> statements
>> occurring.  So the dashboard ticket search wasn't even happening it seems.
>>
>> Then I printed the "response.html" variable to look at the whole
>> dashboard page
>> and I didn't see the Tickets section in it at all.  So indeed, that
>> section
>> isn't included in this test at all for some reason.
>>
>> Hopefully those are some helpful examples for this particular situation
>> and also
>> ideas for how to debug high level (like "is it even running?") and low
>> level (to
>> see where things might be not working).
>>
>> Next step of course is to figure out why in this test the dashboard
>> section
>> isn't even running.  I'll let you work on that.  My general strategy is
>> to put
>> debugging in various places to confirm if things are running with the
>> right
>> values, or where they aren't, and narrow down to the spot where it goes
>> wrong.
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

Thank you for sharing these valuable information. I have added a merge
request <https://forge-allura.apache.org/p/allura/git/merge-requests/269/>.
Please review it and let me know any further improvements.

Regards!

On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <da...@brondsema.net> wrote:

> On 7/16/18 9:49 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > I have tried with adding above lines, but still doesn't work. Can you
> take
> > a look at my implementation
> > <
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/
> >
> > ?
> >
> > Thanks!
> >
>
> Here's some debugging process I did, you can try it too:
>
> Tests use the MockSOLR class instead of a real solr instance (so that you
> don't
> need solr to run tests).  I knew that, so I started by going to
> MockSOLR.search() and putting in some print statements to debug it.  At the
> beginning of search() I added:
>
>         print q
>         print fq
>
> And inside the "for obj in self.db.values():" loop, I added "print obj"
>
> My idea was to see what query is happening and what the stored objects
> are, and
> see what's not working.  I ran just the single test with `nosetests
>
> allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
> I noticed there was a 'project_id_s' in the search query, and there
> shouldn't
> be.  But after a bit of trial & error to see what was happening, I
> realized that
> was coming from a "update_bin_count" background task, and that wasn't
> related to
> the test really.
>
> So I commented-out the tasks M.MonQTask.run_ready() to avoid all the
> background
> tasks for now and did it again, and there wasn't any of my print statements
> occurring.  So the dashboard ticket search wasn't even happening it seems.
>
> Then I printed the "response.html" variable to look at the whole dashboard
> page
> and I didn't see the Tickets section in it at all.  So indeed, that section
> isn't included in this test at all for some reason.
>
> Hopefully those are some helpful examples for this particular situation
> and also
> ideas for how to debug high level (like "is it even running?") and low
> level (to
> see where things might be not working).
>
> Next step of course is to figure out why in this test the dashboard section
> isn't even running.  I'll let you work on that.  My general strategy is to
> put
> debugging in various places to confirm if things are running with the right
> values, or where they aren't, and narrow down to the spot where it goes
> wrong.
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
On 7/16/18 9:49 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> I have tried with adding above lines, but still doesn't work. Can you take
> a look at my implementation
> <https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/>
> ?
> 
> Thanks!
> 

Here's some debugging process I did, you can try it too:

Tests use the MockSOLR class instead of a real solr instance (so that you don't
need solr to run tests).  I knew that, so I started by going to
MockSOLR.search() and putting in some print statements to debug it.  At the
beginning of search() I added:

        print q
        print fq

And inside the "for obj in self.db.values():" loop, I added "print obj"

My idea was to see what query is happening and what the stored objects are, and
see what's not working.  I ran just the single test with `nosetests
allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section`
I noticed there was a 'project_id_s' in the search query, and there shouldn't
be.  But after a bit of trial & error to see what was happening, I realized that
was coming from a "update_bin_count" background task, and that wasn't related to
the test really.

So I commented-out the tasks M.MonQTask.run_ready() to avoid all the background
tasks for now and did it again, and there wasn't any of my print statements
occurring.  So the dashboard ticket search wasn't even happening it seems.

Then I printed the "response.html" variable to look at the whole dashboard page
and I didn't see the Tickets section in it at all.  So indeed, that section
isn't included in this test at all for some reason.

Hopefully those are some helpful examples for this particular situation and also
ideas for how to debug high level (like "is it even running?") and low level (to
see where things might be not working).

Next step of course is to figure out why in this test the dashboard section
isn't even running.  I'll let you work on that.  My general strategy is to put
debugging in various places to confirm if things are running with the right
values, or where they aren't, and narrow down to the spot where it goes wrong.


-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I have tried with adding above lines, but still doesn't work. Can you take
a look at my implementation
<https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/>
?

Thanks!

On Fri, Jul 13, 2018 at 7:31 PM Dave Brondsema <da...@brondsema.net> wrote:

> My first thought is that it probably is not getting indexed in solr.  That
> runs
> in a background task, so during tests it won't happen automatically.  Try
> adding
> this:
>
>         ThreadLocalORMSession.flush_all()
>         M.MonQTask.run_ready()
>         ThreadLocalORMSession.flush_all()
>
> The run_ready() call will run the background tasks that are queued up.  The
> flush_all() lines might not be necessary, but I see them in other tests.
> You
> can try with and without them.  What they do is ensure all changes to
> models are
> flushed to mongo.
>
> Let me know if that doesn't help and I'll take a closer look.
>
> On 7/13/18 8:41 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > I have started to create a test case for Tickets Section.
> >
> > I was trying to create a new ticket and check whether it appears in
> > Dashboard, but it doesn't work. It seems like I've done something wrong
> > when creating new ticket.
> >
> > Could you kindly take a look at my implementation
> > <
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/56062d5c56aad503e022727b0dd5b67d37133b2e/
> >
> > and help me to sort out the issue?
> >
> > Thanks!
> >
> > On Thu, Jul 12, 2018 at 10:04 PM Deshani Geethika <
> deshanigeethika@gmail.com>
> > wrote:
> >
> >> Thanks. I'll start working on it and give you updates
> >>
> >> On Thu, Jul 12, 2018 at 8:57 PM Dave Brondsema <da...@brondsema.net>
> wrote:
> >>
> >>> I think it would be good to have a test of each of the sections.  At
> least
> >>> tickets & merge requests.  For projects and activity, they are very
> >>> similar &
> >>> re-use code from the profile sections.  So you could either copy the
> test
> >>> structure and have very similar tests to the user profile tests, or
> omit
> >>> the
> >>> tests for those.
> >>>
> >>> For tickets & merge requests I think good tests would create a few
> >>> tickets (or
> >>> merge requests) and then get the /dashboard URL and assert that they
> >>> showed up.
> >>> The ForgeTracker suite should have plenty of examples of making tickets
> >>> without
> >>> having to do mocking probably.  To make a merge request,
> >>> allura.tests.model.test_repo.TestMergeRequest has an abstract test that
> >>> uses
> >>> some mocking.  It'd be better though to use a more real merge request
> like
> >>> ForgeGit's tests do.
> >>>
> >>>
> >>> On 7/11/18 1:06 PM, Deshani Geethika wrote:
> >>>> Hi Dave,
> >>>>
> >>>> I've created a test case for Dashboard sections and added a merge
> >>> request
> >>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/268/>.
> >>> Please
> >>>> review it and let me know if any improvements required.
> >>>>
> >>>> Also, could you let me know what are the other functionalities should
> be
> >>>> tested in Dashboard?
> >>>>
> >>>> Regards!
> >>>>
> >>>> On Sat, Jul 7, 2018 at 1:55 AM Dave Brondsema <da...@brondsema.net>
> >>> wrote:
> >>>>
> >>>>> Hi.
> >>>>>
> >>>>> On profile pages, the self.project refers to that user-project
> >>> /u/brondsem
> >>>>> for
> >>>>> example.  You can get a reference to the same project in the
> dashboard
> >>> with
> >>>>> c.user.private_project()
> >>>>>
> >>>>> On another note, the title "My Followers" sounds like it would be
> >>> people
> >>>>> who
> >>>>> follow me, which isn't correct.  On profile pages (if you click to
> view
> >>>>> all) it
> >>>>> says "Activity from people you follow" which is lengthy but better.
> Or
> >>>>> just
> >>>>> "Activity" would be ok.
> >>>>>
> >>>>> -Dave
> >>>>>
> >>>>> On 7/6/18 3:13 PM, Deshani Geethika wrote:
> >>>>>> Hi Dave,
> >>>>>>
> >>>>>> I've started to work on Followers Section and pushed the current
> code
> >>> to
> >>>>> my
> >>>>>> fork. (
> >>>>>
> >>>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/6522ff400387f1b1143d27cdd3afd1a63a811785/
> >>>>>> )
> >>>>>>
> >>>>>> I need to create activity_app instance in class FollowersSection in
> >>>>>> allura/ext/personal_dashboard/dashboard_main.py. (Line #163).
> >>>>>>
> >>>>>> In class ForgeActivityProfileSection which is in
> >>> forgeactivity/main.py,
> >>>>> the
> >>>>>> activity_app instance is created by accessing project instance as
> >>>>>> self.activity_app
> >>>>>> = self.project.app_instance('activity'). (Line #278)
> >>>>>>
> >>>>>> How can I create activity_app instance in dashboard without a
> project
> >>>>>> instance?
> >>>>>>
> >>>>>> Regards!
> >>>>>>
> >>>>>> On Mon, Jul 2, 2018 at 5:21 PM Deshani Geethika <
> >>>>> deshanigeethika@gmail.com>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hi Dave,
> >>>>>>>
> >>>>>>> I've completed the Tickets section and added a merge request
> >>>>>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/264/>
> >>>>>>>
> >>>>>>> Please review it and let me know if any improvements required.
> >>>>>>>
> >>>>>>> Regards!
> >>>>>>>
> >>>>>>> On Fri, Jun 29, 2018 at 8:48 PM Deshani Geethika <
> >>>>>>> deshanigeethika@gmail.com> wrote:
> >>>>>>>
> >>>>>>>> Hi Dave,
> >>>>>>>>
> >>>>>>>> Thanks. I'm still working on it. Will give you an update soon.
> >>>>>>>>
> >>>>>>>> Regards!
> >>>>>>>>
> >>>>>>>> On Fri, Jun 29, 2018 at 7:45 PM Dave Brondsema <
> dave@brondsema.net>
> >>>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> Hey Deshani,
> >>>>>>>>>
> >>>>>>>>> Just wondering how things are going?  If you want to push your
> >>> current
> >>>>>>>>> branch,
> >>>>>>>>> and let me know if any questions or issues, I can offer some more
> >>>>> help.
> >>>>>>>>>
> >>>>>>>>> I am impressed with how much you've figured out on your own.  I'm
> >>> here
> >>>>>>>>> to mentor
> >>>>>>>>> and help though too :)
> >>>>>>>>>
> >>>>>>>>> -Dave
> >>>>>>>>>
> >>>>>>>>> On 6/27/18 12:07 AM, Deshani Geethika wrote:
> >>>>>>>>>> Thanks. I'll be there today at 11am EDT.
> >>>>>>>>>>
> >>>>>>>>>> On Tue, Jun 26, 2018 at 9:18 PM Dave Brondsema <
> >>> dave@brondsema.net
> >>>>>>>>>> <ma...@brondsema.net>> wrote:
> >>>>>>>>>>
> >>>>>>>>>>     Thanks, I've taken a look at the code to get familiar with
> it
> >>> and
> >>>>>>>>> have some
> >>>>>>>>>>     ideas.
> >>>>>>>>>>
> >>>>>>>>>>     Today I am available today much any time from now until 6pm
> >>> EDT.
> >>>>>>>>> Or tomorrow
> >>>>>>>>>>     10:30-12:00 and 1pm-6pm EDT.  What do you prefer?  We can
> >>> switch
> >>>>>>>>> over to chat to
> >>>>>>>>>>     coordinate too.
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>     On 6/26/18 4:04 AM, Deshani Geethika wrote:
> >>>>>>>>>>     > Hi Dave,
> >>>>>>>>>>     >
> >>>>>>>>>>     > I have pushed the current code into my fork.
> >>>>>>>>>>     >
> >>>>>>>>>>     (
> >>>>>>>>>
> >>>>>
> >>>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/0fe5a7d86e06283801cc7c21df70ba4dfa15927b/
> >>>>>>>>> )
> >>>>>>>>>>     >
> >>>>>>>>>>     > Please let me know a convenient slot to have a call.
> >>>>>>>>>>     >
> >>>>>>>>>>     > Regards!
> >>>>>>>>>>     >
> >>>>>>>>>>     > On Tue, Jun 26, 2018 at 6:49 AM Dave Brondsema <
> >>>>>>>>> dave@brondsema.net
> >>>>>>>>>>     <ma...@brondsema.net>
> >>>>>>>>>>     > <mailto:dave@brondsema.net <ma...@brondsema.net>>>
> >>>>> wrote:
> >>>>>>>>>>     >
> >>>>>>>>>>     >     Hey Deshani, do you want to do another video call?  If
> >>> you
> >>>>>>>>> want to
> >>>>>>>>>>     push your
> >>>>>>>>>>     >     current code to a branch then I could take a look at
> it
> >>>>> too,
> >>>>>>>>> and
> >>>>>>>>>>     understand what
> >>>>>>>>>>     >     you have so far.  Then we could do a video/screenshare
> >>>>> call,
> >>>>>>>>> continue with
> >>>>>>>>>>     >     emails, or do chats.  Whatever you prefer.
> >>>>>>>>>>     >
> >>>>>>>>>>     >     -Dave
> >>>>>>>>>>     >
> >>>>>>>>>>     >
> >>>>>>>>>>     >
> >>>>>>>>>>     > --
> >>>>>>>>>>     > *Deshani Geethika*
> >>>>>>>>>>     > Undergraduate at Department of Computer Science and
> >>> Engineering
> >>>>>>>>>>     > Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>>>>>>     > LinkedIn <https://www.linkedin.com/in/deshanigeethika/> |
> >>>>> GitHub
> >>>>>>>>>>     > <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>>>>>     >
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>     --
> >>>>>>>>>>     Dave Brondsema : dave@brondsema.net <mailto:
> >>> dave@brondsema.net>
> >>>>>>>>>>     http://www.brondsema.net : personal
> >>>>>>>>>>     http://www.splike.com : programming
> >>>>>>>>>>                   <><
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> *Deshani Geethika*
> >>>>>>>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> |
> GitHub
> >>>>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> --
> >>>>>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>>>>> http://www.brondsema.net : personal
> >>>>>>>>> http://www.splike.com : programming
> >>>>>>>>>               <><
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> *Deshani Geethika*
> >>>>>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> *Deshani Geethika*
> >>>>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Dave Brondsema : dave@brondsema.net
> >>>>> http://www.brondsema.net : personal
> >>>>> http://www.splike.com : programming
> >>>>>               <><
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Dave Brondsema : dave@brondsema.net
> >>> http://www.brondsema.net : personal
> >>> http://www.splike.com : programming
> >>>               <><
> >>>
> >>
> >>
> >> --
> >> *Deshani Geethika*
> >> Undergraduate at Department of Computer Science and Engineering
> >> Faculty of Engineering - University of Moratuwa Sri Lanka
> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>
> >>
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
My first thought is that it probably is not getting indexed in solr.  That runs
in a background task, so during tests it won't happen automatically.  Try adding
this:

        ThreadLocalORMSession.flush_all()
        M.MonQTask.run_ready()
        ThreadLocalORMSession.flush_all()

The run_ready() call will run the background tasks that are queued up.  The
flush_all() lines might not be necessary, but I see them in other tests.  You
can try with and without them.  What they do is ensure all changes to models are
flushed to mongo.

Let me know if that doesn't help and I'll take a closer look.

On 7/13/18 8:41 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> I have started to create a test case for Tickets Section.
> 
> I was trying to create a new ticket and check whether it appears in
> Dashboard, but it doesn't work. It seems like I've done something wrong
> when creating new ticket.
> 
> Could you kindly take a look at my implementation
> <https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/56062d5c56aad503e022727b0dd5b67d37133b2e/>
> and help me to sort out the issue?
> 
> Thanks!
> 
> On Thu, Jul 12, 2018 at 10:04 PM Deshani Geethika <de...@gmail.com>
> wrote:
> 
>> Thanks. I'll start working on it and give you updates
>>
>> On Thu, Jul 12, 2018 at 8:57 PM Dave Brondsema <da...@brondsema.net> wrote:
>>
>>> I think it would be good to have a test of each of the sections.  At least
>>> tickets & merge requests.  For projects and activity, they are very
>>> similar &
>>> re-use code from the profile sections.  So you could either copy the test
>>> structure and have very similar tests to the user profile tests, or omit
>>> the
>>> tests for those.
>>>
>>> For tickets & merge requests I think good tests would create a few
>>> tickets (or
>>> merge requests) and then get the /dashboard URL and assert that they
>>> showed up.
>>> The ForgeTracker suite should have plenty of examples of making tickets
>>> without
>>> having to do mocking probably.  To make a merge request,
>>> allura.tests.model.test_repo.TestMergeRequest has an abstract test that
>>> uses
>>> some mocking.  It'd be better though to use a more real merge request like
>>> ForgeGit's tests do.
>>>
>>>
>>> On 7/11/18 1:06 PM, Deshani Geethika wrote:
>>>> Hi Dave,
>>>>
>>>> I've created a test case for Dashboard sections and added a merge
>>> request
>>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/268/>.
>>> Please
>>>> review it and let me know if any improvements required.
>>>>
>>>> Also, could you let me know what are the other functionalities should be
>>>> tested in Dashboard?
>>>>
>>>> Regards!
>>>>
>>>> On Sat, Jul 7, 2018 at 1:55 AM Dave Brondsema <da...@brondsema.net>
>>> wrote:
>>>>
>>>>> Hi.
>>>>>
>>>>> On profile pages, the self.project refers to that user-project
>>> /u/brondsem
>>>>> for
>>>>> example.  You can get a reference to the same project in the dashboard
>>> with
>>>>> c.user.private_project()
>>>>>
>>>>> On another note, the title "My Followers" sounds like it would be
>>> people
>>>>> who
>>>>> follow me, which isn't correct.  On profile pages (if you click to view
>>>>> all) it
>>>>> says "Activity from people you follow" which is lengthy but better.  Or
>>>>> just
>>>>> "Activity" would be ok.
>>>>>
>>>>> -Dave
>>>>>
>>>>> On 7/6/18 3:13 PM, Deshani Geethika wrote:
>>>>>> Hi Dave,
>>>>>>
>>>>>> I've started to work on Followers Section and pushed the current code
>>> to
>>>>> my
>>>>>> fork. (
>>>>>
>>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/6522ff400387f1b1143d27cdd3afd1a63a811785/
>>>>>> )
>>>>>>
>>>>>> I need to create activity_app instance in class FollowersSection in
>>>>>> allura/ext/personal_dashboard/dashboard_main.py. (Line #163).
>>>>>>
>>>>>> In class ForgeActivityProfileSection which is in
>>> forgeactivity/main.py,
>>>>> the
>>>>>> activity_app instance is created by accessing project instance as
>>>>>> self.activity_app
>>>>>> = self.project.app_instance('activity'). (Line #278)
>>>>>>
>>>>>> How can I create activity_app instance in dashboard without a project
>>>>>> instance?
>>>>>>
>>>>>> Regards!
>>>>>>
>>>>>> On Mon, Jul 2, 2018 at 5:21 PM Deshani Geethika <
>>>>> deshanigeethika@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> I've completed the Tickets section and added a merge request
>>>>>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/264/>
>>>>>>>
>>>>>>> Please review it and let me know if any improvements required.
>>>>>>>
>>>>>>> Regards!
>>>>>>>
>>>>>>> On Fri, Jun 29, 2018 at 8:48 PM Deshani Geethika <
>>>>>>> deshanigeethika@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Dave,
>>>>>>>>
>>>>>>>> Thanks. I'm still working on it. Will give you an update soon.
>>>>>>>>
>>>>>>>> Regards!
>>>>>>>>
>>>>>>>> On Fri, Jun 29, 2018 at 7:45 PM Dave Brondsema <da...@brondsema.net>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hey Deshani,
>>>>>>>>>
>>>>>>>>> Just wondering how things are going?  If you want to push your
>>> current
>>>>>>>>> branch,
>>>>>>>>> and let me know if any questions or issues, I can offer some more
>>>>> help.
>>>>>>>>>
>>>>>>>>> I am impressed with how much you've figured out on your own.  I'm
>>> here
>>>>>>>>> to mentor
>>>>>>>>> and help though too :)
>>>>>>>>>
>>>>>>>>> -Dave
>>>>>>>>>
>>>>>>>>> On 6/27/18 12:07 AM, Deshani Geethika wrote:
>>>>>>>>>> Thanks. I'll be there today at 11am EDT.
>>>>>>>>>>
>>>>>>>>>> On Tue, Jun 26, 2018 at 9:18 PM Dave Brondsema <
>>> dave@brondsema.net
>>>>>>>>>> <ma...@brondsema.net>> wrote:
>>>>>>>>>>
>>>>>>>>>>     Thanks, I've taken a look at the code to get familiar with it
>>> and
>>>>>>>>> have some
>>>>>>>>>>     ideas.
>>>>>>>>>>
>>>>>>>>>>     Today I am available today much any time from now until 6pm
>>> EDT.
>>>>>>>>> Or tomorrow
>>>>>>>>>>     10:30-12:00 and 1pm-6pm EDT.  What do you prefer?  We can
>>> switch
>>>>>>>>> over to chat to
>>>>>>>>>>     coordinate too.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>     On 6/26/18 4:04 AM, Deshani Geethika wrote:
>>>>>>>>>>     > Hi Dave,
>>>>>>>>>>     >
>>>>>>>>>>     > I have pushed the current code into my fork.
>>>>>>>>>>     >
>>>>>>>>>>     (
>>>>>>>>>
>>>>>
>>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/0fe5a7d86e06283801cc7c21df70ba4dfa15927b/
>>>>>>>>> )
>>>>>>>>>>     >
>>>>>>>>>>     > Please let me know a convenient slot to have a call.
>>>>>>>>>>     >
>>>>>>>>>>     > Regards!
>>>>>>>>>>     >
>>>>>>>>>>     > On Tue, Jun 26, 2018 at 6:49 AM Dave Brondsema <
>>>>>>>>> dave@brondsema.net
>>>>>>>>>>     <ma...@brondsema.net>
>>>>>>>>>>     > <mailto:dave@brondsema.net <ma...@brondsema.net>>>
>>>>> wrote:
>>>>>>>>>>     >
>>>>>>>>>>     >     Hey Deshani, do you want to do another video call?  If
>>> you
>>>>>>>>> want to
>>>>>>>>>>     push your
>>>>>>>>>>     >     current code to a branch then I could take a look at it
>>>>> too,
>>>>>>>>> and
>>>>>>>>>>     understand what
>>>>>>>>>>     >     you have so far.  Then we could do a video/screenshare
>>>>> call,
>>>>>>>>> continue with
>>>>>>>>>>     >     emails, or do chats.  Whatever you prefer.
>>>>>>>>>>     >
>>>>>>>>>>     >     -Dave
>>>>>>>>>>     >
>>>>>>>>>>     >
>>>>>>>>>>     >
>>>>>>>>>>     > --
>>>>>>>>>>     > *Deshani Geethika*
>>>>>>>>>>     > Undergraduate at Department of Computer Science and
>>> Engineering
>>>>>>>>>>     > Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>>>>>     > LinkedIn <https://www.linkedin.com/in/deshanigeethika/> |
>>>>> GitHub
>>>>>>>>>>     > <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>>>>     >
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>     --
>>>>>>>>>>     Dave Brondsema : dave@brondsema.net <mailto:
>>> dave@brondsema.net>
>>>>>>>>>>     http://www.brondsema.net : personal
>>>>>>>>>>     http://www.splike.com : programming
>>>>>>>>>>                   <><
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> *Deshani Geethika*
>>>>>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>>>> http://www.brondsema.net : personal
>>>>>>>>> http://www.splike.com : programming
>>>>>>>>>               <><
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Deshani Geethika*
>>>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Deshani Geethika*
>>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Brondsema : dave@brondsema.net
>>>>> http://www.brondsema.net : personal
>>>>> http://www.splike.com : programming
>>>>>               <><
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Dave Brondsema : dave@brondsema.net
>>> http://www.brondsema.net : personal
>>> http://www.splike.com : programming
>>>               <><
>>>
>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I have started to create a test case for Tickets Section.

I was trying to create a new ticket and check whether it appears in
Dashboard, but it doesn't work. It seems like I've done something wrong
when creating new ticket.

Could you kindly take a look at my implementation
<https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/56062d5c56aad503e022727b0dd5b67d37133b2e/>
and help me to sort out the issue?

Thanks!

On Thu, Jul 12, 2018 at 10:04 PM Deshani Geethika <de...@gmail.com>
wrote:

> Thanks. I'll start working on it and give you updates
>
> On Thu, Jul 12, 2018 at 8:57 PM Dave Brondsema <da...@brondsema.net> wrote:
>
>> I think it would be good to have a test of each of the sections.  At least
>> tickets & merge requests.  For projects and activity, they are very
>> similar &
>> re-use code from the profile sections.  So you could either copy the test
>> structure and have very similar tests to the user profile tests, or omit
>> the
>> tests for those.
>>
>> For tickets & merge requests I think good tests would create a few
>> tickets (or
>> merge requests) and then get the /dashboard URL and assert that they
>> showed up.
>> The ForgeTracker suite should have plenty of examples of making tickets
>> without
>> having to do mocking probably.  To make a merge request,
>> allura.tests.model.test_repo.TestMergeRequest has an abstract test that
>> uses
>> some mocking.  It'd be better though to use a more real merge request like
>> ForgeGit's tests do.
>>
>>
>> On 7/11/18 1:06 PM, Deshani Geethika wrote:
>> > Hi Dave,
>> >
>> > I've created a test case for Dashboard sections and added a merge
>> request
>> > <https://forge-allura.apache.org/p/allura/git/merge-requests/268/>.
>> Please
>> > review it and let me know if any improvements required.
>> >
>> > Also, could you let me know what are the other functionalities should be
>> > tested in Dashboard?
>> >
>> > Regards!
>> >
>> > On Sat, Jul 7, 2018 at 1:55 AM Dave Brondsema <da...@brondsema.net>
>> wrote:
>> >
>> >> Hi.
>> >>
>> >> On profile pages, the self.project refers to that user-project
>> /u/brondsem
>> >> for
>> >> example.  You can get a reference to the same project in the dashboard
>> with
>> >> c.user.private_project()
>> >>
>> >> On another note, the title "My Followers" sounds like it would be
>> people
>> >> who
>> >> follow me, which isn't correct.  On profile pages (if you click to view
>> >> all) it
>> >> says "Activity from people you follow" which is lengthy but better.  Or
>> >> just
>> >> "Activity" would be ok.
>> >>
>> >> -Dave
>> >>
>> >> On 7/6/18 3:13 PM, Deshani Geethika wrote:
>> >>> Hi Dave,
>> >>>
>> >>> I've started to work on Followers Section and pushed the current code
>> to
>> >> my
>> >>> fork. (
>> >>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/6522ff400387f1b1143d27cdd3afd1a63a811785/
>> >>> )
>> >>>
>> >>> I need to create activity_app instance in class FollowersSection in
>> >>> allura/ext/personal_dashboard/dashboard_main.py. (Line #163).
>> >>>
>> >>> In class ForgeActivityProfileSection which is in
>> forgeactivity/main.py,
>> >> the
>> >>> activity_app instance is created by accessing project instance as
>> >>> self.activity_app
>> >>> = self.project.app_instance('activity'). (Line #278)
>> >>>
>> >>> How can I create activity_app instance in dashboard without a project
>> >>> instance?
>> >>>
>> >>> Regards!
>> >>>
>> >>> On Mon, Jul 2, 2018 at 5:21 PM Deshani Geethika <
>> >> deshanigeethika@gmail.com>
>> >>> wrote:
>> >>>
>> >>>> Hi Dave,
>> >>>>
>> >>>> I've completed the Tickets section and added a merge request
>> >>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/264/>
>> >>>>
>> >>>> Please review it and let me know if any improvements required.
>> >>>>
>> >>>> Regards!
>> >>>>
>> >>>> On Fri, Jun 29, 2018 at 8:48 PM Deshani Geethika <
>> >>>> deshanigeethika@gmail.com> wrote:
>> >>>>
>> >>>>> Hi Dave,
>> >>>>>
>> >>>>> Thanks. I'm still working on it. Will give you an update soon.
>> >>>>>
>> >>>>> Regards!
>> >>>>>
>> >>>>> On Fri, Jun 29, 2018 at 7:45 PM Dave Brondsema <da...@brondsema.net>
>> >>>>> wrote:
>> >>>>>
>> >>>>>> Hey Deshani,
>> >>>>>>
>> >>>>>> Just wondering how things are going?  If you want to push your
>> current
>> >>>>>> branch,
>> >>>>>> and let me know if any questions or issues, I can offer some more
>> >> help.
>> >>>>>>
>> >>>>>> I am impressed with how much you've figured out on your own.  I'm
>> here
>> >>>>>> to mentor
>> >>>>>> and help though too :)
>> >>>>>>
>> >>>>>> -Dave
>> >>>>>>
>> >>>>>> On 6/27/18 12:07 AM, Deshani Geethika wrote:
>> >>>>>>> Thanks. I'll be there today at 11am EDT.
>> >>>>>>>
>> >>>>>>> On Tue, Jun 26, 2018 at 9:18 PM Dave Brondsema <
>> dave@brondsema.net
>> >>>>>>> <ma...@brondsema.net>> wrote:
>> >>>>>>>
>> >>>>>>>     Thanks, I've taken a look at the code to get familiar with it
>> and
>> >>>>>> have some
>> >>>>>>>     ideas.
>> >>>>>>>
>> >>>>>>>     Today I am available today much any time from now until 6pm
>> EDT.
>> >>>>>> Or tomorrow
>> >>>>>>>     10:30-12:00 and 1pm-6pm EDT.  What do you prefer?  We can
>> switch
>> >>>>>> over to chat to
>> >>>>>>>     coordinate too.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>     On 6/26/18 4:04 AM, Deshani Geethika wrote:
>> >>>>>>>     > Hi Dave,
>> >>>>>>>     >
>> >>>>>>>     > I have pushed the current code into my fork.
>> >>>>>>>     >
>> >>>>>>>     (
>> >>>>>>
>> >>
>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/0fe5a7d86e06283801cc7c21df70ba4dfa15927b/
>> >>>>>> )
>> >>>>>>>     >
>> >>>>>>>     > Please let me know a convenient slot to have a call.
>> >>>>>>>     >
>> >>>>>>>     > Regards!
>> >>>>>>>     >
>> >>>>>>>     > On Tue, Jun 26, 2018 at 6:49 AM Dave Brondsema <
>> >>>>>> dave@brondsema.net
>> >>>>>>>     <ma...@brondsema.net>
>> >>>>>>>     > <mailto:dave@brondsema.net <ma...@brondsema.net>>>
>> >> wrote:
>> >>>>>>>     >
>> >>>>>>>     >     Hey Deshani, do you want to do another video call?  If
>> you
>> >>>>>> want to
>> >>>>>>>     push your
>> >>>>>>>     >     current code to a branch then I could take a look at it
>> >> too,
>> >>>>>> and
>> >>>>>>>     understand what
>> >>>>>>>     >     you have so far.  Then we could do a video/screenshare
>> >> call,
>> >>>>>> continue with
>> >>>>>>>     >     emails, or do chats.  Whatever you prefer.
>> >>>>>>>     >
>> >>>>>>>     >     -Dave
>> >>>>>>>     >
>> >>>>>>>     >
>> >>>>>>>     >
>> >>>>>>>     > --
>> >>>>>>>     > *Deshani Geethika*
>> >>>>>>>     > Undergraduate at Department of Computer Science and
>> Engineering
>> >>>>>>>     > Faculty of Engineering - University of Moratuwa Sri Lanka
>> >>>>>>>     > LinkedIn <https://www.linkedin.com/in/deshanigeethika/> |
>> >> GitHub
>> >>>>>>>     > <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>>>>>>     >
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>     --
>> >>>>>>>     Dave Brondsema : dave@brondsema.net <mailto:
>> dave@brondsema.net>
>> >>>>>>>     http://www.brondsema.net : personal
>> >>>>>>>     http://www.splike.com : programming
>> >>>>>>>                   <><
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> --
>> >>>>>>> *Deshani Geethika*
>> >>>>>>> Undergraduate at Department of Computer Science and Engineering
>> >>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> >>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> >>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> --
>> >>>>>> Dave Brondsema : dave@brondsema.net
>> >>>>>> http://www.brondsema.net : personal
>> >>>>>> http://www.splike.com : programming
>> >>>>>>               <><
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>> --
>> >>>>> *Deshani Geethika*
>> >>>>> Undergraduate at Department of Computer Science and Engineering
>> >>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> >>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> >>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> --
>> >>>> *Deshani Geethika*
>> >>>> Undergraduate at Department of Computer Science and Engineering
>> >>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> >>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> >>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>>>
>> >>>>
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Dave Brondsema : dave@brondsema.net
>> >> http://www.brondsema.net : personal
>> >> http://www.splike.com : programming
>> >>               <><
>> >>
>> >
>> >
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I've created a test case for Dashboard sections and added a merge request
<https://forge-allura.apache.org/p/allura/git/merge-requests/268/>. Please
review it and let me know if any improvements required.

Also, could you let me know what are the other functionalities should be
tested in Dashboard?

Regards!

On Sat, Jul 7, 2018 at 1:55 AM Dave Brondsema <da...@brondsema.net> wrote:

> Hi.
>
> On profile pages, the self.project refers to that user-project /u/brondsem
> for
> example.  You can get a reference to the same project in the dashboard with
> c.user.private_project()
>
> On another note, the title "My Followers" sounds like it would be people
> who
> follow me, which isn't correct.  On profile pages (if you click to view
> all) it
> says "Activity from people you follow" which is lengthy but better.  Or
> just
> "Activity" would be ok.
>
> -Dave
>
> On 7/6/18 3:13 PM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > I've started to work on Followers Section and pushed the current code to
> my
> > fork. (
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/6522ff400387f1b1143d27cdd3afd1a63a811785/
> > )
> >
> > I need to create activity_app instance in class FollowersSection in
> > allura/ext/personal_dashboard/dashboard_main.py. (Line #163).
> >
> > In class ForgeActivityProfileSection which is in forgeactivity/main.py,
> the
> > activity_app instance is created by accessing project instance as
> > self.activity_app
> > = self.project.app_instance('activity'). (Line #278)
> >
> > How can I create activity_app instance in dashboard without a project
> > instance?
> >
> > Regards!
> >
> > On Mon, Jul 2, 2018 at 5:21 PM Deshani Geethika <
> deshanigeethika@gmail.com>
> > wrote:
> >
> >> Hi Dave,
> >>
> >> I've completed the Tickets section and added a merge request
> >> <https://forge-allura.apache.org/p/allura/git/merge-requests/264/>
> >>
> >> Please review it and let me know if any improvements required.
> >>
> >> Regards!
> >>
> >> On Fri, Jun 29, 2018 at 8:48 PM Deshani Geethika <
> >> deshanigeethika@gmail.com> wrote:
> >>
> >>> Hi Dave,
> >>>
> >>> Thanks. I'm still working on it. Will give you an update soon.
> >>>
> >>> Regards!
> >>>
> >>> On Fri, Jun 29, 2018 at 7:45 PM Dave Brondsema <da...@brondsema.net>
> >>> wrote:
> >>>
> >>>> Hey Deshani,
> >>>>
> >>>> Just wondering how things are going?  If you want to push your current
> >>>> branch,
> >>>> and let me know if any questions or issues, I can offer some more
> help.
> >>>>
> >>>> I am impressed with how much you've figured out on your own.  I'm here
> >>>> to mentor
> >>>> and help though too :)
> >>>>
> >>>> -Dave
> >>>>
> >>>> On 6/27/18 12:07 AM, Deshani Geethika wrote:
> >>>>> Thanks. I'll be there today at 11am EDT.
> >>>>>
> >>>>> On Tue, Jun 26, 2018 at 9:18 PM Dave Brondsema <dave@brondsema.net
> >>>>> <ma...@brondsema.net>> wrote:
> >>>>>
> >>>>>     Thanks, I've taken a look at the code to get familiar with it and
> >>>> have some
> >>>>>     ideas.
> >>>>>
> >>>>>     Today I am available today much any time from now until 6pm EDT.
> >>>> Or tomorrow
> >>>>>     10:30-12:00 and 1pm-6pm EDT.  What do you prefer?  We can switch
> >>>> over to chat to
> >>>>>     coordinate too.
> >>>>>
> >>>>>
> >>>>>     On 6/26/18 4:04 AM, Deshani Geethika wrote:
> >>>>>     > Hi Dave,
> >>>>>     >
> >>>>>     > I have pushed the current code into my fork.
> >>>>>     >
> >>>>>     (
> >>>>
> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/0fe5a7d86e06283801cc7c21df70ba4dfa15927b/
> >>>> )
> >>>>>     >
> >>>>>     > Please let me know a convenient slot to have a call.
> >>>>>     >
> >>>>>     > Regards!
> >>>>>     >
> >>>>>     > On Tue, Jun 26, 2018 at 6:49 AM Dave Brondsema <
> >>>> dave@brondsema.net
> >>>>>     <ma...@brondsema.net>
> >>>>>     > <mailto:dave@brondsema.net <ma...@brondsema.net>>>
> wrote:
> >>>>>     >
> >>>>>     >     Hey Deshani, do you want to do another video call?  If you
> >>>> want to
> >>>>>     push your
> >>>>>     >     current code to a branch then I could take a look at it
> too,
> >>>> and
> >>>>>     understand what
> >>>>>     >     you have so far.  Then we could do a video/screenshare
> call,
> >>>> continue with
> >>>>>     >     emails, or do chats.  Whatever you prefer.
> >>>>>     >
> >>>>>     >     -Dave
> >>>>>     >
> >>>>>     >
> >>>>>     >
> >>>>>     > --
> >>>>>     > *Deshani Geethika*
> >>>>>     > Undergraduate at Department of Computer Science and Engineering
> >>>>>     > Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>     > LinkedIn <https://www.linkedin.com/in/deshanigeethika/> |
> GitHub
> >>>>>     > <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>     >
> >>>>>
> >>>>>
> >>>>>
> >>>>>     --
> >>>>>     Dave Brondsema : dave@brondsema.net <ma...@brondsema.net>
> >>>>>     http://www.brondsema.net : personal
> >>>>>     http://www.splike.com : programming
> >>>>>                   <><
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> *Deshani Geethika*
> >>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Dave Brondsema : dave@brondsema.net
> >>>> http://www.brondsema.net : personal
> >>>> http://www.splike.com : programming
> >>>>               <><
> >>>>
> >>>
> >>>
> >>> --
> >>> *Deshani Geethika*
> >>> Undergraduate at Department of Computer Science and Engineering
> >>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>
> >>>
> >>
> >> --
> >> *Deshani Geethika*
> >> Undergraduate at Department of Computer Science and Engineering
> >> Faculty of Engineering - University of Moratuwa Sri Lanka
> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>
> >>
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I've started to work on Followers Section and pushed the current code to my
fork. (https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/6522ff400387f1b1143d27cdd3afd1a63a811785/
)

I need to create activity_app instance in class FollowersSection in
allura/ext/personal_dashboard/dashboard_main.py. (Line #163).

In class ForgeActivityProfileSection which is in forgeactivity/main.py, the
activity_app instance is created by accessing project instance as
self.activity_app
= self.project.app_instance('activity'). (Line #278)

How can I create activity_app instance in dashboard without a project
instance?

Regards!

On Mon, Jul 2, 2018 at 5:21 PM Deshani Geethika <de...@gmail.com>
wrote:

> Hi Dave,
>
> I've completed the Tickets section and added a merge request
> <https://forge-allura.apache.org/p/allura/git/merge-requests/264/>
>
> Please review it and let me know if any improvements required.
>
> Regards!
>
> On Fri, Jun 29, 2018 at 8:48 PM Deshani Geethika <
> deshanigeethika@gmail.com> wrote:
>
>> Hi Dave,
>>
>> Thanks. I'm still working on it. Will give you an update soon.
>>
>> Regards!
>>
>> On Fri, Jun 29, 2018 at 7:45 PM Dave Brondsema <da...@brondsema.net>
>> wrote:
>>
>>> Hey Deshani,
>>>
>>> Just wondering how things are going?  If you want to push your current
>>> branch,
>>> and let me know if any questions or issues, I can offer some more help.
>>>
>>> I am impressed with how much you've figured out on your own.  I'm here
>>> to mentor
>>> and help though too :)
>>>
>>> -Dave
>>>
>>> On 6/27/18 12:07 AM, Deshani Geethika wrote:
>>> > Thanks. I'll be there today at 11am EDT.
>>> >
>>> > On Tue, Jun 26, 2018 at 9:18 PM Dave Brondsema <dave@brondsema.net
>>> > <ma...@brondsema.net>> wrote:
>>> >
>>> >     Thanks, I've taken a look at the code to get familiar with it and
>>> have some
>>> >     ideas.
>>> >
>>> >     Today I am available today much any time from now until 6pm EDT.
>>> Or tomorrow
>>> >     10:30-12:00 and 1pm-6pm EDT.  What do you prefer?  We can switch
>>> over to chat to
>>> >     coordinate too.
>>> >
>>> >
>>> >     On 6/26/18 4:04 AM, Deshani Geethika wrote:
>>> >     > Hi Dave,
>>> >     >
>>> >     > I have pushed the current code into my fork.
>>> >     >
>>> >     (
>>> https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/0fe5a7d86e06283801cc7c21df70ba4dfa15927b/
>>> )
>>> >     >
>>> >     > Please let me know a convenient slot to have a call.
>>> >     >
>>> >     > Regards!
>>> >     >
>>> >     > On Tue, Jun 26, 2018 at 6:49 AM Dave Brondsema <
>>> dave@brondsema.net
>>> >     <ma...@brondsema.net>
>>> >     > <mailto:dave@brondsema.net <ma...@brondsema.net>>> wrote:
>>> >     >
>>> >     >     Hey Deshani, do you want to do another video call?  If you
>>> want to
>>> >     push your
>>> >     >     current code to a branch then I could take a look at it too,
>>> and
>>> >     understand what
>>> >     >     you have so far.  Then we could do a video/screenshare call,
>>> continue with
>>> >     >     emails, or do chats.  Whatever you prefer.
>>> >     >
>>> >     >     -Dave
>>> >     >
>>> >     >
>>> >     >
>>> >     > --
>>> >     > *Deshani Geethika*
>>> >     > Undergraduate at Department of Computer Science and Engineering
>>> >     > Faculty of Engineering - University of Moratuwa Sri Lanka
>>> >     > LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>> >     > <https://github.com/deshanigtk> | Mobile - +94776383034
>>> >     >
>>> >
>>> >
>>> >
>>> >     --
>>> >     Dave Brondsema : dave@brondsema.net <ma...@brondsema.net>
>>> >     http://www.brondsema.net : personal
>>> >     http://www.splike.com : programming
>>> >                   <><
>>> >
>>> >
>>> >
>>> > --
>>> > *Deshani Geethika*
>>> > Undergraduate at Department of Computer Science and Engineering
>>> > Faculty of Engineering - University of Moratuwa Sri Lanka
>>> > LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>> > <https://github.com/deshanigtk> | Mobile - +94776383034
>>> >
>>>
>>>
>>>
>>> --
>>> Dave Brondsema : dave@brondsema.net
>>> http://www.brondsema.net : personal
>>> http://www.splike.com : programming
>>>               <><
>>>
>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I've modified the paged_search method and now it is working for dashboard
too. But I have some confusions how to call this method to load tickets to
UI. Could you help me to sort this out?

Regards!

On Fri, Jun 22, 2018 at 8:08 AM Deshani Geethika <de...@gmail.com>
wrote:

> Thanks a lot. Will give a try and let you know
>
> On Thu, Jun 21, 2018 at 11:36 PM Dave Brondsema <da...@brondsema.net>
> wrote:
>
>> Sounds good, pagination is definitely important if people have a lot of
>> tickets.
>>  In the ForgeTracker tool forgetracker/model/ticket.py there are methods
>> paged_search() and paged_query() which might be good reference points.
>> It looks
>> like they probably can't be re-used directly, since they expect an
>> app_config,
>> and the dashboard will search across all ticket tracker apps.  It also
>> supports
>> filtering and search terms that aren't needed.  But it might be useful.
>>
>> There's other things in the ForgeTracker that might be useful too.  Like
>> listing
>> the results with the TicketSearchResults class and
>> ticket_search_results.html
>> template.  Again, those have things like filtering, configurable columns,
>> etc
>> that aren't necessary on the dashboard.  But it could be a good reference
>> for
>> how paging is used, etc.
>>
>> I would recommend using a solr search rather than a mongo query to find
>> the
>> tickets.  That is because the Ticket class does not have a mongo index
>> for the
>> submitter, and so querying by submitter could be very slow when there are
>> thousands and thousands of tickets.  Searching with solr also would also
>> let us
>> support people filtering & searching their own tickets list, in the
>> future if we
>> wanted to do that (not necessary this summer).
>>
>> On 6/21/18 12:11 PM, Deshani Geethika wrote:
>> > Hi Dave,
>> >
>> > Currently I'm working on creating "Tickets Section" of Dashboard. I have
>> > implemented to load all of the tickets at once, but I thought to
>> paginate
>> > this and I'm working on it.
>> >
>> > Will give you an update soon. If you have any suggestions please let me
>> > know.
>> >
>> > Regards!
>> >
>> > On Thu, Jun 14, 2018 at 12:22 AM Deshani Geethika <
>> deshanigeethika@gmail.com>
>> > wrote:
>> >
>> >> Hi Dave,
>> >>
>> >> Thanks for reviewing and merging the above requests.
>> >>
>> >> I've created a helper method to avoid code duplication in
>> >> DashboardController.index and UserProfileApp.profile_sections, and
>> added a merge
>> >> request <
>> https://forge-allura.apache.org/p/allura/git/merge-requests/259/>
>> >> .
>> >>
>> >> Please review it and let me know if any improvements required.
>> >>
>> >> Regards!
>> >>
>> >> On Tue, Jun 12, 2018 at 1:20 AM Deshani Geethika <
>> >> deshanigeethika@gmail.com> wrote:
>> >>
>> >>> Hi Dave,
>> >>>
>> >>> I've updated the above merge request
>> >>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>,
>> as
>> >>> I've fixed an issue in a template.
>> >>>
>> >>> Meanwhile, I started a new branch for dashboard tests and added a
>> simple
>> >>> test to check '/dashboard' route. I've created a new merge request
>> >>> <https://forge-allura.apache.org/p/allura/git/merge-requests/258/>
>> for
>> >>> this. Please review it and let me know if any improvements required.
>> >>>
>> >>> Regards!
>> >>>
>> >>> On Sat, Jun 9, 2018 at 12:07 PM Deshani Geethika <
>> >>> deshanigeethika@gmail.com> wrote:
>> >>>
>> >>>> Hi Dave,
>> >>>>
>> >>>> Thanks for the clarifications :)
>> >>>>
>> >>>> I've fixed the issues with test cases and updated the merge request
>> >>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>.
>> >>>> Please review it and let me know if any improvements required
>> >>>>
>> >>>> Regards!
>> >>>>
>> >>>> On Wed, Jun 6, 2018 at 8:56 PM Dave Brondsema <da...@brondsema.net>
>> >>>> wrote:
>> >>>>
>> >>>>> On 6/6/18 5:37 AM, Deshani Geethika wrote:
>> >>>>>> Hi Dave,
>> >>>>>>
>> >>>>>> I need some help in understanding an error related to test cases.
>> >>>>>>
>> >>>>>> I was trying to write a test case to check the '/neighborhood'
>> route
>> >>>>> in
>> >>>>>> Allura/allura/tests/functional/test_root.py as below.
>> >>>>>>
>> >>>>>>     def test_neighborhood(self):
>> >>>>>>>         response = self.app.get('/neighborhood/')
>> >>>>>>
>> >>>>>>
>> >>>>>> But I get the following error, when I run the above test case.
>> >>>>>>
>> >>>>>> Traceback (most recent call last):
>> >>>>>>>   File
>> >>>>>>>
>> >>>>>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
>> >>>>>>> line 197, in runTest
>> >>>>>>>     self.test(*self.arg)
>> >>>>>>>   File
>> >>>>>>>
>> >>>>>
>> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
>> >>>>>>> line 58, in test_neighborhood
>> >>>>>>>     response = self.app.get('/neighborhood/')
>> >>>>>>>   File
>> >>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>> >>>>>>> line 322, in get
>> >>>>>>>     resp = super(ValidatingTestApp, self).get(*args, **kw)
>> >>>>>>>   File
>> >>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>> >>>>>>> line 269, in get
>> >>>>>>>     return super(PostParamCheckingTestApp, self).get(*args,
>> **kwargs)
>> >>>>>>>   File
>> >>>>>>>
>> >>>>>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> >>>>>>> line 756, in get
>> >>>>>>>     expect_errors=expect_errors)
>> >>>>>>>   File
>> >>>>>>>
>> >>>>>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> >>>>>>> line 1118, in do_request
>> >>>>>>>     self._check_status(status, res)
>> >>>>>>>   File
>> >>>>>>>
>> >>>>>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> >>>>>>> line 1154, in _check_status
>> >>>>>>>     res)
>> >>>>>>> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect
>> for
>> >>>>>>> http://localhost/neighborhood/)
>> >>>>>>
>> >>>>>>
>> >>>>>> Can you help me to understand why this error comes up?
>> >>>>>>
>> >>>>>> Regards!
>> >>>>>
>> >>>>>
>> >>>>> Wow, this was a tricky one!  I was stumped about this for a while
>> too.
>> >>>>> Its
>> >>>>> happening because of some helper code for tests, that is not very
>> >>>>> obvious.  In
>> >>>>> Allura/allura/controllers/basetest_project_root.py a modified root
>> >>>>> controller is
>> >>>>> used for tests, which makes some project & tool testing easier.
>> This
>> >>>>> controller
>> >>>>> is used because test.ini specifies
>> "override_root=basetest_project_root"
>> >>>>>
>> >>>>> And then in this controller on line 71 there is a list of root
>> >>>>> controller
>> >>>>> attributes that is hardcoded.  So you will have to add
>> 'neighborhood'
>> >>>>> and
>> >>>>> 'dashboard' to that list.
>> >>>>>
>> >>>>> I would also recommend adding a comment on the real RootController
>> >>>>> mentioning
>> >>>>> the BasetestProjectRootController so that anyone else in the future
>> who
>> >>>>> adds a
>> >>>>> root url knows that they have to update the other place too.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> --
>> >>>>> Dave Brondsema : dave@brondsema.net
>> >>>>> http://www.brondsema.net : personal
>> >>>>> http://www.splike.com : programming
>> >>>>>               <><
>> >>>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> *Deshani Geethika*
>> >>>> Undergraduate at Department of Computer Science and Engineering
>> >>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> >>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> >>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>>>
>> >>>>
>> >>>
>> >>> --
>> >>> *Deshani Geethika*
>> >>> Undergraduate at Department of Computer Science and Engineering
>> >>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> >>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> >>> <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>>
>> >>>
>> >>
>> >> --
>> >> *Deshani Geethika*
>> >> Undergraduate at Department of Computer Science and Engineering
>> >> Faculty of Engineering - University of Moratuwa Sri Lanka
>> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> >> <https://github.com/deshanigtk> | Mobile - +94776383034
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Thanks a lot. Will give a try and let you know

On Thu, Jun 21, 2018 at 11:36 PM Dave Brondsema <da...@brondsema.net> wrote:

> Sounds good, pagination is definitely important if people have a lot of
> tickets.
>  In the ForgeTracker tool forgetracker/model/ticket.py there are methods
> paged_search() and paged_query() which might be good reference points.  It
> looks
> like they probably can't be re-used directly, since they expect an
> app_config,
> and the dashboard will search across all ticket tracker apps.  It also
> supports
> filtering and search terms that aren't needed.  But it might be useful.
>
> There's other things in the ForgeTracker that might be useful too.  Like
> listing
> the results with the TicketSearchResults class and
> ticket_search_results.html
> template.  Again, those have things like filtering, configurable columns,
> etc
> that aren't necessary on the dashboard.  But it could be a good reference
> for
> how paging is used, etc.
>
> I would recommend using a solr search rather than a mongo query to find the
> tickets.  That is because the Ticket class does not have a mongo index for
> the
> submitter, and so querying by submitter could be very slow when there are
> thousands and thousands of tickets.  Searching with solr also would also
> let us
> support people filtering & searching their own tickets list, in the future
> if we
> wanted to do that (not necessary this summer).
>
> On 6/21/18 12:11 PM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > Currently I'm working on creating "Tickets Section" of Dashboard. I have
> > implemented to load all of the tickets at once, but I thought to paginate
> > this and I'm working on it.
> >
> > Will give you an update soon. If you have any suggestions please let me
> > know.
> >
> > Regards!
> >
> > On Thu, Jun 14, 2018 at 12:22 AM Deshani Geethika <
> deshanigeethika@gmail.com>
> > wrote:
> >
> >> Hi Dave,
> >>
> >> Thanks for reviewing and merging the above requests.
> >>
> >> I've created a helper method to avoid code duplication in
> >> DashboardController.index and UserProfileApp.profile_sections, and
> added a merge
> >> request <
> https://forge-allura.apache.org/p/allura/git/merge-requests/259/>
> >> .
> >>
> >> Please review it and let me know if any improvements required.
> >>
> >> Regards!
> >>
> >> On Tue, Jun 12, 2018 at 1:20 AM Deshani Geethika <
> >> deshanigeethika@gmail.com> wrote:
> >>
> >>> Hi Dave,
> >>>
> >>> I've updated the above merge request
> >>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>, as
> >>> I've fixed an issue in a template.
> >>>
> >>> Meanwhile, I started a new branch for dashboard tests and added a
> simple
> >>> test to check '/dashboard' route. I've created a new merge request
> >>> <https://forge-allura.apache.org/p/allura/git/merge-requests/258/> for
> >>> this. Please review it and let me know if any improvements required.
> >>>
> >>> Regards!
> >>>
> >>> On Sat, Jun 9, 2018 at 12:07 PM Deshani Geethika <
> >>> deshanigeethika@gmail.com> wrote:
> >>>
> >>>> Hi Dave,
> >>>>
> >>>> Thanks for the clarifications :)
> >>>>
> >>>> I've fixed the issues with test cases and updated the merge request
> >>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>.
> >>>> Please review it and let me know if any improvements required
> >>>>
> >>>> Regards!
> >>>>
> >>>> On Wed, Jun 6, 2018 at 8:56 PM Dave Brondsema <da...@brondsema.net>
> >>>> wrote:
> >>>>
> >>>>> On 6/6/18 5:37 AM, Deshani Geethika wrote:
> >>>>>> Hi Dave,
> >>>>>>
> >>>>>> I need some help in understanding an error related to test cases.
> >>>>>>
> >>>>>> I was trying to write a test case to check the '/neighborhood' route
> >>>>> in
> >>>>>> Allura/allura/tests/functional/test_root.py as below.
> >>>>>>
> >>>>>>     def test_neighborhood(self):
> >>>>>>>         response = self.app.get('/neighborhood/')
> >>>>>>
> >>>>>>
> >>>>>> But I get the following error, when I run the above test case.
> >>>>>>
> >>>>>> Traceback (most recent call last):
> >>>>>>>   File
> >>>>>>>
> >>>>>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
> >>>>>>> line 197, in runTest
> >>>>>>>     self.test(*self.arg)
> >>>>>>>   File
> >>>>>>>
> >>>>>
> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
> >>>>>>> line 58, in test_neighborhood
> >>>>>>>     response = self.app.get('/neighborhood/')
> >>>>>>>   File
> >>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
> >>>>>>> line 322, in get
> >>>>>>>     resp = super(ValidatingTestApp, self).get(*args, **kw)
> >>>>>>>   File
> >>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
> >>>>>>> line 269, in get
> >>>>>>>     return super(PostParamCheckingTestApp, self).get(*args,
> **kwargs)
> >>>>>>>   File
> >>>>>>>
> >>>>>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> >>>>>>> line 756, in get
> >>>>>>>     expect_errors=expect_errors)
> >>>>>>>   File
> >>>>>>>
> >>>>>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> >>>>>>> line 1118, in do_request
> >>>>>>>     self._check_status(status, res)
> >>>>>>>   File
> >>>>>>>
> >>>>>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> >>>>>>> line 1154, in _check_status
> >>>>>>>     res)
> >>>>>>> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect
> for
> >>>>>>> http://localhost/neighborhood/)
> >>>>>>
> >>>>>>
> >>>>>> Can you help me to understand why this error comes up?
> >>>>>>
> >>>>>> Regards!
> >>>>>
> >>>>>
> >>>>> Wow, this was a tricky one!  I was stumped about this for a while
> too.
> >>>>> Its
> >>>>> happening because of some helper code for tests, that is not very
> >>>>> obvious.  In
> >>>>> Allura/allura/controllers/basetest_project_root.py a modified root
> >>>>> controller is
> >>>>> used for tests, which makes some project & tool testing easier.  This
> >>>>> controller
> >>>>> is used because test.ini specifies
> "override_root=basetest_project_root"
> >>>>>
> >>>>> And then in this controller on line 71 there is a list of root
> >>>>> controller
> >>>>> attributes that is hardcoded.  So you will have to add 'neighborhood'
> >>>>> and
> >>>>> 'dashboard' to that list.
> >>>>>
> >>>>> I would also recommend adding a comment on the real RootController
> >>>>> mentioning
> >>>>> the BasetestProjectRootController so that anyone else in the future
> who
> >>>>> adds a
> >>>>> root url knows that they have to update the other place too.
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Dave Brondsema : dave@brondsema.net
> >>>>> http://www.brondsema.net : personal
> >>>>> http://www.splike.com : programming
> >>>>>               <><
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> *Deshani Geethika*
> >>>> Undergraduate at Department of Computer Science and Engineering
> >>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>
> >>>>
> >>>
> >>> --
> >>> *Deshani Geethika*
> >>> Undergraduate at Department of Computer Science and Engineering
> >>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>
> >>>
> >>
> >> --
> >> *Deshani Geethika*
> >> Undergraduate at Department of Computer Science and Engineering
> >> Faculty of Engineering - University of Moratuwa Sri Lanka
> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>
> >>
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
Sounds good, pagination is definitely important if people have a lot of tickets.
 In the ForgeTracker tool forgetracker/model/ticket.py there are methods
paged_search() and paged_query() which might be good reference points.  It looks
like they probably can't be re-used directly, since they expect an app_config,
and the dashboard will search across all ticket tracker apps.  It also supports
filtering and search terms that aren't needed.  But it might be useful.

There's other things in the ForgeTracker that might be useful too.  Like listing
the results with the TicketSearchResults class and ticket_search_results.html
template.  Again, those have things like filtering, configurable columns, etc
that aren't necessary on the dashboard.  But it could be a good reference for
how paging is used, etc.

I would recommend using a solr search rather than a mongo query to find the
tickets.  That is because the Ticket class does not have a mongo index for the
submitter, and so querying by submitter could be very slow when there are
thousands and thousands of tickets.  Searching with solr also would also let us
support people filtering & searching their own tickets list, in the future if we
wanted to do that (not necessary this summer).

On 6/21/18 12:11 PM, Deshani Geethika wrote:
> Hi Dave,
> 
> Currently I'm working on creating "Tickets Section" of Dashboard. I have
> implemented to load all of the tickets at once, but I thought to paginate
> this and I'm working on it.
> 
> Will give you an update soon. If you have any suggestions please let me
> know.
> 
> Regards!
> 
> On Thu, Jun 14, 2018 at 12:22 AM Deshani Geethika <de...@gmail.com>
> wrote:
> 
>> Hi Dave,
>>
>> Thanks for reviewing and merging the above requests.
>>
>> I've created a helper method to avoid code duplication in
>> DashboardController.index and UserProfileApp.profile_sections, and added a merge
>> request <https://forge-allura.apache.org/p/allura/git/merge-requests/259/>
>> .
>>
>> Please review it and let me know if any improvements required.
>>
>> Regards!
>>
>> On Tue, Jun 12, 2018 at 1:20 AM Deshani Geethika <
>> deshanigeethika@gmail.com> wrote:
>>
>>> Hi Dave,
>>>
>>> I've updated the above merge request
>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>, as
>>> I've fixed an issue in a template.
>>>
>>> Meanwhile, I started a new branch for dashboard tests and added a simple
>>> test to check '/dashboard' route. I've created a new merge request
>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/258/> for
>>> this. Please review it and let me know if any improvements required.
>>>
>>> Regards!
>>>
>>> On Sat, Jun 9, 2018 at 12:07 PM Deshani Geethika <
>>> deshanigeethika@gmail.com> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> Thanks for the clarifications :)
>>>>
>>>> I've fixed the issues with test cases and updated the merge request
>>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>.
>>>> Please review it and let me know if any improvements required
>>>>
>>>> Regards!
>>>>
>>>> On Wed, Jun 6, 2018 at 8:56 PM Dave Brondsema <da...@brondsema.net>
>>>> wrote:
>>>>
>>>>> On 6/6/18 5:37 AM, Deshani Geethika wrote:
>>>>>> Hi Dave,
>>>>>>
>>>>>> I need some help in understanding an error related to test cases.
>>>>>>
>>>>>> I was trying to write a test case to check the '/neighborhood' route
>>>>> in
>>>>>> Allura/allura/tests/functional/test_root.py as below.
>>>>>>
>>>>>>     def test_neighborhood(self):
>>>>>>>         response = self.app.get('/neighborhood/')
>>>>>>
>>>>>>
>>>>>> But I get the following error, when I run the above test case.
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>>   File
>>>>>>>
>>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
>>>>>>> line 197, in runTest
>>>>>>>     self.test(*self.arg)
>>>>>>>   File
>>>>>>>
>>>>> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
>>>>>>> line 58, in test_neighborhood
>>>>>>>     response = self.app.get('/neighborhood/')
>>>>>>>   File
>>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>>>>>>> line 322, in get
>>>>>>>     resp = super(ValidatingTestApp, self).get(*args, **kw)
>>>>>>>   File
>>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>>>>>>> line 269, in get
>>>>>>>     return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
>>>>>>>   File
>>>>>>>
>>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>>>>>> line 756, in get
>>>>>>>     expect_errors=expect_errors)
>>>>>>>   File
>>>>>>>
>>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>>>>>> line 1118, in do_request
>>>>>>>     self._check_status(status, res)
>>>>>>>   File
>>>>>>>
>>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>>>>>> line 1154, in _check_status
>>>>>>>     res)
>>>>>>> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for
>>>>>>> http://localhost/neighborhood/)
>>>>>>
>>>>>>
>>>>>> Can you help me to understand why this error comes up?
>>>>>>
>>>>>> Regards!
>>>>>
>>>>>
>>>>> Wow, this was a tricky one!  I was stumped about this for a while too.
>>>>> Its
>>>>> happening because of some helper code for tests, that is not very
>>>>> obvious.  In
>>>>> Allura/allura/controllers/basetest_project_root.py a modified root
>>>>> controller is
>>>>> used for tests, which makes some project & tool testing easier.  This
>>>>> controller
>>>>> is used because test.ini specifies "override_root=basetest_project_root"
>>>>>
>>>>> And then in this controller on line 71 there is a list of root
>>>>> controller
>>>>> attributes that is hardcoded.  So you will have to add 'neighborhood'
>>>>> and
>>>>> 'dashboard' to that list.
>>>>>
>>>>> I would also recommend adding a comment on the real RootController
>>>>> mentioning
>>>>> the BasetestProjectRootController so that anyone else in the future who
>>>>> adds a
>>>>> root url knows that they have to update the other place too.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Brondsema : dave@brondsema.net
>>>>> http://www.brondsema.net : personal
>>>>> http://www.splike.com : programming
>>>>>               <><
>>>>>
>>>>
>>>>
>>>> --
>>>> *Deshani Geethika*
>>>> Undergraduate at Department of Computer Science and Engineering
>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>
>>>>
>>>
>>> --
>>> *Deshani Geethika*
>>> Undergraduate at Department of Computer Science and Engineering
>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>
>>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

Currently I'm working on creating "Tickets Section" of Dashboard. I have
implemented to load all of the tickets at once, but I thought to paginate
this and I'm working on it.

Will give you an update soon. If you have any suggestions please let me
know.

Regards!

On Thu, Jun 14, 2018 at 12:22 AM Deshani Geethika <de...@gmail.com>
wrote:

> Hi Dave,
>
> Thanks for reviewing and merging the above requests.
>
> I've created a helper method to avoid code duplication in
> DashboardController.index and UserProfileApp.profile_sections, and added a merge
> request <https://forge-allura.apache.org/p/allura/git/merge-requests/259/>
> .
>
> Please review it and let me know if any improvements required.
>
> Regards!
>
> On Tue, Jun 12, 2018 at 1:20 AM Deshani Geethika <
> deshanigeethika@gmail.com> wrote:
>
>> Hi Dave,
>>
>> I've updated the above merge request
>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>, as
>> I've fixed an issue in a template.
>>
>> Meanwhile, I started a new branch for dashboard tests and added a simple
>> test to check '/dashboard' route. I've created a new merge request
>> <https://forge-allura.apache.org/p/allura/git/merge-requests/258/> for
>> this. Please review it and let me know if any improvements required.
>>
>> Regards!
>>
>> On Sat, Jun 9, 2018 at 12:07 PM Deshani Geethika <
>> deshanigeethika@gmail.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Thanks for the clarifications :)
>>>
>>> I've fixed the issues with test cases and updated the merge request
>>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>.
>>> Please review it and let me know if any improvements required
>>>
>>> Regards!
>>>
>>> On Wed, Jun 6, 2018 at 8:56 PM Dave Brondsema <da...@brondsema.net>
>>> wrote:
>>>
>>>> On 6/6/18 5:37 AM, Deshani Geethika wrote:
>>>> > Hi Dave,
>>>> >
>>>> > I need some help in understanding an error related to test cases.
>>>> >
>>>> > I was trying to write a test case to check the '/neighborhood' route
>>>> in
>>>> > Allura/allura/tests/functional/test_root.py as below.
>>>> >
>>>> >     def test_neighborhood(self):
>>>> >>         response = self.app.get('/neighborhood/')
>>>> >
>>>> >
>>>> > But I get the following error, when I run the above test case.
>>>> >
>>>> > Traceback (most recent call last):
>>>> >>   File
>>>> >>
>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
>>>> >> line 197, in runTest
>>>> >>     self.test(*self.arg)
>>>> >>   File
>>>> >>
>>>> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
>>>> >> line 58, in test_neighborhood
>>>> >>     response = self.app.get('/neighborhood/')
>>>> >>   File
>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>>>> >> line 322, in get
>>>> >>     resp = super(ValidatingTestApp, self).get(*args, **kw)
>>>> >>   File
>>>> "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>>>> >> line 269, in get
>>>> >>     return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
>>>> >>   File
>>>> >>
>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>>> >> line 756, in get
>>>> >>     expect_errors=expect_errors)
>>>> >>   File
>>>> >>
>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>>> >> line 1118, in do_request
>>>> >>     self._check_status(status, res)
>>>> >>   File
>>>> >>
>>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>>> >> line 1154, in _check_status
>>>> >>     res)
>>>> >> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for
>>>> >> http://localhost/neighborhood/)
>>>> >
>>>> >
>>>> > Can you help me to understand why this error comes up?
>>>> >
>>>> > Regards!
>>>>
>>>>
>>>> Wow, this was a tricky one!  I was stumped about this for a while too.
>>>> Its
>>>> happening because of some helper code for tests, that is not very
>>>> obvious.  In
>>>> Allura/allura/controllers/basetest_project_root.py a modified root
>>>> controller is
>>>> used for tests, which makes some project & tool testing easier.  This
>>>> controller
>>>> is used because test.ini specifies "override_root=basetest_project_root"
>>>>
>>>> And then in this controller on line 71 there is a list of root
>>>> controller
>>>> attributes that is hardcoded.  So you will have to add 'neighborhood'
>>>> and
>>>> 'dashboard' to that list.
>>>>
>>>> I would also recommend adding a comment on the real RootController
>>>> mentioning
>>>> the BasetestProjectRootController so that anyone else in the future who
>>>> adds a
>>>> root url knows that they have to update the other place too.
>>>>
>>>>
>>>>
>>>> --
>>>> Dave Brondsema : dave@brondsema.net
>>>> http://www.brondsema.net : personal
>>>> http://www.splike.com : programming
>>>>               <><
>>>>
>>>
>>>
>>> --
>>> *Deshani Geethika*
>>> Undergraduate at Department of Computer Science and Engineering
>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>
>>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

Thanks for reviewing and merging the above requests.

I've created a helper method to avoid code duplication in
DashboardController.index and UserProfileApp.profile_sections, and
added a merge
request <https://forge-allura.apache.org/p/allura/git/merge-requests/259/>.

Please review it and let me know if any improvements required.

Regards!

On Tue, Jun 12, 2018 at 1:20 AM Deshani Geethika <de...@gmail.com>
wrote:

> Hi Dave,
>
> I've updated the above merge request
> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>, as
> I've fixed an issue in a template.
>
> Meanwhile, I started a new branch for dashboard tests and added a simple
> test to check '/dashboard' route. I've created a new merge request
> <https://forge-allura.apache.org/p/allura/git/merge-requests/258/> for
> this. Please review it and let me know if any improvements required.
>
> Regards!
>
> On Sat, Jun 9, 2018 at 12:07 PM Deshani Geethika <
> deshanigeethika@gmail.com> wrote:
>
>> Hi Dave,
>>
>> Thanks for the clarifications :)
>>
>> I've fixed the issues with test cases and updated the merge request
>> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>.
>> Please review it and let me know if any improvements required
>>
>> Regards!
>>
>> On Wed, Jun 6, 2018 at 8:56 PM Dave Brondsema <da...@brondsema.net> wrote:
>>
>>> On 6/6/18 5:37 AM, Deshani Geethika wrote:
>>> > Hi Dave,
>>> >
>>> > I need some help in understanding an error related to test cases.
>>> >
>>> > I was trying to write a test case to check the '/neighborhood' route in
>>> > Allura/allura/tests/functional/test_root.py as below.
>>> >
>>> >     def test_neighborhood(self):
>>> >>         response = self.app.get('/neighborhood/')
>>> >
>>> >
>>> > But I get the following error, when I run the above test case.
>>> >
>>> > Traceback (most recent call last):
>>> >>   File
>>> >>
>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
>>> >> line 197, in runTest
>>> >>     self.test(*self.arg)
>>> >>   File
>>> >>
>>> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
>>> >> line 58, in test_neighborhood
>>> >>     response = self.app.get('/neighborhood/')
>>> >>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>>> >> line 322, in get
>>> >>     resp = super(ValidatingTestApp, self).get(*args, **kw)
>>> >>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>>> >> line 269, in get
>>> >>     return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
>>> >>   File
>>> >>
>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>> >> line 756, in get
>>> >>     expect_errors=expect_errors)
>>> >>   File
>>> >>
>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>> >> line 1118, in do_request
>>> >>     self._check_status(status, res)
>>> >>   File
>>> >>
>>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>>> >> line 1154, in _check_status
>>> >>     res)
>>> >> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for
>>> >> http://localhost/neighborhood/)
>>> >
>>> >
>>> > Can you help me to understand why this error comes up?
>>> >
>>> > Regards!
>>>
>>>
>>> Wow, this was a tricky one!  I was stumped about this for a while too.
>>> Its
>>> happening because of some helper code for tests, that is not very
>>> obvious.  In
>>> Allura/allura/controllers/basetest_project_root.py a modified root
>>> controller is
>>> used for tests, which makes some project & tool testing easier.  This
>>> controller
>>> is used because test.ini specifies "override_root=basetest_project_root"
>>>
>>> And then in this controller on line 71 there is a list of root controller
>>> attributes that is hardcoded.  So you will have to add 'neighborhood' and
>>> 'dashboard' to that list.
>>>
>>> I would also recommend adding a comment on the real RootController
>>> mentioning
>>> the BasetestProjectRootController so that anyone else in the future who
>>> adds a
>>> root url knows that they have to update the other place too.
>>>
>>>
>>>
>>> --
>>> Dave Brondsema : dave@brondsema.net
>>> http://www.brondsema.net : personal
>>> http://www.splike.com : programming
>>>               <><
>>>
>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I've updated the above merge request
<https://forge-allura.apache.org/p/allura/git/merge-requests/255/>, as I've
fixed an issue in a template.

Meanwhile, I started a new branch for dashboard tests and added a simple
test to check '/dashboard' route. I've created a new merge request
<https://forge-allura.apache.org/p/allura/git/merge-requests/258/> for
this. Please review it and let me know if any improvements required.

Regards!

On Sat, Jun 9, 2018 at 12:07 PM Deshani Geethika <de...@gmail.com>
wrote:

> Hi Dave,
>
> Thanks for the clarifications :)
>
> I've fixed the issues with test cases and updated the merge request
> <https://forge-allura.apache.org/p/allura/git/merge-requests/255/>.
> Please review it and let me know if any improvements required
>
> Regards!
>
> On Wed, Jun 6, 2018 at 8:56 PM Dave Brondsema <da...@brondsema.net> wrote:
>
>> On 6/6/18 5:37 AM, Deshani Geethika wrote:
>> > Hi Dave,
>> >
>> > I need some help in understanding an error related to test cases.
>> >
>> > I was trying to write a test case to check the '/neighborhood' route in
>> > Allura/allura/tests/functional/test_root.py as below.
>> >
>> >     def test_neighborhood(self):
>> >>         response = self.app.get('/neighborhood/')
>> >
>> >
>> > But I get the following error, when I run the above test case.
>> >
>> > Traceback (most recent call last):
>> >>   File
>> >>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
>> >> line 197, in runTest
>> >>     self.test(*self.arg)
>> >>   File
>> >> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
>> >> line 58, in test_neighborhood
>> >>     response = self.app.get('/neighborhood/')
>> >>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>> >> line 322, in get
>> >>     resp = super(ValidatingTestApp, self).get(*args, **kw)
>> >>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>> >> line 269, in get
>> >>     return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
>> >>   File
>> >>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> >> line 756, in get
>> >>     expect_errors=expect_errors)
>> >>   File
>> >>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> >> line 1118, in do_request
>> >>     self._check_status(status, res)
>> >>   File
>> >>
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> >> line 1154, in _check_status
>> >>     res)
>> >> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for
>> >> http://localhost/neighborhood/)
>> >
>> >
>> > Can you help me to understand why this error comes up?
>> >
>> > Regards!
>>
>>
>> Wow, this was a tricky one!  I was stumped about this for a while too.
>> Its
>> happening because of some helper code for tests, that is not very
>> obvious.  In
>> Allura/allura/controllers/basetest_project_root.py a modified root
>> controller is
>> used for tests, which makes some project & tool testing easier.  This
>> controller
>> is used because test.ini specifies "override_root=basetest_project_root"
>>
>> And then in this controller on line 71 there is a list of root controller
>> attributes that is hardcoded.  So you will have to add 'neighborhood' and
>> 'dashboard' to that list.
>>
>> I would also recommend adding a comment on the real RootController
>> mentioning
>> the BasetestProjectRootController so that anyone else in the future who
>> adds a
>> root url knows that they have to update the other place too.
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

Thanks for the clarifications :)

I've fixed the issues with test cases and updated the merge request
<https://forge-allura.apache.org/p/allura/git/merge-requests/255/>. Please
review it and let me know if any improvements required

Regards!

On Wed, Jun 6, 2018 at 8:56 PM Dave Brondsema <da...@brondsema.net> wrote:

> On 6/6/18 5:37 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > I need some help in understanding an error related to test cases.
> >
> > I was trying to write a test case to check the '/neighborhood' route in
> > Allura/allura/tests/functional/test_root.py as below.
> >
> >     def test_neighborhood(self):
> >>         response = self.app.get('/neighborhood/')
> >
> >
> > But I get the following error, when I run the above test case.
> >
> > Traceback (most recent call last):
> >>   File
> >>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
> >> line 197, in runTest
> >>     self.test(*self.arg)
> >>   File
> >> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
> >> line 58, in test_neighborhood
> >>     response = self.app.get('/neighborhood/')
> >>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
> >> line 322, in get
> >>     resp = super(ValidatingTestApp, self).get(*args, **kw)
> >>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
> >> line 269, in get
> >>     return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
> >>   File
> >>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> >> line 756, in get
> >>     expect_errors=expect_errors)
> >>   File
> >>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> >> line 1118, in do_request
> >>     self._check_status(status, res)
> >>   File
> >>
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> >> line 1154, in _check_status
> >>     res)
> >> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for
> >> http://localhost/neighborhood/)
> >
> >
> > Can you help me to understand why this error comes up?
> >
> > Regards!
>
>
> Wow, this was a tricky one!  I was stumped about this for a while too.  Its
> happening because of some helper code for tests, that is not very
> obvious.  In
> Allura/allura/controllers/basetest_project_root.py a modified root
> controller is
> used for tests, which makes some project & tool testing easier.  This
> controller
> is used because test.ini specifies "override_root=basetest_project_root"
>
> And then in this controller on line 71 there is a list of root controller
> attributes that is hardcoded.  So you will have to add 'neighborhood' and
> 'dashboard' to that list.
>
> I would also recommend adding a comment on the real RootController
> mentioning
> the BasetestProjectRootController so that anyone else in the future who
> adds a
> root url knows that they have to update the other place too.
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
On 6/6/18 5:37 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> I need some help in understanding an error related to test cases.
> 
> I was trying to write a test case to check the '/neighborhood' route in
> Allura/allura/tests/functional/test_root.py as below.
> 
>     def test_neighborhood(self):
>>         response = self.app.get('/neighborhood/')
> 
> 
> But I get the following error, when I run the above test case.
> 
> Traceback (most recent call last):
>>   File
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
>> line 197, in runTest
>>     self.test(*self.arg)
>>   File
>> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
>> line 58, in test_neighborhood
>>     response = self.app.get('/neighborhood/')
>>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>> line 322, in get
>>     resp = super(ValidatingTestApp, self).get(*args, **kw)
>>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
>> line 269, in get
>>     return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
>>   File
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> line 756, in get
>>     expect_errors=expect_errors)
>>   File
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> line 1118, in do_request
>>     self._check_status(status, res)
>>   File
>> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
>> line 1154, in _check_status
>>     res)
>> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for
>> http://localhost/neighborhood/)
> 
> 
> Can you help me to understand why this error comes up?
> 
> Regards!


Wow, this was a tricky one!  I was stumped about this for a while too.  Its
happening because of some helper code for tests, that is not very obvious.  In
Allura/allura/controllers/basetest_project_root.py a modified root controller is
used for tests, which makes some project & tool testing easier.  This controller
is used because test.ini specifies "override_root=basetest_project_root"

And then in this controller on line 71 there is a list of root controller
attributes that is hardcoded.  So you will have to add 'neighborhood' and
'dashboard' to that list.

I would also recommend adding a comment on the real RootController mentioning
the BasetestProjectRootController so that anyone else in the future who adds a
root url knows that they have to update the other place too.



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I need some help in understanding an error related to test cases.

I was trying to write a test case to check the '/neighborhood' route in
Allura/allura/tests/functional/test_root.py as below.

    def test_neighborhood(self):
>         response = self.app.get('/neighborhood/')


But I get the following error, when I run the above test case.

Traceback (most recent call last):
>   File
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/nose/case.py",
> line 197, in runTest
>     self.test(*self.arg)
>   File
> "/home/deshani/src/allura/Allura/allura/tests/functional/test_root.py",
> line 58, in test_neighborhood
>     response = self.app.get('/neighborhood/')
>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
> line 322, in get
>     resp = super(ValidatingTestApp, self).get(*args, **kw)
>   File "/home/deshani/src/allura/AlluraTest/alluratest/validation.py",
> line 269, in get
>     return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
>   File
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> line 756, in get
>     expect_errors=expect_errors)
>   File
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> line 1118, in do_request
>     self._check_status(status, res)
>   File
> "/home/deshani/env-allura/local/lib/python2.7/site-packages/webtest/app.py",
> line 1154, in _check_status
>     res)
> AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for
> http://localhost/neighborhood/)


Can you help me to understand why this error comes up?

Regards!

On Wed, May 30, 2018 at 8:37 PM Deshani Geethika <de...@gmail.com>
wrote:

> Hi Dave,
>
> I've added the first merge request for Personal Dashboard. Please review
> it and let me know any improvements.
>
> Merge Request:
> https://forge-allura.apache.org/p/allura/git/merge-requests/255/
>
> Regards!
>
> On Wed, May 30, 2018 at 12:14 AM Dave Brondsema <da...@brondsema.net>
> wrote:
>
>> On 5/28/18 4:12 AM, Deshani Geethika wrote:
>> > Hi Dave,
>> >
>> > During last week I focused on learning frameworks and basics related to
>> > Allura and now I’m ready to add the first merge request of Personal
>> > Dashboard. When adding the merge request, should it be added to the
>> master
>> > branch of the remote?
>> >
>> > Regards!
>> >
>>
>> I would recommend making a new branch for each task you work on.  That
>> way you
>> can have multiple going at the same time, if they are not dependent on
>> each other.
>>
>> That will also let you keep master in sync with upstream master, and not
>> have
>> local changes in it.
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
>
>
> --
> *Deshani Geethika*
> Undergraduate at Department of Computer Science and Engineering
> Faculty of Engineering - University of Moratuwa Sri Lanka
> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> <https://github.com/deshanigtk> | Mobile - +94776383034
>
>

-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

I've added the first merge request for Personal Dashboard. Please review it
and let me know any improvements.

Merge Request:
https://forge-allura.apache.org/p/allura/git/merge-requests/255/

Regards!

On Wed, May 30, 2018 at 12:14 AM Dave Brondsema <da...@brondsema.net> wrote:

> On 5/28/18 4:12 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > During last week I focused on learning frameworks and basics related to
> > Allura and now I’m ready to add the first merge request of Personal
> > Dashboard. When adding the merge request, should it be added to the
> master
> > branch of the remote?
> >
> > Regards!
> >
>
> I would recommend making a new branch for each task you work on.  That way
> you
> can have multiple going at the same time, if they are not dependent on
> each other.
>
> That will also let you keep master in sync with upstream master, and not
> have
> local changes in it.
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
On 5/28/18 4:12 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> During last week I focused on learning frameworks and basics related to
> Allura and now I’m ready to add the first merge request of Personal
> Dashboard. When adding the merge request, should it be added to the master
> branch of the remote?
> 
> Regards!
> 

I would recommend making a new branch for each task you work on.  That way you
can have multiple going at the same time, if they are not dependent on each other.

That will also let you keep master in sync with upstream master, and not have
local changes in it.


-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

During last week I focused on learning frameworks and basics related to
Allura and now I’m ready to add the first merge request of Personal
Dashboard. When adding the merge request, should it be added to the master
branch of the remote?

Regards!

On Fri, May 18, 2018 at 6:41 AM Dave Brondsema <da...@brondsema.net> wrote:

> That works, and so does google hangouts.  See you then
>
> On 5/17/18 2:17 PM, Deshani Geethika wrote:
> > Thanks. Can we make it tomorrow (18th May) 10am ET? or any other
> convenient
> > time of your choice.
> >
> > Is it a Hangouts call? or please let me know if I need to setup any other
> > application
> >
> > Regards!
> >
> > On Thu, May 17, 2018 at 8:57 PM, Dave Brondsema <da...@brondsema.net>
> wrote:
> >
> >> Sure.  I am available 10am-6pm ET on weekdays, and also Sat/Sun could be
> >> available 12pm - 10pm.
> >>
> https://www.timeanddate.com/worldclock/converter.html?p1=tz_ist&p2=tz_et
> >>
> >> On 5/17/18 7:10 AM, Deshani Geethika wrote:
> >>> Hi Dave,
> >>>
> >>> To get an overview about Allura code-base and conventions, it would be
> >>> great if we can arrange a call. Could you tell me your available time
> >> slots
> >>> for a meeting.
> >>> My time zone is IST (+0530).
> >>>
> >>> Regards!
> >>>
> >>> On Mon, May 14, 2018 at 9:44 PM, Dave Brondsema <da...@brondsema.net>
> >> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> Allura can be pretty flexible, but in general we follow these
> >> conventions:
> >>>>
> >>>> Core components that are deeply integrated into allura go in the
> >>>> Allura/allura/model & controllers directories.
> >>>>
> >>>> Non-essential components go in the Allura/allura/ext/ directory.  Like
> >>>> "extra"
> >>>> or "extensions".  So this would make sense for the personal dashboard
> I
> >>>> think.
> >>>>
> >>>> Standalone components that can be their application go in ForgeBlog,
> >>>> ForgeChat,
> >>>> etc. as separate python packages.
> >>>>
> >>>> -Dave
> >>>>
> >>>> On 5/14/18 9:44 AM, Deshani Geethika wrote:
> >>>>> Hi Dave,
> >>>>>
> >>>>> During last few days I was working on my GSoC project and I have few
> >>>>> problems to be clarified.
> >>>>>
> >>>>> In my proposal
> >>>>> <https://docs.google.com/document/d/1clWKSJ8-
> >>>> ektpVaEgiJyoM34ievwkyCnD4uORMCT0eM8/edit?usp=sharing>
> >>>>> I have mentioned that, personal_dashboard folder should be created on
> >> the
> >>>>> path Allura/allura/ext/personal_dashboard. But, I have a confusion
> >>>> whether
> >>>>> this path is correct, since the Personal Dashboard is not an
> >> application.
> >>>>>
> >>>>> Therefore, I have followed the neighborhood implementation and found
> >> out
> >>>>> that its templates are in the path Allura/allura/templates. Also, its
> >>>>> implementation (neighborhood.py) is in the path
> >>>>> Allura/allura/model/neighborhood.py.
> >>>>>
> >>>>> From above two paths, what is the correct convention that I should
> >>>> follow?
> >>>>>
> >>>>> Regards!
> >>>>>
> >>>>> On Thu, May 3, 2018 at 3:21 AM, Dave Brondsema <da...@brondsema.net>
> >>>> wrote:
> >>>>>
> >>>>>> On 5/2/18 11:24 AM, Deshani Geethika wrote:
> >>>>>>> Hi Dave,
> >>>>>>>
> >>>>>>> Thanks for the information. I have few questions to be clarified.
> >>>>>>>
> >>>>>>> I think replacing spaces with underscores would be a good way to do
> >> it,
> >>>>>>> since on many wikis they are
> >>>>>>> interchangable.  (They aren't for allura, but we could move towards
> >>>>>> that).
> >>>>>>>
> >>>>>>> Here do you mean that spaces and underscores in a title are
> >> considered
> >>>> as
> >>>>>>> same characters?
> >>>>>>>
> >>>>>>> For example : "The Title" is considered same as "The_Title".
> >>>>>>
> >>>>>> Yes that's what I was thinking.
> >>>>>>
> >>>>>>>
> >>>>>>> In this situation, users should not be allowed to create 2 wikis
> with
> >>>>>> above
> >>>>>>> titles, because we can't handle inbound emails for both scenarios.
> >>>>>>
> >>>>>> Good point, I hadn't thought of that.  That does make this more
> >>>>>> complicated.
> >>>>>> Maybe it could be a followup step to prevent creating a page that
> >>>>>> conflicts with
> >>>>>> another one.  And then even later on we could make URLs handle
> spaces
> >>>> and
> >>>>>> underscores interchangably.
> >>>>>>
> >>>>>> Anyone else have ideas about what would be best?
> >>>>>>
> >>>>>>>
> >>>>>>> Also, we have another problem here.
> >>>>>>>
> >>>>>>> Then this handle_message method could try finding a page for that
> >>>>>> message,
> >>>>>>> and if it
> >>>>>>> doesn't exist, it can convert any underscores back to spaces and
> then
> >>>> try
> >>>>>>> find
> >>>>>>> the wiki page under that name.
> >>>>>>>
> >>>>>>> Here do I need to check for all the possible number of combinations
> >> of
> >>>>>>> underscores and spaces to find out the exact wiki page?
> >>>>>>
> >>>>>>
> >>>>>> I was thinking if an email comes in for "Foo_Bar_Baz" first look for
> >> one
> >>>>>> titled
> >>>>>> "Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every
> >>>> combination
> >>>>>> could
> >>>>>> get crazy.
> >>>>>>
> >>>>>>>
> >>>>>>> Regards!
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <dave@brondsema.net
> >
> >>>>>> wrote:
> >>>>>>>
> >>>>>>>> Cool.  That email_address property should be the main one and
> >> changing
> >>>>>> it
> >>>>>>>> should
> >>>>>>>> reflect in the outgoing emails that are sent to subscribers after
> >>>>>>>> commenting or
> >>>>>>>> editing a wiki page.
> >>>>>>>>
> >>>>>>>> Allura also supports *inbound* emails on most artifacts including
> >> wiki
> >>>>>>>> pages.
> >>>>>>>> So someone could reply to the wiki email and it would be received
> by
> >>>>>>>> Allura and
> >>>>>>>> added as a comment on the wiki page.  The
> >>>>>>>> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
> >>>>>>>> responsible
> >>>>>>>> for that.  So that code should be updated as well.  I think
> >> replacing
> >>>>>>>> spaces
> >>>>>>>> with underscores would be a good way to do it, since on many wikis
> >>>> they
> >>>>>> are
> >>>>>>>> interchangable.  (They aren't for allura, but we could move
> towards
> >>>>>>>> that).  Then
> >>>>>>>> this handle_message method could try finding a page for that
> >> message,
> >>>>>> and
> >>>>>>>> if it
> >>>>>>>> doesn't exist, it can convert any underscores back to spaces and
> >> then
> >>>>>> try
> >>>>>>>> find
> >>>>>>>> the wiki page under that name.
> >>>>>>>>
> >>>>>>>> To test the inbound mails, I'm unfortunately not seeing any tests
> in
> >>>> the
> >>>>>>>> code.
> >>>>>>>> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py
> file
> >>>>>> has a
> >>>>>>>> TestBulkExport class and you could copy most of its setup, and
> then
> >>>> add
> >>>>>> a
> >>>>>>>> test_email test case that calls wiki.handle_message.
> >>>>>>>>
> >>>>>>>> The other way is to use telnet or other tools like that to send
> the
> >>>> mail
> >>>>>>>> into
> >>>>>>>> the "inmail" docker compose container, or `paster smtp_server`
> >> service
> >>>>>> if
> >>>>>>>> you
> >>>>>>>> aren't using docker.  There's an example of doing that in the
> middle
> >>>> of
> >>>>>>>> this
> >>>>>>>> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
> >>>>>>>>
> >>>>>>>> Hope that helps!  It sounds a little more complex of a ticket
> than I
> >>>>>>>> initially
> >>>>>>>> thought it would be.  Let us know if you have any more questions
> or
> >>>> get
> >>>>>>>> stuck on
> >>>>>>>> anything.
> >>>>>>>>
> >>>>>>>> -Dave
> >>>>>>>>
> >>>>>>>> On 5/1/18 12:45 PM, Deshani Geethika wrote:
> >>>>>>>>> Hi all,
> >>>>>>>>>
> >>>>>>>>> During last few days, I spent time on reading the Allura
> >>>> documentation
> >>>>>>>> and
> >>>>>>>>> on getting familiarized with Allura codebase.
> >>>>>>>>>
> >>>>>>>>> Then, I have started to work on the ticket - #1699 Fix incoming
> >> email
> >>>>>> for
> >>>>>>>>> wiki pages with space in the title
> >>>>>>>>> <https://forge-allura.apache.org/p/allura/tickets/1699/>.
> >> According
> >>>> to
> >>>>>>>> my
> >>>>>>>>> understanding, it is required to replace the spaces in the title
> >> with
> >>>>>>>> null
> >>>>>>>>> string (or with some character). Therefore, the getter method for
> >>>>>>>>> email_address which is in Page.class in
> >>>> ForgeWiki/forgewiki/model/wiki
> >>>>>>>> .py
> >>>>>>>>> should be changed as below.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> @property
> >>>>>>>>> def email_address(self):
> >>>>>>>>>        if context.app.config.options.get('AllowEmailPosting',
> >> True):
> >>>>>>>>>                domain = self.email_domain
> >>>>>>>>>     * self.title.replace(‘ ‘,’’) // Added line*
> >>>>>>>>>                return '%s@%s%s' % (self.title.replace('/', '.'),
> >>>>>> domain,
> >>>>>>>>> config.common_suffix)
> >>>>>>>>>        else:
> >>>>>>>>>                return tg_config.get('forgemail.return_path')
> >>>>>>>>>
> >>>>>>>>> Could you tell me whether, do I need to modify any method other
> >> than
> >>>>>> the
> >>>>>>>>> above one?
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Regards!
> >>>>>>>>>
> >>>>>>>>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
> >>>>>>>>> deshanigeethika@gmail.com> wrote:
> >>>>>>>>>
> >>>>>>>>>> Hi Dave,
> >>>>>>>>>>
> >>>>>>>>>> Thanks for the detailed explanation. I will start working on
> this
> >>>> and
> >>>>>>>> come
> >>>>>>>>>> back to you with my progress
> >>>>>>>>>>
> >>>>>>>>>> Regards!
> >>>>>>>>>>
> >>>>>>>>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <
> >> dave@brondsema.net
> >>>>>
> >>>>>>>>>> wrote:
> >>>>>>>>>>
> >>>>>>>>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
> >>>>>>>>>>>> Hi Dave,
> >>>>>>>>>>>>
> >>>>>>>>>>>> As per GSoC official time-line, from 23rd April to 14th May
> >> period
> >>>>>> is
> >>>>>>>>>>>> considered as "Community Bonding Period".
> >>>>>>>>>>>>
> >>>>>>>>>>>> During this period I would like to finalize my design and
> >> separate
> >>>>>> my
> >>>>>>>>>>>> project into several tickets. Also, I would like to get more
> >>>>>>>>>>> familiarized
> >>>>>>>>>>>> with Allura code-base and Allura team.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Could you guide me what would be the best way to start off
> with.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Regards!
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> Sounds like good goals for the community bonding period.
> >>>>>>>>>>>
> >>>>>>>>>>> I've added you as a developer on our self-hosted Allura project
> >>>>>>>>>>> https://forge-allura.apache.org/p/allura/ which means you can
> >>>> assign
> >>>>>>>>>>> tickets to
> >>>>>>>>>>> yourself, make new ones, update existing ones, etc.  I'd
> >> recommend
> >>>>>>>> having
> >>>>>>>>>>> many
> >>>>>>>>>>> small incremental tickets (perhaps even smaller pieces of work
> >> than
> >>>>>> you
> >>>>>>>>>>> outlined
> >>>>>>>>>>> in the project proposal), so that its easy to manage them and
> >>>> review
> >>>>>>>>>>> them.  And
> >>>>>>>>>>> of course you don't need to make them all right away :)
> >>>>>>>>>>>
> >>>>>>>>>>> To familiarize yourself with Allura, you can read more of the
> >>>>>>>>>>> documentation -
> >>>>>>>>>>> assuming you haven't read it all already ;)
> >>>>>>>>>>> https://forge-allura.apache.org/docs/
> >>>>>>>>>>>
> >>>>>>>>>>> And working on Allura code itself is best.  Find an existing
> >> ticket
> >>>>>> or
> >>>>>>>>>>> anything
> >>>>>>>>>>> you notice that could be made better, and make a fix for it.  A
> >>>>>> really
> >>>>>>>>>>> easy one
> >>>>>>>>>>> that I could suggest is https://forge-allura.apache.or
> >>>>>>>>>>> g/p/allura/tickets/1699/
> >>>>>>>>>>>
> >>>>>>>>>>> I've also noticed that our test suite has failed the past few
> >>>> times:
> >>>>>>>>>>> https://builds.apache.org/blue/organizations/jenkins/
> >>>> Allura/activity
> >>>>>>>> It
> >>>>>>>>>>> probably is related to the "Make debug pages and post
> permalinks
> >>>> work
> >>>>>>>>>>> correctly
> >>>>>>>>>>> when behind a proxy" commit.  You could take a look at fixing
> >> that
> >>>> if
> >>>>>>>> you
> >>>>>>>>>>> want.
> >>>>>>>>>>> Otherwise I will soon.
> >>>>>>>>>>>
> >>>>>>>>>>> Lastly, reviewing other people's work is a good way to get
> >> familiar
> >>>>>>>> with
> >>>>>>>>>>> the
> >>>>>>>>>>> code and best practices.  I will have a fix for
> >>>>>>>>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming
> >>>> soon,
> >>>>>> so
> >>>>>>>>>>> watch out
> >>>>>>>>>>> for that.  You won't be able to merge my branch to master, but
> it
> >>>> can
> >>>>>>>> be
> >>>>>>>>>>> a good
> >>>>>>>>>>> way for you to learn from others.  And any constructive
> feedback
> >>>>>> would
> >>>>>>>> be
> >>>>>>>>>>> welcome too, of course.
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> --
> >>>>>>>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>>>>>>> http://www.brondsema.net : personal
> >>>>>>>>>>> http://www.splike.com : programming
> >>>>>>>>>>>               <><
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> *Deshani Geethika*
> >>>>>>>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> |
> GitHub
> >>>>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>>>> http://www.brondsema.net : personal
> >>>>>>>> http://www.splike.com : programming
> >>>>>>>>               <><
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>> http://www.brondsema.net : personal
> >>>>>> http://www.splike.com : programming
> >>>>>>               <><
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Dave Brondsema : dave@brondsema.net
> >>>> http://www.brondsema.net : personal
> >>>> http://www.splike.com : programming
> >>>>               <><
> >>>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Dave Brondsema : dave@brondsema.net
> >> http://www.brondsema.net : personal
> >> http://www.splike.com : programming
> >>               <><
> >>
> >
> >
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>


-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
That works, and so does google hangouts.  See you then

On 5/17/18 2:17 PM, Deshani Geethika wrote:
> Thanks. Can we make it tomorrow (18th May) 10am ET? or any other convenient
> time of your choice.
> 
> Is it a Hangouts call? or please let me know if I need to setup any other
> application
> 
> Regards!
> 
> On Thu, May 17, 2018 at 8:57 PM, Dave Brondsema <da...@brondsema.net> wrote:
> 
>> Sure.  I am available 10am-6pm ET on weekdays, and also Sat/Sun could be
>> available 12pm - 10pm.
>> https://www.timeanddate.com/worldclock/converter.html?p1=tz_ist&p2=tz_et
>>
>> On 5/17/18 7:10 AM, Deshani Geethika wrote:
>>> Hi Dave,
>>>
>>> To get an overview about Allura code-base and conventions, it would be
>>> great if we can arrange a call. Could you tell me your available time
>> slots
>>> for a meeting.
>>> My time zone is IST (+0530).
>>>
>>> Regards!
>>>
>>> On Mon, May 14, 2018 at 9:44 PM, Dave Brondsema <da...@brondsema.net>
>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Allura can be pretty flexible, but in general we follow these
>> conventions:
>>>>
>>>> Core components that are deeply integrated into allura go in the
>>>> Allura/allura/model & controllers directories.
>>>>
>>>> Non-essential components go in the Allura/allura/ext/ directory.  Like
>>>> "extra"
>>>> or "extensions".  So this would make sense for the personal dashboard I
>>>> think.
>>>>
>>>> Standalone components that can be their application go in ForgeBlog,
>>>> ForgeChat,
>>>> etc. as separate python packages.
>>>>
>>>> -Dave
>>>>
>>>> On 5/14/18 9:44 AM, Deshani Geethika wrote:
>>>>> Hi Dave,
>>>>>
>>>>> During last few days I was working on my GSoC project and I have few
>>>>> problems to be clarified.
>>>>>
>>>>> In my proposal
>>>>> <https://docs.google.com/document/d/1clWKSJ8-
>>>> ektpVaEgiJyoM34ievwkyCnD4uORMCT0eM8/edit?usp=sharing>
>>>>> I have mentioned that, personal_dashboard folder should be created on
>> the
>>>>> path Allura/allura/ext/personal_dashboard. But, I have a confusion
>>>> whether
>>>>> this path is correct, since the Personal Dashboard is not an
>> application.
>>>>>
>>>>> Therefore, I have followed the neighborhood implementation and found
>> out
>>>>> that its templates are in the path Allura/allura/templates. Also, its
>>>>> implementation (neighborhood.py) is in the path
>>>>> Allura/allura/model/neighborhood.py.
>>>>>
>>>>> From above two paths, what is the correct convention that I should
>>>> follow?
>>>>>
>>>>> Regards!
>>>>>
>>>>> On Thu, May 3, 2018 at 3:21 AM, Dave Brondsema <da...@brondsema.net>
>>>> wrote:
>>>>>
>>>>>> On 5/2/18 11:24 AM, Deshani Geethika wrote:
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> Thanks for the information. I have few questions to be clarified.
>>>>>>>
>>>>>>> I think replacing spaces with underscores would be a good way to do
>> it,
>>>>>>> since on many wikis they are
>>>>>>> interchangable.  (They aren't for allura, but we could move towards
>>>>>> that).
>>>>>>>
>>>>>>> Here do you mean that spaces and underscores in a title are
>> considered
>>>> as
>>>>>>> same characters?
>>>>>>>
>>>>>>> For example : "The Title" is considered same as "The_Title".
>>>>>>
>>>>>> Yes that's what I was thinking.
>>>>>>
>>>>>>>
>>>>>>> In this situation, users should not be allowed to create 2 wikis with
>>>>>> above
>>>>>>> titles, because we can't handle inbound emails for both scenarios.
>>>>>>
>>>>>> Good point, I hadn't thought of that.  That does make this more
>>>>>> complicated.
>>>>>> Maybe it could be a followup step to prevent creating a page that
>>>>>> conflicts with
>>>>>> another one.  And then even later on we could make URLs handle spaces
>>>> and
>>>>>> underscores interchangably.
>>>>>>
>>>>>> Anyone else have ideas about what would be best?
>>>>>>
>>>>>>>
>>>>>>> Also, we have another problem here.
>>>>>>>
>>>>>>> Then this handle_message method could try finding a page for that
>>>>>> message,
>>>>>>> and if it
>>>>>>> doesn't exist, it can convert any underscores back to spaces and then
>>>> try
>>>>>>> find
>>>>>>> the wiki page under that name.
>>>>>>>
>>>>>>> Here do I need to check for all the possible number of combinations
>> of
>>>>>>> underscores and spaces to find out the exact wiki page?
>>>>>>
>>>>>>
>>>>>> I was thinking if an email comes in for "Foo_Bar_Baz" first look for
>> one
>>>>>> titled
>>>>>> "Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every
>>>> combination
>>>>>> could
>>>>>> get crazy.
>>>>>>
>>>>>>>
>>>>>>> Regards!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net>
>>>>>> wrote:
>>>>>>>
>>>>>>>> Cool.  That email_address property should be the main one and
>> changing
>>>>>> it
>>>>>>>> should
>>>>>>>> reflect in the outgoing emails that are sent to subscribers after
>>>>>>>> commenting or
>>>>>>>> editing a wiki page.
>>>>>>>>
>>>>>>>> Allura also supports *inbound* emails on most artifacts including
>> wiki
>>>>>>>> pages.
>>>>>>>> So someone could reply to the wiki email and it would be received by
>>>>>>>> Allura and
>>>>>>>> added as a comment on the wiki page.  The
>>>>>>>> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
>>>>>>>> responsible
>>>>>>>> for that.  So that code should be updated as well.  I think
>> replacing
>>>>>>>> spaces
>>>>>>>> with underscores would be a good way to do it, since on many wikis
>>>> they
>>>>>> are
>>>>>>>> interchangable.  (They aren't for allura, but we could move towards
>>>>>>>> that).  Then
>>>>>>>> this handle_message method could try finding a page for that
>> message,
>>>>>> and
>>>>>>>> if it
>>>>>>>> doesn't exist, it can convert any underscores back to spaces and
>> then
>>>>>> try
>>>>>>>> find
>>>>>>>> the wiki page under that name.
>>>>>>>>
>>>>>>>> To test the inbound mails, I'm unfortunately not seeing any tests in
>>>> the
>>>>>>>> code.
>>>>>>>> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file
>>>>>> has a
>>>>>>>> TestBulkExport class and you could copy most of its setup, and then
>>>> add
>>>>>> a
>>>>>>>> test_email test case that calls wiki.handle_message.
>>>>>>>>
>>>>>>>> The other way is to use telnet or other tools like that to send the
>>>> mail
>>>>>>>> into
>>>>>>>> the "inmail" docker compose container, or `paster smtp_server`
>> service
>>>>>> if
>>>>>>>> you
>>>>>>>> aren't using docker.  There's an example of doing that in the middle
>>>> of
>>>>>>>> this
>>>>>>>> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
>>>>>>>>
>>>>>>>> Hope that helps!  It sounds a little more complex of a ticket than I
>>>>>>>> initially
>>>>>>>> thought it would be.  Let us know if you have any more questions or
>>>> get
>>>>>>>> stuck on
>>>>>>>> anything.
>>>>>>>>
>>>>>>>> -Dave
>>>>>>>>
>>>>>>>> On 5/1/18 12:45 PM, Deshani Geethika wrote:
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> During last few days, I spent time on reading the Allura
>>>> documentation
>>>>>>>> and
>>>>>>>>> on getting familiarized with Allura codebase.
>>>>>>>>>
>>>>>>>>> Then, I have started to work on the ticket - #1699 Fix incoming
>> email
>>>>>> for
>>>>>>>>> wiki pages with space in the title
>>>>>>>>> <https://forge-allura.apache.org/p/allura/tickets/1699/>.
>> According
>>>> to
>>>>>>>> my
>>>>>>>>> understanding, it is required to replace the spaces in the title
>> with
>>>>>>>> null
>>>>>>>>> string (or with some character). Therefore, the getter method for
>>>>>>>>> email_address which is in Page.class in
>>>> ForgeWiki/forgewiki/model/wiki
>>>>>>>> .py
>>>>>>>>> should be changed as below.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> @property
>>>>>>>>> def email_address(self):
>>>>>>>>>        if context.app.config.options.get('AllowEmailPosting',
>> True):
>>>>>>>>>                domain = self.email_domain
>>>>>>>>>     * self.title.replace(‘ ‘,’’) // Added line*
>>>>>>>>>                return '%s@%s%s' % (self.title.replace('/', '.'),
>>>>>> domain,
>>>>>>>>> config.common_suffix)
>>>>>>>>>        else:
>>>>>>>>>                return tg_config.get('forgemail.return_path')
>>>>>>>>>
>>>>>>>>> Could you tell me whether, do I need to modify any method other
>> than
>>>>>> the
>>>>>>>>> above one?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards!
>>>>>>>>>
>>>>>>>>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
>>>>>>>>> deshanigeethika@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Dave,
>>>>>>>>>>
>>>>>>>>>> Thanks for the detailed explanation. I will start working on this
>>>> and
>>>>>>>> come
>>>>>>>>>> back to you with my progress
>>>>>>>>>>
>>>>>>>>>> Regards!
>>>>>>>>>>
>>>>>>>>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <
>> dave@brondsema.net
>>>>>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
>>>>>>>>>>>> Hi Dave,
>>>>>>>>>>>>
>>>>>>>>>>>> As per GSoC official time-line, from 23rd April to 14th May
>> period
>>>>>> is
>>>>>>>>>>>> considered as "Community Bonding Period".
>>>>>>>>>>>>
>>>>>>>>>>>> During this period I would like to finalize my design and
>> separate
>>>>>> my
>>>>>>>>>>>> project into several tickets. Also, I would like to get more
>>>>>>>>>>> familiarized
>>>>>>>>>>>> with Allura code-base and Allura team.
>>>>>>>>>>>>
>>>>>>>>>>>> Could you guide me what would be the best way to start off with.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards!
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Sounds like good goals for the community bonding period.
>>>>>>>>>>>
>>>>>>>>>>> I've added you as a developer on our self-hosted Allura project
>>>>>>>>>>> https://forge-allura.apache.org/p/allura/ which means you can
>>>> assign
>>>>>>>>>>> tickets to
>>>>>>>>>>> yourself, make new ones, update existing ones, etc.  I'd
>> recommend
>>>>>>>> having
>>>>>>>>>>> many
>>>>>>>>>>> small incremental tickets (perhaps even smaller pieces of work
>> than
>>>>>> you
>>>>>>>>>>> outlined
>>>>>>>>>>> in the project proposal), so that its easy to manage them and
>>>> review
>>>>>>>>>>> them.  And
>>>>>>>>>>> of course you don't need to make them all right away :)
>>>>>>>>>>>
>>>>>>>>>>> To familiarize yourself with Allura, you can read more of the
>>>>>>>>>>> documentation -
>>>>>>>>>>> assuming you haven't read it all already ;)
>>>>>>>>>>> https://forge-allura.apache.org/docs/
>>>>>>>>>>>
>>>>>>>>>>> And working on Allura code itself is best.  Find an existing
>> ticket
>>>>>> or
>>>>>>>>>>> anything
>>>>>>>>>>> you notice that could be made better, and make a fix for it.  A
>>>>>> really
>>>>>>>>>>> easy one
>>>>>>>>>>> that I could suggest is https://forge-allura.apache.or
>>>>>>>>>>> g/p/allura/tickets/1699/
>>>>>>>>>>>
>>>>>>>>>>> I've also noticed that our test suite has failed the past few
>>>> times:
>>>>>>>>>>> https://builds.apache.org/blue/organizations/jenkins/
>>>> Allura/activity
>>>>>>>> It
>>>>>>>>>>> probably is related to the "Make debug pages and post permalinks
>>>> work
>>>>>>>>>>> correctly
>>>>>>>>>>> when behind a proxy" commit.  You could take a look at fixing
>> that
>>>> if
>>>>>>>> you
>>>>>>>>>>> want.
>>>>>>>>>>> Otherwise I will soon.
>>>>>>>>>>>
>>>>>>>>>>> Lastly, reviewing other people's work is a good way to get
>> familiar
>>>>>>>> with
>>>>>>>>>>> the
>>>>>>>>>>> code and best practices.  I will have a fix for
>>>>>>>>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming
>>>> soon,
>>>>>> so
>>>>>>>>>>> watch out
>>>>>>>>>>> for that.  You won't be able to merge my branch to master, but it
>>>> can
>>>>>>>> be
>>>>>>>>>>> a good
>>>>>>>>>>> way for you to learn from others.  And any constructive feedback
>>>>>> would
>>>>>>>> be
>>>>>>>>>>> welcome too, of course.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>>>>>> http://www.brondsema.net : personal
>>>>>>>>>>> http://www.splike.com : programming
>>>>>>>>>>>               <><
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> *Deshani Geethika*
>>>>>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>>> http://www.brondsema.net : personal
>>>>>>>> http://www.splike.com : programming
>>>>>>>>               <><
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>> http://www.brondsema.net : personal
>>>>>> http://www.splike.com : programming
>>>>>>               <><
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dave Brondsema : dave@brondsema.net
>>>> http://www.brondsema.net : personal
>>>> http://www.splike.com : programming
>>>>               <><
>>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
> 
> 
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Thanks. Can we make it tomorrow (18th May) 10am ET? or any other convenient
time of your choice.

Is it a Hangouts call? or please let me know if I need to setup any other
application

Regards!

On Thu, May 17, 2018 at 8:57 PM, Dave Brondsema <da...@brondsema.net> wrote:

> Sure.  I am available 10am-6pm ET on weekdays, and also Sat/Sun could be
> available 12pm - 10pm.
> https://www.timeanddate.com/worldclock/converter.html?p1=tz_ist&p2=tz_et
>
> On 5/17/18 7:10 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > To get an overview about Allura code-base and conventions, it would be
> > great if we can arrange a call. Could you tell me your available time
> slots
> > for a meeting.
> > My time zone is IST (+0530).
> >
> > Regards!
> >
> > On Mon, May 14, 2018 at 9:44 PM, Dave Brondsema <da...@brondsema.net>
> wrote:
> >
> >> Hi,
> >>
> >> Allura can be pretty flexible, but in general we follow these
> conventions:
> >>
> >> Core components that are deeply integrated into allura go in the
> >> Allura/allura/model & controllers directories.
> >>
> >> Non-essential components go in the Allura/allura/ext/ directory.  Like
> >> "extra"
> >> or "extensions".  So this would make sense for the personal dashboard I
> >> think.
> >>
> >> Standalone components that can be their application go in ForgeBlog,
> >> ForgeChat,
> >> etc. as separate python packages.
> >>
> >> -Dave
> >>
> >> On 5/14/18 9:44 AM, Deshani Geethika wrote:
> >>> Hi Dave,
> >>>
> >>> During last few days I was working on my GSoC project and I have few
> >>> problems to be clarified.
> >>>
> >>> In my proposal
> >>> <https://docs.google.com/document/d/1clWKSJ8-
> >> ektpVaEgiJyoM34ievwkyCnD4uORMCT0eM8/edit?usp=sharing>
> >>> I have mentioned that, personal_dashboard folder should be created on
> the
> >>> path Allura/allura/ext/personal_dashboard. But, I have a confusion
> >> whether
> >>> this path is correct, since the Personal Dashboard is not an
> application.
> >>>
> >>> Therefore, I have followed the neighborhood implementation and found
> out
> >>> that its templates are in the path Allura/allura/templates. Also, its
> >>> implementation (neighborhood.py) is in the path
> >>> Allura/allura/model/neighborhood.py.
> >>>
> >>> From above two paths, what is the correct convention that I should
> >> follow?
> >>>
> >>> Regards!
> >>>
> >>> On Thu, May 3, 2018 at 3:21 AM, Dave Brondsema <da...@brondsema.net>
> >> wrote:
> >>>
> >>>> On 5/2/18 11:24 AM, Deshani Geethika wrote:
> >>>>> Hi Dave,
> >>>>>
> >>>>> Thanks for the information. I have few questions to be clarified.
> >>>>>
> >>>>> I think replacing spaces with underscores would be a good way to do
> it,
> >>>>> since on many wikis they are
> >>>>> interchangable.  (They aren't for allura, but we could move towards
> >>>> that).
> >>>>>
> >>>>> Here do you mean that spaces and underscores in a title are
> considered
> >> as
> >>>>> same characters?
> >>>>>
> >>>>> For example : "The Title" is considered same as "The_Title".
> >>>>
> >>>> Yes that's what I was thinking.
> >>>>
> >>>>>
> >>>>> In this situation, users should not be allowed to create 2 wikis with
> >>>> above
> >>>>> titles, because we can't handle inbound emails for both scenarios.
> >>>>
> >>>> Good point, I hadn't thought of that.  That does make this more
> >>>> complicated.
> >>>> Maybe it could be a followup step to prevent creating a page that
> >>>> conflicts with
> >>>> another one.  And then even later on we could make URLs handle spaces
> >> and
> >>>> underscores interchangably.
> >>>>
> >>>> Anyone else have ideas about what would be best?
> >>>>
> >>>>>
> >>>>> Also, we have another problem here.
> >>>>>
> >>>>> Then this handle_message method could try finding a page for that
> >>>> message,
> >>>>> and if it
> >>>>> doesn't exist, it can convert any underscores back to spaces and then
> >> try
> >>>>> find
> >>>>> the wiki page under that name.
> >>>>>
> >>>>> Here do I need to check for all the possible number of combinations
> of
> >>>>> underscores and spaces to find out the exact wiki page?
> >>>>
> >>>>
> >>>> I was thinking if an email comes in for "Foo_Bar_Baz" first look for
> one
> >>>> titled
> >>>> "Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every
> >> combination
> >>>> could
> >>>> get crazy.
> >>>>
> >>>>>
> >>>>> Regards!
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net>
> >>>> wrote:
> >>>>>
> >>>>>> Cool.  That email_address property should be the main one and
> changing
> >>>> it
> >>>>>> should
> >>>>>> reflect in the outgoing emails that are sent to subscribers after
> >>>>>> commenting or
> >>>>>> editing a wiki page.
> >>>>>>
> >>>>>> Allura also supports *inbound* emails on most artifacts including
> wiki
> >>>>>> pages.
> >>>>>> So someone could reply to the wiki email and it would be received by
> >>>>>> Allura and
> >>>>>> added as a comment on the wiki page.  The
> >>>>>> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
> >>>>>> responsible
> >>>>>> for that.  So that code should be updated as well.  I think
> replacing
> >>>>>> spaces
> >>>>>> with underscores would be a good way to do it, since on many wikis
> >> they
> >>>> are
> >>>>>> interchangable.  (They aren't for allura, but we could move towards
> >>>>>> that).  Then
> >>>>>> this handle_message method could try finding a page for that
> message,
> >>>> and
> >>>>>> if it
> >>>>>> doesn't exist, it can convert any underscores back to spaces and
> then
> >>>> try
> >>>>>> find
> >>>>>> the wiki page under that name.
> >>>>>>
> >>>>>> To test the inbound mails, I'm unfortunately not seeing any tests in
> >> the
> >>>>>> code.
> >>>>>> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file
> >>>> has a
> >>>>>> TestBulkExport class and you could copy most of its setup, and then
> >> add
> >>>> a
> >>>>>> test_email test case that calls wiki.handle_message.
> >>>>>>
> >>>>>> The other way is to use telnet or other tools like that to send the
> >> mail
> >>>>>> into
> >>>>>> the "inmail" docker compose container, or `paster smtp_server`
> service
> >>>> if
> >>>>>> you
> >>>>>> aren't using docker.  There's an example of doing that in the middle
> >> of
> >>>>>> this
> >>>>>> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
> >>>>>>
> >>>>>> Hope that helps!  It sounds a little more complex of a ticket than I
> >>>>>> initially
> >>>>>> thought it would be.  Let us know if you have any more questions or
> >> get
> >>>>>> stuck on
> >>>>>> anything.
> >>>>>>
> >>>>>> -Dave
> >>>>>>
> >>>>>> On 5/1/18 12:45 PM, Deshani Geethika wrote:
> >>>>>>> Hi all,
> >>>>>>>
> >>>>>>> During last few days, I spent time on reading the Allura
> >> documentation
> >>>>>> and
> >>>>>>> on getting familiarized with Allura codebase.
> >>>>>>>
> >>>>>>> Then, I have started to work on the ticket - #1699 Fix incoming
> email
> >>>> for
> >>>>>>> wiki pages with space in the title
> >>>>>>> <https://forge-allura.apache.org/p/allura/tickets/1699/>.
> According
> >> to
> >>>>>> my
> >>>>>>> understanding, it is required to replace the spaces in the title
> with
> >>>>>> null
> >>>>>>> string (or with some character). Therefore, the getter method for
> >>>>>>> email_address which is in Page.class in
> >> ForgeWiki/forgewiki/model/wiki
> >>>>>> .py
> >>>>>>> should be changed as below.
> >>>>>>>
> >>>>>>>
> >>>>>>> @property
> >>>>>>> def email_address(self):
> >>>>>>>        if context.app.config.options.get('AllowEmailPosting',
> True):
> >>>>>>>                domain = self.email_domain
> >>>>>>>     * self.title.replace(‘ ‘,’’) // Added line*
> >>>>>>>                return '%s@%s%s' % (self.title.replace('/', '.'),
> >>>> domain,
> >>>>>>> config.common_suffix)
> >>>>>>>        else:
> >>>>>>>                return tg_config.get('forgemail.return_path')
> >>>>>>>
> >>>>>>> Could you tell me whether, do I need to modify any method other
> than
> >>>> the
> >>>>>>> above one?
> >>>>>>>
> >>>>>>>
> >>>>>>> Regards!
> >>>>>>>
> >>>>>>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
> >>>>>>> deshanigeethika@gmail.com> wrote:
> >>>>>>>
> >>>>>>>> Hi Dave,
> >>>>>>>>
> >>>>>>>> Thanks for the detailed explanation. I will start working on this
> >> and
> >>>>>> come
> >>>>>>>> back to you with my progress
> >>>>>>>>
> >>>>>>>> Regards!
> >>>>>>>>
> >>>>>>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <
> dave@brondsema.net
> >>>
> >>>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
> >>>>>>>>>> Hi Dave,
> >>>>>>>>>>
> >>>>>>>>>> As per GSoC official time-line, from 23rd April to 14th May
> period
> >>>> is
> >>>>>>>>>> considered as "Community Bonding Period".
> >>>>>>>>>>
> >>>>>>>>>> During this period I would like to finalize my design and
> separate
> >>>> my
> >>>>>>>>>> project into several tickets. Also, I would like to get more
> >>>>>>>>> familiarized
> >>>>>>>>>> with Allura code-base and Allura team.
> >>>>>>>>>>
> >>>>>>>>>> Could you guide me what would be the best way to start off with.
> >>>>>>>>>>
> >>>>>>>>>> Regards!
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Sounds like good goals for the community bonding period.
> >>>>>>>>>
> >>>>>>>>> I've added you as a developer on our self-hosted Allura project
> >>>>>>>>> https://forge-allura.apache.org/p/allura/ which means you can
> >> assign
> >>>>>>>>> tickets to
> >>>>>>>>> yourself, make new ones, update existing ones, etc.  I'd
> recommend
> >>>>>> having
> >>>>>>>>> many
> >>>>>>>>> small incremental tickets (perhaps even smaller pieces of work
> than
> >>>> you
> >>>>>>>>> outlined
> >>>>>>>>> in the project proposal), so that its easy to manage them and
> >> review
> >>>>>>>>> them.  And
> >>>>>>>>> of course you don't need to make them all right away :)
> >>>>>>>>>
> >>>>>>>>> To familiarize yourself with Allura, you can read more of the
> >>>>>>>>> documentation -
> >>>>>>>>> assuming you haven't read it all already ;)
> >>>>>>>>> https://forge-allura.apache.org/docs/
> >>>>>>>>>
> >>>>>>>>> And working on Allura code itself is best.  Find an existing
> ticket
> >>>> or
> >>>>>>>>> anything
> >>>>>>>>> you notice that could be made better, and make a fix for it.  A
> >>>> really
> >>>>>>>>> easy one
> >>>>>>>>> that I could suggest is https://forge-allura.apache.or
> >>>>>>>>> g/p/allura/tickets/1699/
> >>>>>>>>>
> >>>>>>>>> I've also noticed that our test suite has failed the past few
> >> times:
> >>>>>>>>> https://builds.apache.org/blue/organizations/jenkins/
> >> Allura/activity
> >>>>>> It
> >>>>>>>>> probably is related to the "Make debug pages and post permalinks
> >> work
> >>>>>>>>> correctly
> >>>>>>>>> when behind a proxy" commit.  You could take a look at fixing
> that
> >> if
> >>>>>> you
> >>>>>>>>> want.
> >>>>>>>>> Otherwise I will soon.
> >>>>>>>>>
> >>>>>>>>> Lastly, reviewing other people's work is a good way to get
> familiar
> >>>>>> with
> >>>>>>>>> the
> >>>>>>>>> code and best practices.  I will have a fix for
> >>>>>>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming
> >> soon,
> >>>> so
> >>>>>>>>> watch out
> >>>>>>>>> for that.  You won't be able to merge my branch to master, but it
> >> can
> >>>>>> be
> >>>>>>>>> a good
> >>>>>>>>> way for you to learn from others.  And any constructive feedback
> >>>> would
> >>>>>> be
> >>>>>>>>> welcome too, of course.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> --
> >>>>>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>>>>> http://www.brondsema.net : personal
> >>>>>>>>> http://www.splike.com : programming
> >>>>>>>>>               <><
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> *Deshani Geethika*
> >>>>>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>> http://www.brondsema.net : personal
> >>>>>> http://www.splike.com : programming
> >>>>>>               <><
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Dave Brondsema : dave@brondsema.net
> >>>> http://www.brondsema.net : personal
> >>>> http://www.splike.com : programming
> >>>>               <><
> >>>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Dave Brondsema : dave@brondsema.net
> >> http://www.brondsema.net : personal
> >> http://www.splike.com : programming
> >>               <><
> >>
> >
> >
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>



-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
Sure.  I am available 10am-6pm ET on weekdays, and also Sat/Sun could be
available 12pm - 10pm.
https://www.timeanddate.com/worldclock/converter.html?p1=tz_ist&p2=tz_et

On 5/17/18 7:10 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> To get an overview about Allura code-base and conventions, it would be
> great if we can arrange a call. Could you tell me your available time slots
> for a meeting.
> My time zone is IST (+0530).
> 
> Regards!
> 
> On Mon, May 14, 2018 at 9:44 PM, Dave Brondsema <da...@brondsema.net> wrote:
> 
>> Hi,
>>
>> Allura can be pretty flexible, but in general we follow these conventions:
>>
>> Core components that are deeply integrated into allura go in the
>> Allura/allura/model & controllers directories.
>>
>> Non-essential components go in the Allura/allura/ext/ directory.  Like
>> "extra"
>> or "extensions".  So this would make sense for the personal dashboard I
>> think.
>>
>> Standalone components that can be their application go in ForgeBlog,
>> ForgeChat,
>> etc. as separate python packages.
>>
>> -Dave
>>
>> On 5/14/18 9:44 AM, Deshani Geethika wrote:
>>> Hi Dave,
>>>
>>> During last few days I was working on my GSoC project and I have few
>>> problems to be clarified.
>>>
>>> In my proposal
>>> <https://docs.google.com/document/d/1clWKSJ8-
>> ektpVaEgiJyoM34ievwkyCnD4uORMCT0eM8/edit?usp=sharing>
>>> I have mentioned that, personal_dashboard folder should be created on the
>>> path Allura/allura/ext/personal_dashboard. But, I have a confusion
>> whether
>>> this path is correct, since the Personal Dashboard is not an application.
>>>
>>> Therefore, I have followed the neighborhood implementation and found out
>>> that its templates are in the path Allura/allura/templates. Also, its
>>> implementation (neighborhood.py) is in the path
>>> Allura/allura/model/neighborhood.py.
>>>
>>> From above two paths, what is the correct convention that I should
>> follow?
>>>
>>> Regards!
>>>
>>> On Thu, May 3, 2018 at 3:21 AM, Dave Brondsema <da...@brondsema.net>
>> wrote:
>>>
>>>> On 5/2/18 11:24 AM, Deshani Geethika wrote:
>>>>> Hi Dave,
>>>>>
>>>>> Thanks for the information. I have few questions to be clarified.
>>>>>
>>>>> I think replacing spaces with underscores would be a good way to do it,
>>>>> since on many wikis they are
>>>>> interchangable.  (They aren't for allura, but we could move towards
>>>> that).
>>>>>
>>>>> Here do you mean that spaces and underscores in a title are considered
>> as
>>>>> same characters?
>>>>>
>>>>> For example : "The Title" is considered same as "The_Title".
>>>>
>>>> Yes that's what I was thinking.
>>>>
>>>>>
>>>>> In this situation, users should not be allowed to create 2 wikis with
>>>> above
>>>>> titles, because we can't handle inbound emails for both scenarios.
>>>>
>>>> Good point, I hadn't thought of that.  That does make this more
>>>> complicated.
>>>> Maybe it could be a followup step to prevent creating a page that
>>>> conflicts with
>>>> another one.  And then even later on we could make URLs handle spaces
>> and
>>>> underscores interchangably.
>>>>
>>>> Anyone else have ideas about what would be best?
>>>>
>>>>>
>>>>> Also, we have another problem here.
>>>>>
>>>>> Then this handle_message method could try finding a page for that
>>>> message,
>>>>> and if it
>>>>> doesn't exist, it can convert any underscores back to spaces and then
>> try
>>>>> find
>>>>> the wiki page under that name.
>>>>>
>>>>> Here do I need to check for all the possible number of combinations of
>>>>> underscores and spaces to find out the exact wiki page?
>>>>
>>>>
>>>> I was thinking if an email comes in for "Foo_Bar_Baz" first look for one
>>>> titled
>>>> "Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every
>> combination
>>>> could
>>>> get crazy.
>>>>
>>>>>
>>>>> Regards!
>>>>>
>>>>>
>>>>>
>>>>> On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net>
>>>> wrote:
>>>>>
>>>>>> Cool.  That email_address property should be the main one and changing
>>>> it
>>>>>> should
>>>>>> reflect in the outgoing emails that are sent to subscribers after
>>>>>> commenting or
>>>>>> editing a wiki page.
>>>>>>
>>>>>> Allura also supports *inbound* emails on most artifacts including wiki
>>>>>> pages.
>>>>>> So someone could reply to the wiki email and it would be received by
>>>>>> Allura and
>>>>>> added as a comment on the wiki page.  The
>>>>>> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
>>>>>> responsible
>>>>>> for that.  So that code should be updated as well.  I think replacing
>>>>>> spaces
>>>>>> with underscores would be a good way to do it, since on many wikis
>> they
>>>> are
>>>>>> interchangable.  (They aren't for allura, but we could move towards
>>>>>> that).  Then
>>>>>> this handle_message method could try finding a page for that message,
>>>> and
>>>>>> if it
>>>>>> doesn't exist, it can convert any underscores back to spaces and then
>>>> try
>>>>>> find
>>>>>> the wiki page under that name.
>>>>>>
>>>>>> To test the inbound mails, I'm unfortunately not seeing any tests in
>> the
>>>>>> code.
>>>>>> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file
>>>> has a
>>>>>> TestBulkExport class and you could copy most of its setup, and then
>> add
>>>> a
>>>>>> test_email test case that calls wiki.handle_message.
>>>>>>
>>>>>> The other way is to use telnet or other tools like that to send the
>> mail
>>>>>> into
>>>>>> the "inmail" docker compose container, or `paster smtp_server` service
>>>> if
>>>>>> you
>>>>>> aren't using docker.  There's an example of doing that in the middle
>> of
>>>>>> this
>>>>>> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
>>>>>>
>>>>>> Hope that helps!  It sounds a little more complex of a ticket than I
>>>>>> initially
>>>>>> thought it would be.  Let us know if you have any more questions or
>> get
>>>>>> stuck on
>>>>>> anything.
>>>>>>
>>>>>> -Dave
>>>>>>
>>>>>> On 5/1/18 12:45 PM, Deshani Geethika wrote:
>>>>>>> Hi all,
>>>>>>>
>>>>>>> During last few days, I spent time on reading the Allura
>> documentation
>>>>>> and
>>>>>>> on getting familiarized with Allura codebase.
>>>>>>>
>>>>>>> Then, I have started to work on the ticket - #1699 Fix incoming email
>>>> for
>>>>>>> wiki pages with space in the title
>>>>>>> <https://forge-allura.apache.org/p/allura/tickets/1699/>. According
>> to
>>>>>> my
>>>>>>> understanding, it is required to replace the spaces in the title with
>>>>>> null
>>>>>>> string (or with some character). Therefore, the getter method for
>>>>>>> email_address which is in Page.class in
>> ForgeWiki/forgewiki/model/wiki
>>>>>> .py
>>>>>>> should be changed as below.
>>>>>>>
>>>>>>>
>>>>>>> @property
>>>>>>> def email_address(self):
>>>>>>>        if context.app.config.options.get('AllowEmailPosting', True):
>>>>>>>                domain = self.email_domain
>>>>>>>     * self.title.replace(‘ ‘,’’) // Added line*
>>>>>>>                return '%s@%s%s' % (self.title.replace('/', '.'),
>>>> domain,
>>>>>>> config.common_suffix)
>>>>>>>        else:
>>>>>>>                return tg_config.get('forgemail.return_path')
>>>>>>>
>>>>>>> Could you tell me whether, do I need to modify any method other than
>>>> the
>>>>>>> above one?
>>>>>>>
>>>>>>>
>>>>>>> Regards!
>>>>>>>
>>>>>>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
>>>>>>> deshanigeethika@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Dave,
>>>>>>>>
>>>>>>>> Thanks for the detailed explanation. I will start working on this
>> and
>>>>>> come
>>>>>>>> back to you with my progress
>>>>>>>>
>>>>>>>> Regards!
>>>>>>>>
>>>>>>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <dave@brondsema.net
>>>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
>>>>>>>>>> Hi Dave,
>>>>>>>>>>
>>>>>>>>>> As per GSoC official time-line, from 23rd April to 14th May period
>>>> is
>>>>>>>>>> considered as "Community Bonding Period".
>>>>>>>>>>
>>>>>>>>>> During this period I would like to finalize my design and separate
>>>> my
>>>>>>>>>> project into several tickets. Also, I would like to get more
>>>>>>>>> familiarized
>>>>>>>>>> with Allura code-base and Allura team.
>>>>>>>>>>
>>>>>>>>>> Could you guide me what would be the best way to start off with.
>>>>>>>>>>
>>>>>>>>>> Regards!
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Sounds like good goals for the community bonding period.
>>>>>>>>>
>>>>>>>>> I've added you as a developer on our self-hosted Allura project
>>>>>>>>> https://forge-allura.apache.org/p/allura/ which means you can
>> assign
>>>>>>>>> tickets to
>>>>>>>>> yourself, make new ones, update existing ones, etc.  I'd recommend
>>>>>> having
>>>>>>>>> many
>>>>>>>>> small incremental tickets (perhaps even smaller pieces of work than
>>>> you
>>>>>>>>> outlined
>>>>>>>>> in the project proposal), so that its easy to manage them and
>> review
>>>>>>>>> them.  And
>>>>>>>>> of course you don't need to make them all right away :)
>>>>>>>>>
>>>>>>>>> To familiarize yourself with Allura, you can read more of the
>>>>>>>>> documentation -
>>>>>>>>> assuming you haven't read it all already ;)
>>>>>>>>> https://forge-allura.apache.org/docs/
>>>>>>>>>
>>>>>>>>> And working on Allura code itself is best.  Find an existing ticket
>>>> or
>>>>>>>>> anything
>>>>>>>>> you notice that could be made better, and make a fix for it.  A
>>>> really
>>>>>>>>> easy one
>>>>>>>>> that I could suggest is https://forge-allura.apache.or
>>>>>>>>> g/p/allura/tickets/1699/
>>>>>>>>>
>>>>>>>>> I've also noticed that our test suite has failed the past few
>> times:
>>>>>>>>> https://builds.apache.org/blue/organizations/jenkins/
>> Allura/activity
>>>>>> It
>>>>>>>>> probably is related to the "Make debug pages and post permalinks
>> work
>>>>>>>>> correctly
>>>>>>>>> when behind a proxy" commit.  You could take a look at fixing that
>> if
>>>>>> you
>>>>>>>>> want.
>>>>>>>>> Otherwise I will soon.
>>>>>>>>>
>>>>>>>>> Lastly, reviewing other people's work is a good way to get familiar
>>>>>> with
>>>>>>>>> the
>>>>>>>>> code and best practices.  I will have a fix for
>>>>>>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming
>> soon,
>>>> so
>>>>>>>>> watch out
>>>>>>>>> for that.  You won't be able to merge my branch to master, but it
>> can
>>>>>> be
>>>>>>>>> a good
>>>>>>>>> way for you to learn from others.  And any constructive feedback
>>>> would
>>>>>> be
>>>>>>>>> welcome too, of course.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>>>> http://www.brondsema.net : personal
>>>>>>>>> http://www.splike.com : programming
>>>>>>>>>               <><
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Deshani Geethika*
>>>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>> http://www.brondsema.net : personal
>>>>>> http://www.splike.com : programming
>>>>>>               <><
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dave Brondsema : dave@brondsema.net
>>>> http://www.brondsema.net : personal
>>>> http://www.splike.com : programming
>>>>               <><
>>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
> 
> 
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

To get an overview about Allura code-base and conventions, it would be
great if we can arrange a call. Could you tell me your available time slots
for a meeting.
My time zone is IST (+0530).

Regards!

On Mon, May 14, 2018 at 9:44 PM, Dave Brondsema <da...@brondsema.net> wrote:

> Hi,
>
> Allura can be pretty flexible, but in general we follow these conventions:
>
> Core components that are deeply integrated into allura go in the
> Allura/allura/model & controllers directories.
>
> Non-essential components go in the Allura/allura/ext/ directory.  Like
> "extra"
> or "extensions".  So this would make sense for the personal dashboard I
> think.
>
> Standalone components that can be their application go in ForgeBlog,
> ForgeChat,
> etc. as separate python packages.
>
> -Dave
>
> On 5/14/18 9:44 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > During last few days I was working on my GSoC project and I have few
> > problems to be clarified.
> >
> > In my proposal
> > <https://docs.google.com/document/d/1clWKSJ8-
> ektpVaEgiJyoM34ievwkyCnD4uORMCT0eM8/edit?usp=sharing>
> > I have mentioned that, personal_dashboard folder should be created on the
> > path Allura/allura/ext/personal_dashboard. But, I have a confusion
> whether
> > this path is correct, since the Personal Dashboard is not an application.
> >
> > Therefore, I have followed the neighborhood implementation and found out
> > that its templates are in the path Allura/allura/templates. Also, its
> > implementation (neighborhood.py) is in the path
> > Allura/allura/model/neighborhood.py.
> >
> > From above two paths, what is the correct convention that I should
> follow?
> >
> > Regards!
> >
> > On Thu, May 3, 2018 at 3:21 AM, Dave Brondsema <da...@brondsema.net>
> wrote:
> >
> >> On 5/2/18 11:24 AM, Deshani Geethika wrote:
> >>> Hi Dave,
> >>>
> >>> Thanks for the information. I have few questions to be clarified.
> >>>
> >>> I think replacing spaces with underscores would be a good way to do it,
> >>> since on many wikis they are
> >>> interchangable.  (They aren't for allura, but we could move towards
> >> that).
> >>>
> >>> Here do you mean that spaces and underscores in a title are considered
> as
> >>> same characters?
> >>>
> >>> For example : "The Title" is considered same as "The_Title".
> >>
> >> Yes that's what I was thinking.
> >>
> >>>
> >>> In this situation, users should not be allowed to create 2 wikis with
> >> above
> >>> titles, because we can't handle inbound emails for both scenarios.
> >>
> >> Good point, I hadn't thought of that.  That does make this more
> >> complicated.
> >> Maybe it could be a followup step to prevent creating a page that
> >> conflicts with
> >> another one.  And then even later on we could make URLs handle spaces
> and
> >> underscores interchangably.
> >>
> >> Anyone else have ideas about what would be best?
> >>
> >>>
> >>> Also, we have another problem here.
> >>>
> >>> Then this handle_message method could try finding a page for that
> >> message,
> >>> and if it
> >>> doesn't exist, it can convert any underscores back to spaces and then
> try
> >>> find
> >>> the wiki page under that name.
> >>>
> >>> Here do I need to check for all the possible number of combinations of
> >>> underscores and spaces to find out the exact wiki page?
> >>
> >>
> >> I was thinking if an email comes in for "Foo_Bar_Baz" first look for one
> >> titled
> >> "Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every
> combination
> >> could
> >> get crazy.
> >>
> >>>
> >>> Regards!
> >>>
> >>>
> >>>
> >>> On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net>
> >> wrote:
> >>>
> >>>> Cool.  That email_address property should be the main one and changing
> >> it
> >>>> should
> >>>> reflect in the outgoing emails that are sent to subscribers after
> >>>> commenting or
> >>>> editing a wiki page.
> >>>>
> >>>> Allura also supports *inbound* emails on most artifacts including wiki
> >>>> pages.
> >>>> So someone could reply to the wiki email and it would be received by
> >>>> Allura and
> >>>> added as a comment on the wiki page.  The
> >>>> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
> >>>> responsible
> >>>> for that.  So that code should be updated as well.  I think replacing
> >>>> spaces
> >>>> with underscores would be a good way to do it, since on many wikis
> they
> >> are
> >>>> interchangable.  (They aren't for allura, but we could move towards
> >>>> that).  Then
> >>>> this handle_message method could try finding a page for that message,
> >> and
> >>>> if it
> >>>> doesn't exist, it can convert any underscores back to spaces and then
> >> try
> >>>> find
> >>>> the wiki page under that name.
> >>>>
> >>>> To test the inbound mails, I'm unfortunately not seeing any tests in
> the
> >>>> code.
> >>>> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file
> >> has a
> >>>> TestBulkExport class and you could copy most of its setup, and then
> add
> >> a
> >>>> test_email test case that calls wiki.handle_message.
> >>>>
> >>>> The other way is to use telnet or other tools like that to send the
> mail
> >>>> into
> >>>> the "inmail" docker compose container, or `paster smtp_server` service
> >> if
> >>>> you
> >>>> aren't using docker.  There's an example of doing that in the middle
> of
> >>>> this
> >>>> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
> >>>>
> >>>> Hope that helps!  It sounds a little more complex of a ticket than I
> >>>> initially
> >>>> thought it would be.  Let us know if you have any more questions or
> get
> >>>> stuck on
> >>>> anything.
> >>>>
> >>>> -Dave
> >>>>
> >>>> On 5/1/18 12:45 PM, Deshani Geethika wrote:
> >>>>> Hi all,
> >>>>>
> >>>>> During last few days, I spent time on reading the Allura
> documentation
> >>>> and
> >>>>> on getting familiarized with Allura codebase.
> >>>>>
> >>>>> Then, I have started to work on the ticket - #1699 Fix incoming email
> >> for
> >>>>> wiki pages with space in the title
> >>>>> <https://forge-allura.apache.org/p/allura/tickets/1699/>. According
> to
> >>>> my
> >>>>> understanding, it is required to replace the spaces in the title with
> >>>> null
> >>>>> string (or with some character). Therefore, the getter method for
> >>>>> email_address which is in Page.class in
> ForgeWiki/forgewiki/model/wiki
> >>>> .py
> >>>>> should be changed as below.
> >>>>>
> >>>>>
> >>>>> @property
> >>>>> def email_address(self):
> >>>>>        if context.app.config.options.get('AllowEmailPosting', True):
> >>>>>                domain = self.email_domain
> >>>>>     * self.title.replace(‘ ‘,’’) // Added line*
> >>>>>                return '%s@%s%s' % (self.title.replace('/', '.'),
> >> domain,
> >>>>> config.common_suffix)
> >>>>>        else:
> >>>>>                return tg_config.get('forgemail.return_path')
> >>>>>
> >>>>> Could you tell me whether, do I need to modify any method other than
> >> the
> >>>>> above one?
> >>>>>
> >>>>>
> >>>>> Regards!
> >>>>>
> >>>>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
> >>>>> deshanigeethika@gmail.com> wrote:
> >>>>>
> >>>>>> Hi Dave,
> >>>>>>
> >>>>>> Thanks for the detailed explanation. I will start working on this
> and
> >>>> come
> >>>>>> back to you with my progress
> >>>>>>
> >>>>>> Regards!
> >>>>>>
> >>>>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <dave@brondsema.net
> >
> >>>>>> wrote:
> >>>>>>
> >>>>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
> >>>>>>>> Hi Dave,
> >>>>>>>>
> >>>>>>>> As per GSoC official time-line, from 23rd April to 14th May period
> >> is
> >>>>>>>> considered as "Community Bonding Period".
> >>>>>>>>
> >>>>>>>> During this period I would like to finalize my design and separate
> >> my
> >>>>>>>> project into several tickets. Also, I would like to get more
> >>>>>>> familiarized
> >>>>>>>> with Allura code-base and Allura team.
> >>>>>>>>
> >>>>>>>> Could you guide me what would be the best way to start off with.
> >>>>>>>>
> >>>>>>>> Regards!
> >>>>>>>>
> >>>>>>>
> >>>>>>> Sounds like good goals for the community bonding period.
> >>>>>>>
> >>>>>>> I've added you as a developer on our self-hosted Allura project
> >>>>>>> https://forge-allura.apache.org/p/allura/ which means you can
> assign
> >>>>>>> tickets to
> >>>>>>> yourself, make new ones, update existing ones, etc.  I'd recommend
> >>>> having
> >>>>>>> many
> >>>>>>> small incremental tickets (perhaps even smaller pieces of work than
> >> you
> >>>>>>> outlined
> >>>>>>> in the project proposal), so that its easy to manage them and
> review
> >>>>>>> them.  And
> >>>>>>> of course you don't need to make them all right away :)
> >>>>>>>
> >>>>>>> To familiarize yourself with Allura, you can read more of the
> >>>>>>> documentation -
> >>>>>>> assuming you haven't read it all already ;)
> >>>>>>> https://forge-allura.apache.org/docs/
> >>>>>>>
> >>>>>>> And working on Allura code itself is best.  Find an existing ticket
> >> or
> >>>>>>> anything
> >>>>>>> you notice that could be made better, and make a fix for it.  A
> >> really
> >>>>>>> easy one
> >>>>>>> that I could suggest is https://forge-allura.apache.or
> >>>>>>> g/p/allura/tickets/1699/
> >>>>>>>
> >>>>>>> I've also noticed that our test suite has failed the past few
> times:
> >>>>>>> https://builds.apache.org/blue/organizations/jenkins/
> Allura/activity
> >>>> It
> >>>>>>> probably is related to the "Make debug pages and post permalinks
> work
> >>>>>>> correctly
> >>>>>>> when behind a proxy" commit.  You could take a look at fixing that
> if
> >>>> you
> >>>>>>> want.
> >>>>>>> Otherwise I will soon.
> >>>>>>>
> >>>>>>> Lastly, reviewing other people's work is a good way to get familiar
> >>>> with
> >>>>>>> the
> >>>>>>> code and best practices.  I will have a fix for
> >>>>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming
> soon,
> >> so
> >>>>>>> watch out
> >>>>>>> for that.  You won't be able to merge my branch to master, but it
> can
> >>>> be
> >>>>>>> a good
> >>>>>>> way for you to learn from others.  And any constructive feedback
> >> would
> >>>> be
> >>>>>>> welcome too, of course.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Dave Brondsema : dave@brondsema.net
> >>>>>>> http://www.brondsema.net : personal
> >>>>>>> http://www.splike.com : programming
> >>>>>>>               <><
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> *Deshani Geethika*
> >>>>>> Undergraduate at Department of Computer Science and Engineering
> >>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Dave Brondsema : dave@brondsema.net
> >>>> http://www.brondsema.net : personal
> >>>> http://www.splike.com : programming
> >>>>               <><
> >>>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Dave Brondsema : dave@brondsema.net
> >> http://www.brondsema.net : personal
> >> http://www.splike.com : programming
> >>               <><
> >>
> >
> >
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>



-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
Hi,

Allura can be pretty flexible, but in general we follow these conventions:

Core components that are deeply integrated into allura go in the
Allura/allura/model & controllers directories.

Non-essential components go in the Allura/allura/ext/ directory.  Like "extra"
or "extensions".  So this would make sense for the personal dashboard I think.

Standalone components that can be their application go in ForgeBlog, ForgeChat,
etc. as separate python packages.

-Dave

On 5/14/18 9:44 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> During last few days I was working on my GSoC project and I have few
> problems to be clarified.
> 
> In my proposal
> <https://docs.google.com/document/d/1clWKSJ8-ektpVaEgiJyoM34ievwkyCnD4uORMCT0eM8/edit?usp=sharing>
> I have mentioned that, personal_dashboard folder should be created on the
> path Allura/allura/ext/personal_dashboard. But, I have a confusion whether
> this path is correct, since the Personal Dashboard is not an application.
> 
> Therefore, I have followed the neighborhood implementation and found out
> that its templates are in the path Allura/allura/templates. Also, its
> implementation (neighborhood.py) is in the path
> Allura/allura/model/neighborhood.py.
> 
> From above two paths, what is the correct convention that I should follow?
> 
> Regards!
> 
> On Thu, May 3, 2018 at 3:21 AM, Dave Brondsema <da...@brondsema.net> wrote:
> 
>> On 5/2/18 11:24 AM, Deshani Geethika wrote:
>>> Hi Dave,
>>>
>>> Thanks for the information. I have few questions to be clarified.
>>>
>>> I think replacing spaces with underscores would be a good way to do it,
>>> since on many wikis they are
>>> interchangable.  (They aren't for allura, but we could move towards
>> that).
>>>
>>> Here do you mean that spaces and underscores in a title are considered as
>>> same characters?
>>>
>>> For example : "The Title" is considered same as "The_Title".
>>
>> Yes that's what I was thinking.
>>
>>>
>>> In this situation, users should not be allowed to create 2 wikis with
>> above
>>> titles, because we can't handle inbound emails for both scenarios.
>>
>> Good point, I hadn't thought of that.  That does make this more
>> complicated.
>> Maybe it could be a followup step to prevent creating a page that
>> conflicts with
>> another one.  And then even later on we could make URLs handle spaces and
>> underscores interchangably.
>>
>> Anyone else have ideas about what would be best?
>>
>>>
>>> Also, we have another problem here.
>>>
>>> Then this handle_message method could try finding a page for that
>> message,
>>> and if it
>>> doesn't exist, it can convert any underscores back to spaces and then try
>>> find
>>> the wiki page under that name.
>>>
>>> Here do I need to check for all the possible number of combinations of
>>> underscores and spaces to find out the exact wiki page?
>>
>>
>> I was thinking if an email comes in for "Foo_Bar_Baz" first look for one
>> titled
>> "Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every combination
>> could
>> get crazy.
>>
>>>
>>> Regards!
>>>
>>>
>>>
>>> On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net>
>> wrote:
>>>
>>>> Cool.  That email_address property should be the main one and changing
>> it
>>>> should
>>>> reflect in the outgoing emails that are sent to subscribers after
>>>> commenting or
>>>> editing a wiki page.
>>>>
>>>> Allura also supports *inbound* emails on most artifacts including wiki
>>>> pages.
>>>> So someone could reply to the wiki email and it would be received by
>>>> Allura and
>>>> added as a comment on the wiki page.  The
>>>> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
>>>> responsible
>>>> for that.  So that code should be updated as well.  I think replacing
>>>> spaces
>>>> with underscores would be a good way to do it, since on many wikis they
>> are
>>>> interchangable.  (They aren't for allura, but we could move towards
>>>> that).  Then
>>>> this handle_message method could try finding a page for that message,
>> and
>>>> if it
>>>> doesn't exist, it can convert any underscores back to spaces and then
>> try
>>>> find
>>>> the wiki page under that name.
>>>>
>>>> To test the inbound mails, I'm unfortunately not seeing any tests in the
>>>> code.
>>>> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file
>> has a
>>>> TestBulkExport class and you could copy most of its setup, and then add
>> a
>>>> test_email test case that calls wiki.handle_message.
>>>>
>>>> The other way is to use telnet or other tools like that to send the mail
>>>> into
>>>> the "inmail" docker compose container, or `paster smtp_server` service
>> if
>>>> you
>>>> aren't using docker.  There's an example of doing that in the middle of
>>>> this
>>>> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
>>>>
>>>> Hope that helps!  It sounds a little more complex of a ticket than I
>>>> initially
>>>> thought it would be.  Let us know if you have any more questions or get
>>>> stuck on
>>>> anything.
>>>>
>>>> -Dave
>>>>
>>>> On 5/1/18 12:45 PM, Deshani Geethika wrote:
>>>>> Hi all,
>>>>>
>>>>> During last few days, I spent time on reading the Allura documentation
>>>> and
>>>>> on getting familiarized with Allura codebase.
>>>>>
>>>>> Then, I have started to work on the ticket - #1699 Fix incoming email
>> for
>>>>> wiki pages with space in the title
>>>>> <https://forge-allura.apache.org/p/allura/tickets/1699/>. According to
>>>> my
>>>>> understanding, it is required to replace the spaces in the title with
>>>> null
>>>>> string (or with some character). Therefore, the getter method for
>>>>> email_address which is in Page.class in ForgeWiki/forgewiki/model/wiki
>>>> .py
>>>>> should be changed as below.
>>>>>
>>>>>
>>>>> @property
>>>>> def email_address(self):
>>>>>        if context.app.config.options.get('AllowEmailPosting', True):
>>>>>                domain = self.email_domain
>>>>>     * self.title.replace(‘ ‘,’’) // Added line*
>>>>>                return '%s@%s%s' % (self.title.replace('/', '.'),
>> domain,
>>>>> config.common_suffix)
>>>>>        else:
>>>>>                return tg_config.get('forgemail.return_path')
>>>>>
>>>>> Could you tell me whether, do I need to modify any method other than
>> the
>>>>> above one?
>>>>>
>>>>>
>>>>> Regards!
>>>>>
>>>>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
>>>>> deshanigeethika@gmail.com> wrote:
>>>>>
>>>>>> Hi Dave,
>>>>>>
>>>>>> Thanks for the detailed explanation. I will start working on this and
>>>> come
>>>>>> back to you with my progress
>>>>>>
>>>>>> Regards!
>>>>>>
>>>>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <da...@brondsema.net>
>>>>>> wrote:
>>>>>>
>>>>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
>>>>>>>> Hi Dave,
>>>>>>>>
>>>>>>>> As per GSoC official time-line, from 23rd April to 14th May period
>> is
>>>>>>>> considered as "Community Bonding Period".
>>>>>>>>
>>>>>>>> During this period I would like to finalize my design and separate
>> my
>>>>>>>> project into several tickets. Also, I would like to get more
>>>>>>> familiarized
>>>>>>>> with Allura code-base and Allura team.
>>>>>>>>
>>>>>>>> Could you guide me what would be the best way to start off with.
>>>>>>>>
>>>>>>>> Regards!
>>>>>>>>
>>>>>>>
>>>>>>> Sounds like good goals for the community bonding period.
>>>>>>>
>>>>>>> I've added you as a developer on our self-hosted Allura project
>>>>>>> https://forge-allura.apache.org/p/allura/ which means you can assign
>>>>>>> tickets to
>>>>>>> yourself, make new ones, update existing ones, etc.  I'd recommend
>>>> having
>>>>>>> many
>>>>>>> small incremental tickets (perhaps even smaller pieces of work than
>> you
>>>>>>> outlined
>>>>>>> in the project proposal), so that its easy to manage them and review
>>>>>>> them.  And
>>>>>>> of course you don't need to make them all right away :)
>>>>>>>
>>>>>>> To familiarize yourself with Allura, you can read more of the
>>>>>>> documentation -
>>>>>>> assuming you haven't read it all already ;)
>>>>>>> https://forge-allura.apache.org/docs/
>>>>>>>
>>>>>>> And working on Allura code itself is best.  Find an existing ticket
>> or
>>>>>>> anything
>>>>>>> you notice that could be made better, and make a fix for it.  A
>> really
>>>>>>> easy one
>>>>>>> that I could suggest is https://forge-allura.apache.or
>>>>>>> g/p/allura/tickets/1699/
>>>>>>>
>>>>>>> I've also noticed that our test suite has failed the past few times:
>>>>>>> https://builds.apache.org/blue/organizations/jenkins/Allura/activity
>>>> It
>>>>>>> probably is related to the "Make debug pages and post permalinks work
>>>>>>> correctly
>>>>>>> when behind a proxy" commit.  You could take a look at fixing that if
>>>> you
>>>>>>> want.
>>>>>>> Otherwise I will soon.
>>>>>>>
>>>>>>> Lastly, reviewing other people's work is a good way to get familiar
>>>> with
>>>>>>> the
>>>>>>> code and best practices.  I will have a fix for
>>>>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming soon,
>> so
>>>>>>> watch out
>>>>>>> for that.  You won't be able to merge my branch to master, but it can
>>>> be
>>>>>>> a good
>>>>>>> way for you to learn from others.  And any constructive feedback
>> would
>>>> be
>>>>>>> welcome too, of course.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dave Brondsema : dave@brondsema.net
>>>>>>> http://www.brondsema.net : personal
>>>>>>> http://www.splike.com : programming
>>>>>>>               <><
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Deshani Geethika*
>>>>>> Undergraduate at Department of Computer Science and Engineering
>>>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dave Brondsema : dave@brondsema.net
>>>> http://www.brondsema.net : personal
>>>> http://www.splike.com : programming
>>>>               <><
>>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
> 
> 
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

During last few days I was working on my GSoC project and I have few
problems to be clarified.

In my proposal
<https://docs.google.com/document/d/1clWKSJ8-ektpVaEgiJyoM34ievwkyCnD4uORMCT0eM8/edit?usp=sharing>
I have mentioned that, personal_dashboard folder should be created on the
path Allura/allura/ext/personal_dashboard. But, I have a confusion whether
this path is correct, since the Personal Dashboard is not an application.

Therefore, I have followed the neighborhood implementation and found out
that its templates are in the path Allura/allura/templates. Also, its
implementation (neighborhood.py) is in the path
Allura/allura/model/neighborhood.py.

From above two paths, what is the correct convention that I should follow?

Regards!

On Thu, May 3, 2018 at 3:21 AM, Dave Brondsema <da...@brondsema.net> wrote:

> On 5/2/18 11:24 AM, Deshani Geethika wrote:
> > Hi Dave,
> >
> > Thanks for the information. I have few questions to be clarified.
> >
> > I think replacing spaces with underscores would be a good way to do it,
> > since on many wikis they are
> > interchangable.  (They aren't for allura, but we could move towards
> that).
> >
> > Here do you mean that spaces and underscores in a title are considered as
> > same characters?
> >
> > For example : "The Title" is considered same as "The_Title".
>
> Yes that's what I was thinking.
>
> >
> > In this situation, users should not be allowed to create 2 wikis with
> above
> > titles, because we can't handle inbound emails for both scenarios.
>
> Good point, I hadn't thought of that.  That does make this more
> complicated.
> Maybe it could be a followup step to prevent creating a page that
> conflicts with
> another one.  And then even later on we could make URLs handle spaces and
> underscores interchangably.
>
> Anyone else have ideas about what would be best?
>
> >
> > Also, we have another problem here.
> >
> > Then this handle_message method could try finding a page for that
> message,
> > and if it
> > doesn't exist, it can convert any underscores back to spaces and then try
> > find
> > the wiki page under that name.
> >
> > Here do I need to check for all the possible number of combinations of
> > underscores and spaces to find out the exact wiki page?
>
>
> I was thinking if an email comes in for "Foo_Bar_Baz" first look for one
> titled
> "Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every combination
> could
> get crazy.
>
> >
> > Regards!
> >
> >
> >
> > On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net>
> wrote:
> >
> >> Cool.  That email_address property should be the main one and changing
> it
> >> should
> >> reflect in the outgoing emails that are sent to subscribers after
> >> commenting or
> >> editing a wiki page.
> >>
> >> Allura also supports *inbound* emails on most artifacts including wiki
> >> pages.
> >> So someone could reply to the wiki email and it would be received by
> >> Allura and
> >> added as a comment on the wiki page.  The
> >> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
> >> responsible
> >> for that.  So that code should be updated as well.  I think replacing
> >> spaces
> >> with underscores would be a good way to do it, since on many wikis they
> are
> >> interchangable.  (They aren't for allura, but we could move towards
> >> that).  Then
> >> this handle_message method could try finding a page for that message,
> and
> >> if it
> >> doesn't exist, it can convert any underscores back to spaces and then
> try
> >> find
> >> the wiki page under that name.
> >>
> >> To test the inbound mails, I'm unfortunately not seeing any tests in the
> >> code.
> >> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file
> has a
> >> TestBulkExport class and you could copy most of its setup, and then add
> a
> >> test_email test case that calls wiki.handle_message.
> >>
> >> The other way is to use telnet or other tools like that to send the mail
> >> into
> >> the "inmail" docker compose container, or `paster smtp_server` service
> if
> >> you
> >> aren't using docker.  There's an example of doing that in the middle of
> >> this
> >> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
> >>
> >> Hope that helps!  It sounds a little more complex of a ticket than I
> >> initially
> >> thought it would be.  Let us know if you have any more questions or get
> >> stuck on
> >> anything.
> >>
> >> -Dave
> >>
> >> On 5/1/18 12:45 PM, Deshani Geethika wrote:
> >>> Hi all,
> >>>
> >>> During last few days, I spent time on reading the Allura documentation
> >> and
> >>> on getting familiarized with Allura codebase.
> >>>
> >>> Then, I have started to work on the ticket - #1699 Fix incoming email
> for
> >>> wiki pages with space in the title
> >>> <https://forge-allura.apache.org/p/allura/tickets/1699/>. According to
> >> my
> >>> understanding, it is required to replace the spaces in the title with
> >> null
> >>> string (or with some character). Therefore, the getter method for
> >>> email_address which is in Page.class in ForgeWiki/forgewiki/model/wiki
> >> .py
> >>> should be changed as below.
> >>>
> >>>
> >>> @property
> >>> def email_address(self):
> >>>        if context.app.config.options.get('AllowEmailPosting', True):
> >>>                domain = self.email_domain
> >>>     * self.title.replace(‘ ‘,’’) // Added line*
> >>>                return '%s@%s%s' % (self.title.replace('/', '.'),
> domain,
> >>> config.common_suffix)
> >>>        else:
> >>>                return tg_config.get('forgemail.return_path')
> >>>
> >>> Could you tell me whether, do I need to modify any method other than
> the
> >>> above one?
> >>>
> >>>
> >>> Regards!
> >>>
> >>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
> >>> deshanigeethika@gmail.com> wrote:
> >>>
> >>>> Hi Dave,
> >>>>
> >>>> Thanks for the detailed explanation. I will start working on this and
> >> come
> >>>> back to you with my progress
> >>>>
> >>>> Regards!
> >>>>
> >>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <da...@brondsema.net>
> >>>> wrote:
> >>>>
> >>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
> >>>>>> Hi Dave,
> >>>>>>
> >>>>>> As per GSoC official time-line, from 23rd April to 14th May period
> is
> >>>>>> considered as "Community Bonding Period".
> >>>>>>
> >>>>>> During this period I would like to finalize my design and separate
> my
> >>>>>> project into several tickets. Also, I would like to get more
> >>>>> familiarized
> >>>>>> with Allura code-base and Allura team.
> >>>>>>
> >>>>>> Could you guide me what would be the best way to start off with.
> >>>>>>
> >>>>>> Regards!
> >>>>>>
> >>>>>
> >>>>> Sounds like good goals for the community bonding period.
> >>>>>
> >>>>> I've added you as a developer on our self-hosted Allura project
> >>>>> https://forge-allura.apache.org/p/allura/ which means you can assign
> >>>>> tickets to
> >>>>> yourself, make new ones, update existing ones, etc.  I'd recommend
> >> having
> >>>>> many
> >>>>> small incremental tickets (perhaps even smaller pieces of work than
> you
> >>>>> outlined
> >>>>> in the project proposal), so that its easy to manage them and review
> >>>>> them.  And
> >>>>> of course you don't need to make them all right away :)
> >>>>>
> >>>>> To familiarize yourself with Allura, you can read more of the
> >>>>> documentation -
> >>>>> assuming you haven't read it all already ;)
> >>>>> https://forge-allura.apache.org/docs/
> >>>>>
> >>>>> And working on Allura code itself is best.  Find an existing ticket
> or
> >>>>> anything
> >>>>> you notice that could be made better, and make a fix for it.  A
> really
> >>>>> easy one
> >>>>> that I could suggest is https://forge-allura.apache.or
> >>>>> g/p/allura/tickets/1699/
> >>>>>
> >>>>> I've also noticed that our test suite has failed the past few times:
> >>>>> https://builds.apache.org/blue/organizations/jenkins/Allura/activity
> >> It
> >>>>> probably is related to the "Make debug pages and post permalinks work
> >>>>> correctly
> >>>>> when behind a proxy" commit.  You could take a look at fixing that if
> >> you
> >>>>> want.
> >>>>> Otherwise I will soon.
> >>>>>
> >>>>> Lastly, reviewing other people's work is a good way to get familiar
> >> with
> >>>>> the
> >>>>> code and best practices.  I will have a fix for
> >>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming soon,
> so
> >>>>> watch out
> >>>>> for that.  You won't be able to merge my branch to master, but it can
> >> be
> >>>>> a good
> >>>>> way for you to learn from others.  And any constructive feedback
> would
> >> be
> >>>>> welcome too, of course.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Dave Brondsema : dave@brondsema.net
> >>>>> http://www.brondsema.net : personal
> >>>>> http://www.splike.com : programming
> >>>>>               <><
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> *Deshani Geethika*
> >>>> Undergraduate at Department of Computer Science and Engineering
> >>>> Faculty of Engineering - University of Moratuwa Sri Lanka
> >>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >>>> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Dave Brondsema : dave@brondsema.net
> >> http://www.brondsema.net : personal
> >> http://www.splike.com : programming
> >>               <><
> >>
> >
> >
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>



-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
On 5/2/18 11:24 AM, Deshani Geethika wrote:
> Hi Dave,
> 
> Thanks for the information. I have few questions to be clarified.
> 
> I think replacing spaces with underscores would be a good way to do it,
> since on many wikis they are
> interchangable.  (They aren't for allura, but we could move towards that).
> 
> Here do you mean that spaces and underscores in a title are considered as
> same characters?
> 
> For example : "The Title" is considered same as "The_Title".

Yes that's what I was thinking.

> 
> In this situation, users should not be allowed to create 2 wikis with above
> titles, because we can't handle inbound emails for both scenarios.

Good point, I hadn't thought of that.  That does make this more complicated.
Maybe it could be a followup step to prevent creating a page that conflicts with
another one.  And then even later on we could make URLs handle spaces and
underscores interchangably.

Anyone else have ideas about what would be best?

> 
> Also, we have another problem here.
> 
> Then this handle_message method could try finding a page for that message,
> and if it
> doesn't exist, it can convert any underscores back to spaces and then try
> find
> the wiki page under that name.
> 
> Here do I need to check for all the possible number of combinations of
> underscores and spaces to find out the exact wiki page?


I was thinking if an email comes in for "Foo_Bar_Baz" first look for one titled
"Foo_Bar_Baz" and then one titled "Foo Bar Baz".  Trying every combination could
get crazy.

> 
> Regards!
> 
> 
> 
> On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net> wrote:
> 
>> Cool.  That email_address property should be the main one and changing it
>> should
>> reflect in the outgoing emails that are sent to subscribers after
>> commenting or
>> editing a wiki page.
>>
>> Allura also supports *inbound* emails on most artifacts including wiki
>> pages.
>> So someone could reply to the wiki email and it would be received by
>> Allura and
>> added as a comment on the wiki page.  The
>> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
>> responsible
>> for that.  So that code should be updated as well.  I think replacing
>> spaces
>> with underscores would be a good way to do it, since on many wikis they are
>> interchangable.  (They aren't for allura, but we could move towards
>> that).  Then
>> this handle_message method could try finding a page for that message, and
>> if it
>> doesn't exist, it can convert any underscores back to spaces and then try
>> find
>> the wiki page under that name.
>>
>> To test the inbound mails, I'm unfortunately not seeing any tests in the
>> code.
>> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file has a
>> TestBulkExport class and you could copy most of its setup, and then add a
>> test_email test case that calls wiki.handle_message.
>>
>> The other way is to use telnet or other tools like that to send the mail
>> into
>> the "inmail" docker compose container, or `paster smtp_server` service if
>> you
>> aren't using docker.  There's an example of doing that in the middle of
>> this
>> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
>>
>> Hope that helps!  It sounds a little more complex of a ticket than I
>> initially
>> thought it would be.  Let us know if you have any more questions or get
>> stuck on
>> anything.
>>
>> -Dave
>>
>> On 5/1/18 12:45 PM, Deshani Geethika wrote:
>>> Hi all,
>>>
>>> During last few days, I spent time on reading the Allura documentation
>> and
>>> on getting familiarized with Allura codebase.
>>>
>>> Then, I have started to work on the ticket - #1699 Fix incoming email for
>>> wiki pages with space in the title
>>> <https://forge-allura.apache.org/p/allura/tickets/1699/>. According to
>> my
>>> understanding, it is required to replace the spaces in the title with
>> null
>>> string (or with some character). Therefore, the getter method for
>>> email_address which is in Page.class in ForgeWiki/forgewiki/model/wiki
>> .py
>>> should be changed as below.
>>>
>>>
>>> @property
>>> def email_address(self):
>>>        if context.app.config.options.get('AllowEmailPosting', True):
>>>                domain = self.email_domain
>>>     * self.title.replace(‘ ‘,’’) // Added line*
>>>                return '%s@%s%s' % (self.title.replace('/', '.'), domain,
>>> config.common_suffix)
>>>        else:
>>>                return tg_config.get('forgemail.return_path')
>>>
>>> Could you tell me whether, do I need to modify any method other than the
>>> above one?
>>>
>>>
>>> Regards!
>>>
>>> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
>>> deshanigeethika@gmail.com> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> Thanks for the detailed explanation. I will start working on this and
>> come
>>>> back to you with my progress
>>>>
>>>> Regards!
>>>>
>>>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <da...@brondsema.net>
>>>> wrote:
>>>>
>>>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
>>>>>> Hi Dave,
>>>>>>
>>>>>> As per GSoC official time-line, from 23rd April to 14th May period is
>>>>>> considered as "Community Bonding Period".
>>>>>>
>>>>>> During this period I would like to finalize my design and separate my
>>>>>> project into several tickets. Also, I would like to get more
>>>>> familiarized
>>>>>> with Allura code-base and Allura team.
>>>>>>
>>>>>> Could you guide me what would be the best way to start off with.
>>>>>>
>>>>>> Regards!
>>>>>>
>>>>>
>>>>> Sounds like good goals for the community bonding period.
>>>>>
>>>>> I've added you as a developer on our self-hosted Allura project
>>>>> https://forge-allura.apache.org/p/allura/ which means you can assign
>>>>> tickets to
>>>>> yourself, make new ones, update existing ones, etc.  I'd recommend
>> having
>>>>> many
>>>>> small incremental tickets (perhaps even smaller pieces of work than you
>>>>> outlined
>>>>> in the project proposal), so that its easy to manage them and review
>>>>> them.  And
>>>>> of course you don't need to make them all right away :)
>>>>>
>>>>> To familiarize yourself with Allura, you can read more of the
>>>>> documentation -
>>>>> assuming you haven't read it all already ;)
>>>>> https://forge-allura.apache.org/docs/
>>>>>
>>>>> And working on Allura code itself is best.  Find an existing ticket or
>>>>> anything
>>>>> you notice that could be made better, and make a fix for it.  A really
>>>>> easy one
>>>>> that I could suggest is https://forge-allura.apache.or
>>>>> g/p/allura/tickets/1699/
>>>>>
>>>>> I've also noticed that our test suite has failed the past few times:
>>>>> https://builds.apache.org/blue/organizations/jenkins/Allura/activity
>> It
>>>>> probably is related to the "Make debug pages and post permalinks work
>>>>> correctly
>>>>> when behind a proxy" commit.  You could take a look at fixing that if
>> you
>>>>> want.
>>>>> Otherwise I will soon.
>>>>>
>>>>> Lastly, reviewing other people's work is a good way to get familiar
>> with
>>>>> the
>>>>> code and best practices.  I will have a fix for
>>>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming soon, so
>>>>> watch out
>>>>> for that.  You won't be able to merge my branch to master, but it can
>> be
>>>>> a good
>>>>> way for you to learn from others.  And any constructive feedback would
>> be
>>>>> welcome too, of course.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Brondsema : dave@brondsema.net
>>>>> http://www.brondsema.net : personal
>>>>> http://www.splike.com : programming
>>>>>               <><
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Deshani Geethika*
>>>> Undergraduate at Department of Computer Science and Engineering
>>>> Faculty of Engineering - University of Moratuwa Sri Lanka
>>>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>>>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>>>
>>>>
>>>
>>>
>>
>>
>>
>> --
>> Dave Brondsema : dave@brondsema.net
>> http://www.brondsema.net : personal
>> http://www.splike.com : programming
>>               <><
>>
> 
> 
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Deshani Geethika <de...@gmail.com>.
Hi Dave,

Thanks for the information. I have few questions to be clarified.

I think replacing spaces with underscores would be a good way to do it,
since on many wikis they are
interchangable.  (They aren't for allura, but we could move towards that).

Here do you mean that spaces and underscores in a title are considered as
same characters?

For example : "The Title" is considered same as "The_Title".

In this situation, users should not be allowed to create 2 wikis with above
titles, because we can't handle inbound emails for both scenarios.

Also, we have another problem here.

Then this handle_message method could try finding a page for that message,
and if it
doesn't exist, it can convert any underscores back to spaces and then try
find
the wiki page under that name.

Here do I need to check for all the possible number of combinations of
underscores and spaces to find out the exact wiki page?

Regards!



On Wed, May 2, 2018 at 7:17 AM, Dave Brondsema <da...@brondsema.net> wrote:

> Cool.  That email_address property should be the main one and changing it
> should
> reflect in the outgoing emails that are sent to subscribers after
> commenting or
> editing a wiki page.
>
> Allura also supports *inbound* emails on most artifacts including wiki
> pages.
> So someone could reply to the wiki email and it would be received by
> Allura and
> added as a comment on the wiki page.  The
> forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is
> responsible
> for that.  So that code should be updated as well.  I think replacing
> spaces
> with underscores would be a good way to do it, since on many wikis they are
> interchangable.  (They aren't for allura, but we could move towards
> that).  Then
> this handle_message method could try finding a page for that message, and
> if it
> doesn't exist, it can convert any underscores back to spaces and then try
> find
> the wiki page under that name.
>
> To test the inbound mails, I'm unfortunately not seeing any tests in the
> code.
> You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file has a
> TestBulkExport class and you could copy most of its setup, and then add a
> test_email test case that calls wiki.handle_message.
>
> The other way is to use telnet or other tools like that to send the mail
> into
> the "inmail" docker compose container, or `paster smtp_server` service if
> you
> aren't using docker.  There's an example of doing that in the middle of
> this
> page: https://forge-allura.apache.org/p/allura/wiki/Notes/
>
> Hope that helps!  It sounds a little more complex of a ticket than I
> initially
> thought it would be.  Let us know if you have any more questions or get
> stuck on
> anything.
>
> -Dave
>
> On 5/1/18 12:45 PM, Deshani Geethika wrote:
> > Hi all,
> >
> > During last few days, I spent time on reading the Allura documentation
> and
> > on getting familiarized with Allura codebase.
> >
> > Then, I have started to work on the ticket - #1699 Fix incoming email for
> > wiki pages with space in the title
> > <https://forge-allura.apache.org/p/allura/tickets/1699/>. According to
> my
> > understanding, it is required to replace the spaces in the title with
> null
> > string (or with some character). Therefore, the getter method for
> > email_address which is in Page.class in ForgeWiki/forgewiki/model/wiki
> .py
> > should be changed as below.
> >
> >
> > @property
> > def email_address(self):
> >        if context.app.config.options.get('AllowEmailPosting', True):
> >                domain = self.email_domain
> >     * self.title.replace(‘ ‘,’’) // Added line*
> >                return '%s@%s%s' % (self.title.replace('/', '.'), domain,
> > config.common_suffix)
> >        else:
> >                return tg_config.get('forgemail.return_path')
> >
> > Could you tell me whether, do I need to modify any method other than the
> > above one?
> >
> >
> > Regards!
> >
> > On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
> > deshanigeethika@gmail.com> wrote:
> >
> >> Hi Dave,
> >>
> >> Thanks for the detailed explanation. I will start working on this and
> come
> >> back to you with my progress
> >>
> >> Regards!
> >>
> >> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <da...@brondsema.net>
> >> wrote:
> >>
> >>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
> >>>> Hi Dave,
> >>>>
> >>>> As per GSoC official time-line, from 23rd April to 14th May period is
> >>>> considered as "Community Bonding Period".
> >>>>
> >>>> During this period I would like to finalize my design and separate my
> >>>> project into several tickets. Also, I would like to get more
> >>> familiarized
> >>>> with Allura code-base and Allura team.
> >>>>
> >>>> Could you guide me what would be the best way to start off with.
> >>>>
> >>>> Regards!
> >>>>
> >>>
> >>> Sounds like good goals for the community bonding period.
> >>>
> >>> I've added you as a developer on our self-hosted Allura project
> >>> https://forge-allura.apache.org/p/allura/ which means you can assign
> >>> tickets to
> >>> yourself, make new ones, update existing ones, etc.  I'd recommend
> having
> >>> many
> >>> small incremental tickets (perhaps even smaller pieces of work than you
> >>> outlined
> >>> in the project proposal), so that its easy to manage them and review
> >>> them.  And
> >>> of course you don't need to make them all right away :)
> >>>
> >>> To familiarize yourself with Allura, you can read more of the
> >>> documentation -
> >>> assuming you haven't read it all already ;)
> >>> https://forge-allura.apache.org/docs/
> >>>
> >>> And working on Allura code itself is best.  Find an existing ticket or
> >>> anything
> >>> you notice that could be made better, and make a fix for it.  A really
> >>> easy one
> >>> that I could suggest is https://forge-allura.apache.or
> >>> g/p/allura/tickets/1699/
> >>>
> >>> I've also noticed that our test suite has failed the past few times:
> >>> https://builds.apache.org/blue/organizations/jenkins/Allura/activity
> It
> >>> probably is related to the "Make debug pages and post permalinks work
> >>> correctly
> >>> when behind a proxy" commit.  You could take a look at fixing that if
> you
> >>> want.
> >>> Otherwise I will soon.
> >>>
> >>> Lastly, reviewing other people's work is a good way to get familiar
> with
> >>> the
> >>> code and best practices.  I will have a fix for
> >>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming soon, so
> >>> watch out
> >>> for that.  You won't be able to merge my branch to master, but it can
> be
> >>> a good
> >>> way for you to learn from others.  And any constructive feedback would
> be
> >>> welcome too, of course.
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Dave Brondsema : dave@brondsema.net
> >>> http://www.brondsema.net : personal
> >>> http://www.splike.com : programming
> >>>               <><
> >>>
> >>
> >>
> >>
> >> --
> >> *Deshani Geethika*
> >> Undergraduate at Department of Computer Science and Engineering
> >> Faculty of Engineering - University of Moratuwa Sri Lanka
> >> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
> >> <https://github.com/deshanigtk> | Mobile - +94776383034
> >>
> >>
> >
> >
>
>
>
> --
> Dave Brondsema : dave@brondsema.net
> http://www.brondsema.net : personal
> http://www.splike.com : programming
>               <><
>



-- 
*Deshani Geethika*
Undergraduate at Department of Computer Science and Engineering
Faculty of Engineering - University of Moratuwa Sri Lanka
LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
<https://github.com/deshanigtk> | Mobile - +94776383034

Re: [GSoC] [COMDEV-254] Allura - Personal Dashboard

Posted by Dave Brondsema <da...@brondsema.net>.
Cool.  That email_address property should be the main one and changing it should
reflect in the outgoing emails that are sent to subscribers after commenting or
editing a wiki page.

Allura also supports *inbound* emails on most artifacts including wiki pages.
So someone could reply to the wiki email and it would be received by Allura and
added as a comment on the wiki page.  The
forgewiki.wiki_main.ForgeWikiApp#handle_message method is what is responsible
for that.  So that code should be updated as well.  I think replacing spaces
with underscores would be a good way to do it, since on many wikis they are
interchangable.  (They aren't for allura, but we could move towards that).  Then
this handle_message method could try finding a page for that message, and if it
doesn't exist, it can convert any underscores back to spaces and then try find
the wiki page under that name.

To test the inbound mails, I'm unfortunately not seeing any tests in the code.
You could add some.  The ForgeWiki/forgewiki/tests/test_app.py file has a
TestBulkExport class and you could copy most of its setup, and then add a
test_email test case that calls wiki.handle_message.

The other way is to use telnet or other tools like that to send the mail into
the "inmail" docker compose container, or `paster smtp_server` service if you
aren't using docker.  There's an example of doing that in the middle of this
page: https://forge-allura.apache.org/p/allura/wiki/Notes/

Hope that helps!  It sounds a little more complex of a ticket than I initially
thought it would be.  Let us know if you have any more questions or get stuck on
anything.

-Dave

On 5/1/18 12:45 PM, Deshani Geethika wrote:
> Hi all,
> 
> During last few days, I spent time on reading the Allura documentation and
> on getting familiarized with Allura codebase.
> 
> Then, I have started to work on the ticket - #1699 Fix incoming email for
> wiki pages with space in the title
> <https://forge-allura.apache.org/p/allura/tickets/1699/>. According to my
> understanding, it is required to replace the spaces in the title with null
> string (or with some character). Therefore, the getter method for
> email_address which is in Page.class in ForgeWiki/forgewiki/model/wiki.py
> should be changed as below.
> 
> 
> @property
> def email_address(self):
>        if context.app.config.options.get('AllowEmailPosting', True):
>                domain = self.email_domain
>     * self.title.replace(‘ ‘,’’) // Added line*
>                return '%s@%s%s' % (self.title.replace('/', '.'), domain,
> config.common_suffix)
>        else:
>                return tg_config.get('forgemail.return_path')
> 
> Could you tell me whether, do I need to modify any method other than the
> above one?
> 
> 
> Regards!
> 
> On Wed, Apr 25, 2018 at 10:30 PM, Deshani Geethika <
> deshanigeethika@gmail.com> wrote:
> 
>> Hi Dave,
>>
>> Thanks for the detailed explanation. I will start working on this and come
>> back to you with my progress
>>
>> Regards!
>>
>> On Wed, Apr 25, 2018 at 9:55 PM, Dave Brondsema <da...@brondsema.net>
>> wrote:
>>
>>> On 4/24/18 11:14 AM, Deshani Geethika wrote:
>>>> Hi Dave,
>>>>
>>>> As per GSoC official time-line, from 23rd April to 14th May period is
>>>> considered as "Community Bonding Period".
>>>>
>>>> During this period I would like to finalize my design and separate my
>>>> project into several tickets. Also, I would like to get more
>>> familiarized
>>>> with Allura code-base and Allura team.
>>>>
>>>> Could you guide me what would be the best way to start off with.
>>>>
>>>> Regards!
>>>>
>>>
>>> Sounds like good goals for the community bonding period.
>>>
>>> I've added you as a developer on our self-hosted Allura project
>>> https://forge-allura.apache.org/p/allura/ which means you can assign
>>> tickets to
>>> yourself, make new ones, update existing ones, etc.  I'd recommend having
>>> many
>>> small incremental tickets (perhaps even smaller pieces of work than you
>>> outlined
>>> in the project proposal), so that its easy to manage them and review
>>> them.  And
>>> of course you don't need to make them all right away :)
>>>
>>> To familiarize yourself with Allura, you can read more of the
>>> documentation -
>>> assuming you haven't read it all already ;)
>>> https://forge-allura.apache.org/docs/
>>>
>>> And working on Allura code itself is best.  Find an existing ticket or
>>> anything
>>> you notice that could be made better, and make a fix for it.  A really
>>> easy one
>>> that I could suggest is https://forge-allura.apache.or
>>> g/p/allura/tickets/1699/
>>>
>>> I've also noticed that our test suite has failed the past few times:
>>> https://builds.apache.org/blue/organizations/jenkins/Allura/activity  It
>>> probably is related to the "Make debug pages and post permalinks work
>>> correctly
>>> when behind a proxy" commit.  You could take a look at fixing that if you
>>> want.
>>> Otherwise I will soon.
>>>
>>> Lastly, reviewing other people's work is a good way to get familiar with
>>> the
>>> code and best practices.  I will have a fix for
>>> https://forge-allura.apache.org/p/allura/tickets/6353/ coming soon, so
>>> watch out
>>> for that.  You won't be able to merge my branch to master, but it can be
>>> a good
>>> way for you to learn from others.  And any constructive feedback would be
>>> welcome too, of course.
>>>
>>>
>>>
>>>
>>> --
>>> Dave Brondsema : dave@brondsema.net
>>> http://www.brondsema.net : personal
>>> http://www.splike.com : programming
>>>               <><
>>>
>>
>>
>>
>> --
>> *Deshani Geethika*
>> Undergraduate at Department of Computer Science and Engineering
>> Faculty of Engineering - University of Moratuwa Sri Lanka
>> LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub
>> <https://github.com/deshanigtk> | Mobile - +94776383034
>>
>>
> 
> 



-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><