[Sugar-devel] I think I need push access in GitHub for some Sugar Activities
James Cameron
quozl at laptop.org
Sat Feb 17 04:00:43 EST 2024
Thanks.
Updated steps for releasing
https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md#checklist---maintainer
On Fri, Feb 16, 2024 at 11:44:47PM -0600, James Simmons wrote:
> It turned out to be fairly simple to fix the Read Activity. It was complaining
> that it had no MICRO_VERSION attribute in the EvinceDocument object, so I just
> removed it from the _validate_min_version() method in evinceadapter.py:
>
> def update_toc(self, activity):
>
> if self._validate_min_version(3, 5):
>
> # check version because does not work and crash with older evince
>
> doc = self._model.get_document()
>
> if not doc.has_document_links():
>
> logging.error('The pdf file does not have a index')
>
> return False
>
> else:
>
> self._job_links = EvinceView.JobLinks.new(document=doc)
>
> self._job_links.connect('finished', self.__index_loaded_cb,
>
> activity)
>
> EvinceView.Job.scheduler_push_job(
>
> self._job_links,
>
> EvinceView.JobPriority.PRIORITY_NONE)
>
> return True
>
> else:
>
> return False
>
> def handle_link(self, link):
>
> self._view.handle_link(link)
>
> def _validate_min_version(self, major, minor):
>
> """
>
> Check if Evince version is at major or equal than the requested
>
> """
>
> evince_version = [EvinceDocument.MAJOR_VERSION,
>
> EvinceDocument.MINOR_VERSION]
>
> return evince_version >= [major, minor]
>
> Now it works.
>
> I was getting the same error from the version of Read Activity that shipped
> with Fedora 39.
>
> I made a pull request for Get IA Books. It looks like I can do the merge
> myself. Not sure of what the procedure is to get the revised Activity
> published.
>
> James Simmons
>
> On Fri, Feb 16, 2024 at 5:47 PM James Cameron <[1]quozl at laptop.org> wrote:
>
> Thanks. What about the activity provided by Fedora 39?
>
> On Fri, Feb 16, 2024 at 05:28:35PM -0600, James Simmons wrote:
> > I just confirmed that the master branch of the Read Activity has this
> problem
> > with Evince when running on Fedora 39:
> >
> > Traceback (most recent call last):
> > File "/usr/bin/sugar-activity3", line 5, in <module>
> > activityinstance.main()
> > File "/usr/lib/python3.12/site-packages/sugar3/activity/
> activityinstance.py",
> > line 230, in main
> > instance = create_activity_instance(activity_constructor,
> activity_handle)
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^
> > File "/usr/lib/python3.12/site-packages/sugar3/activity/
> activityinstance.py",
> > line 59, in create_activity_instance
> > activity = constructor(handle)
> > ^^^^^^^^^^^^^^^^^^^
> > File "/home/jamessimmons/git/read-activity/readactivity.py", line 374,
> in
> > __init__
> > self.read_file(self._jobject.file_path)
> > File "/home/jamessimmons/git/read-activity/readactivity.py", line 747,
> in
> > read_file
> > self._load_document('file://' + tempfile)
> > File "/home/jamessimmons/git/read-activity/readactivity.py", line 1054,
> in
> > _load_document
> > self._update_toc()
> > File "/home/jamessimmons/git/read-activity/readactivity.py", line 627,
> in
> > _update_toc
> > if self._view.update_toc(self):
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 275,
> in
> > update_toc
> > if self._validate_min_version(3, 5, 92):
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 301,
> in
> > _validate_min_version
> > EvinceDocument.MICRO_VERSION]
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "/usr/lib64/python3.12/site-packages/gi/module.py", line 126, in
> > __getattr__
> > raise AttributeError("%r object has no attribute %r" % (
> > AttributeError: 'gi.repository.EvinceDocument' object has no attribute
> > 'MICRO_VERSION'. Did you mean: 'MINOR_VERSION'?
> > Exited with status 1, pid 106639 activity_id
> > 37db76336c5474c61078f525c28c1f9de48fab9a
> >
> > James Simmons
> >
> > On Fri, Feb 16, 2024 at 4:09 PM James Simmons <[1][2]nicestep at gmail.com>
> wrote:
> >
> > James,
> >
> > I'm using Fedora 39, a fresh install on a computer I just got and an
> older
> > one I'm giving away. I'm using the version of Read that ships with
> Fedora.
> > I just checked out the master branch of Read from Git and could run a
> > python 3 setup.py dev on it to see if that version has the problem. I
> won't
> > be able to do that right away, but when I do I'll let you know if it
> works.
> >
> > James Simmons
> >
> > On Fri, Feb 16, 2024 at 3:42 PM James Cameron <[2][3]quozl at laptop.org
> > wrote:
> >
> > That's surprising. Thought we fixed that.
> >
> > What Linux distribution and release are you doing this on?
> >
> > On Fri, Feb 16, 2024 at 02:23:11PM -0600, James Simmons wrote:
> > > James,
> > >
> > > I don't want to use Evince as part of Get IA Books. It is the
> Read
> > Activity
> > > itself that has a problem.
> > >
> > > When I tested opening books from the Journal the Read Activity
> would
> > not start.
> > > I thought the problem might be in the way Get IA Books was
> adding
> > books to the
> > > Journal, so as a sanity check I used the Browse activity to
> download
> > some PDFs
> > > to the Journal and also downloaded one EPUB. The Read Activity
> opened
> > the EPUB
> > > just fine but not the PDFs. There was a stack trace (copied to
> an
> > earlier
> > > email) that made it look like the code Evince needs to
> interface with
> > Python
> > > has changed. It was complaining about an Evince micro version
> number.
> > That was
> > > the thing I wanted to look at in the Read Activity.
> > >
> > > I'll probably send an email to the wider group explaining the
> issue.
> > >
> > > Thanks.
> > >
> > > James Simmons
> > >
> > > On Fri, Feb 16, 2024 at 2:01 PM James Cameron <[1][3][4]
> quozl at laptop.org
> > > wrote:
> > >
> > > There's also VScode and GitHub desktop if you want to try
> other
> > > methods. It is difficult to keep up with GitHub's security
> > posture
> > > lately.
> > >
> > > The Read activity has the integration with Evince. If you
> want
> > your
> > > activity to show PDF inside it, rather than activate Read,
> then
> > borrow
> > > code from Read.
> > >
> > > By the way, you're using our membership team alias, which
> is just
> > > Alex, myself, and Ibiam. If you'd like wider and public
> > readership,
> > > there's the sugar-devel@ mailing list.
> > >
> > > [2][4][5]http://lists.sugarlabs.org/listinfo/sugar-devel
> > >
> > > On Fri, Feb 16, 2024 at 08:03:20AM -0600, James Simmons
> wrote:
> > > > Ibiam,
> > > >
> > > > I think the problem is I need to use a Personal Access
> Token
> > with
> > > Eclipse.
> > > > Somehow it worked with my regular password from Windows
> at work
> > but it
> > > was
> > > > rejected when I used the command line at home from Linux.
> I had
> > to use
> > > the PAT
> > > > instead of the regular password.
> > > >
> > > > I'm going to try to get the Read Activity working with
> Evince.
> > I won't
> > > need Git
> > > > update permission unless I actually succeed.
> > > >
> > > > James Simmons
> > > >
> > > > On Fri, Feb 16, 2024 at 7:40 AM Chihurumnaya Ibiam <[1]
> [3]
> > > [5][6]members at sugarlabs.org>
> > > > wrote:
> > > >
> > > > Maybe there's an issue with the integration in
> Eclipse.
> > > >
> > > > Glad to hear it's working fine from the command line.
> > > >
> > > > On Thu, Feb 15, 2024 at 5:32 PM James Simmons <[2][4]
> > > [6][7]nicestep at gmail.com>
> > > > wrote:
> > > >
> > > > Chihurumnaya,
> > > >
> > > >
> > > > I did some testing with command line Git and my
> push
> > worked fine.
> > > I was
> > > > trying to use Eclipse as my IDE, which has Git
> > integration built
> > > in.
> > > > That works fine for pulls and for cloning the
> > repository but not
> > > for
> > > > pushes, at least not if you use the https:// URL.
> > > >
> > > > I can easily live with doing pushes from the
> command
> > line.
> > > >
> > > > Thanks for your help.
> > > >
> > > > James Simmons
> > > >
> > > >
> > > > On Thu, Feb 15, 2024 at 7:42 AM Chihurumnaya
> Ibiam <[3]
> > > > [5][7][8]members at sugarlabs.org> wrote:
> > > >
> > > > That's strange, can you use the -v arg so we
> can
> > see some
> > > verbose
> > > > output, I can confirm you have admin access
> to the
> > repo.
> > > >
> > > > On Thu, Feb 15, 2024 at 1:41 AM James Simmons
> <[4]
> > > > [6][8][9]nicestep at gmail.com> wrote:
> > > >
> > > > Ibiam,
> > > >
> > > > I just tried it. I get this error:
> > > >
> > > > Can't connect to any repository: [5][7]
> [9]
> > [10]https://github.com
> > > /
> > > > sugarlabs/getiabooks.git ([6][8][10]
> https://
> > [11]github.com/
> > > sugarlabs/
> > > > getiabooks.git: not authorized)
> > > >
> > > > I try logging in as [7][9][11]
> > [12]nicestep at gmail.com (as I log
> > > into the
> > > > website) and also jdsimmons. Both display
> the
> > login
> > > dialog
> > > > multiple times and give up.
> > > >
> > > > It looks like I can create branches OK on
> the
> > website.
> > > >
> > > > Any suggestions?
> > > >
> > > > James Simmons
> > > >
> > > > On Wed, Feb 14, 2024 at 11:33 AM James
> Simmons
> > <[8]
> > > > [10][12][13]nicestep at gmail.com> wrote:
> > > >
> > > > Thanks. It looks OK. I won't be able
> to try
> > it out
> > > until
> > > > this evening.
> > > >
> > > > James Simmons
> > > >
> > > > On Wed, Feb 14, 2024 at 11:18 AM
> > Chihurumnaya Ibiam
> > > <[9]
> > > > [11][13][14]members at sugarlabs.org>
> wrote:
> > > >
> > > > I've added you as a collaborator
> to the
> > repo with
> > > admin
> > > > access.
> > > >
> > > > On Wed, Feb 14, 2024 at 6:12 PM
> James
> > Simmons
> > > <[10]
> > > > [12][14][15]nicestep at gmail.com>
> wrote:
> > > >
> > > > Many years ago I wrote
> Activities
> > for Sugar
> > > and the
> > > > maintenance of those
> Activities has
> > been
> > > taken over
> > > > by others. One such Activity
> is:
> > > >
> > > > [11][13][15][16]https://
> github.com/
> > sugarlabs/
> > > getiabooks
> > > >
> > > > I'm preparing one of my used
> > computers to
> > > give to a
> > > > bright eight year old boy and
> I
> > wanted to
> > > give him
> > > > a working Sugar environment
> in
> > addition to
> > > other
> > > > cool Linux stuff. Get IA
> Books
> > stopped
> > > working
> > > > because the Internet Archive
> > changed their
> > > advanced
> > > > search and also the formats
> that
> > they
> > > generate for
> > > > their titles, but I've got it
> > mostly working
> > > again
> > > > and I'd like to create a
> branch and
> > a pull
> > > request
> > > > for this and other Activities
> I
> > created which
> > > need
> > > > to be upgraded to Python 3.
> The Get
> > Books
> > > Activity
> > > > needs to be upgraded also and
> I can
> > do the
> > > work on
> > > > that one as well. They share
> a
> > certain amount
> > > of
> > > > code.
> > > >
> > > > It appears that I am not
> allowed to
> > create
> > > branches
> > > > and push changes to them. My
> id in
> > GitHub is
> > > > jdsimmons and I'm shown as a
> past
> > contributor
> > > to
> > > > this Activity. CAn I be given
> this
> > access?
> > > >
> > > > Thanks,
> > > >
> > > > James Simmons
> > > >
> > > > References:
> > > >
> > > > [1] mailto:[14][16][17]members at sugarlabs.org
> > > > [2] mailto:[15][17][18]nicestep at gmail.com
> > > > [3] mailto:[16][18][19]members at sugarlabs.org
> > > > [4] mailto:[17][19][20]nicestep at gmail.com
> > > > [5] [18][20][21]https://github.com/sugarlabs/
> getiabooks.git
> > > > [6] [19][21][22]https://github.com/sugarlabs/
> getiabooks.git
> > > > [7] mailto:[20][22][23]nicestep at gmail.com
> > > > [8] mailto:[21][23][24]nicestep at gmail.com
> > > > [9] mailto:[22][24][25]members at sugarlabs.org
> > > > [10] mailto:[23][25][26]nicestep at gmail.com
> > > > [11] [24][26][27]https://github.com/sugarlabs/getiabooks
> > >
> > > References:
> > >
> > > [1] mailto:[27][28]quozl at laptop.org
> > > [2] [28][29]http://lists.sugarlabs.org/listinfo/sugar-devel
> > > [3] mailto:[29][30]members at sugarlabs.org
> > > [4] mailto:[30][31]nicestep at gmail.com
> > > [5] mailto:[31][32]members at sugarlabs.org
> > > [6] mailto:[32][33]nicestep at gmail.com
> > > [7] [33][34]https://github.com/
> > > [8] [34][35]https://github.com/sugarlabs/
> > > [9] mailto:[35][36]nicestep at gmail.com
> > > [10] mailto:[36][37]nicestep at gmail.com
> > > [11] mailto:[37][38]members at sugarlabs.org
> > > [12] mailto:[38][39]nicestep at gmail.com
> > > [13] [39][40]https://github.com/sugarlabs/getiabooks
> > > [14] mailto:[40][41]members at sugarlabs.org
> > > [15] mailto:[41][42]nicestep at gmail.com
> > > [16] mailto:[42][43]members at sugarlabs.org
> > > [17] mailto:[43][44]nicestep at gmail.com
> > > [18] [44][45]https://github.com/sugarlabs/getiabooks.git
> > > [19] [45][46]https://github.com/sugarlabs/getiabooks.git
> > > [20] mailto:[46][47]nicestep at gmail.com
> > > [21] mailto:[47][48]nicestep at gmail.com
> > > [22] mailto:[48][49]members at sugarlabs.org
> > > [23] mailto:[49][50]nicestep at gmail.com
> > > [24] [50][51]https://github.com/sugarlabs/getiabooks
> >
> > References:
> >
> > [1] mailto:[52]nicestep at gmail.com
> > [2] mailto:[53]quozl at laptop.org
> > [3] mailto:[54]quozl at laptop.org
> > [4] [55]http://lists.sugarlabs.org/listinfo/sugar-devel
> > [5] mailto:[56]members at sugarlabs.org
> > [6] mailto:[57]nicestep at gmail.com
> > [7] mailto:[58]members at sugarlabs.org
> > [8] mailto:[59]nicestep at gmail.com
> > [9] [60]https://github.com/
> > [10] [61]https://github.com/
> > [11] mailto:[62]nicestep at gmail.com
> > [12] mailto:[63]nicestep at gmail.com
> > [13] mailto:[64]members at sugarlabs.org
> > [14] mailto:[65]nicestep at gmail.com
> > [15] [66]https://github.com/sugarlabs/
> > [16] mailto:[67]members at sugarlabs.org
> > [17] mailto:[68]nicestep at gmail.com
> > [18] mailto:[69]members at sugarlabs.org
> > [19] mailto:[70]nicestep at gmail.com
> > [20] [71]https://github.com/sugarlabs/getiabooks.git
> > [21] [72]https://github.com/sugarlabs/getiabooks.git
> > [22] mailto:[73]nicestep at gmail.com
> > [23] mailto:[74]nicestep at gmail.com
> > [24] mailto:[75]members at sugarlabs.org
> > [25] mailto:[76]nicestep at gmail.com
> > [26] [77]https://github.com/sugarlabs/getiabooks
> > [27] mailto:[78]quozl at laptop.org
> > [28] [79]http://lists.sugarlabs.org/listinfo/sugar-devel
> > [29] mailto:[80]members at sugarlabs.org
> > [30] mailto:[81]nicestep at gmail.com
> > [31] mailto:[82]members at sugarlabs.org
> > [32] mailto:[83]nicestep at gmail.com
> > [33] [84]https://github.com/
> > [34] [85]https://github.com/sugarlabs/
> > [35] mailto:[86]nicestep at gmail.com
> > [36] mailto:[87]nicestep at gmail.com
> > [37] mailto:[88]members at sugarlabs.org
> > [38] mailto:[89]nicestep at gmail.com
> > [39] [90]https://github.com/sugarlabs/getiabooks
> > [40] mailto:[91]members at sugarlabs.org
> > [41] mailto:[92]nicestep at gmail.com
> > [42] mailto:[93]members at sugarlabs.org
> > [43] mailto:[94]nicestep at gmail.com
> > [44] [95]https://github.com/sugarlabs/getiabooks.git
> > [45] [96]https://github.com/sugarlabs/getiabooks.git
> > [46] mailto:[97]nicestep at gmail.com
> > [47] mailto:[98]nicestep at gmail.com
> > [48] mailto:[99]members at sugarlabs.org
> > [49] mailto:[100]nicestep at gmail.com
> > [50] [101]https://github.com/sugarlabs/getiabooks
>
> References:
>
> [1] mailto:quozl at laptop.org
> [2] mailto:nicestep at gmail.com
> [3] mailto:quozl at laptop.org
> [4] mailto:quozl at laptop.org
> [5] http://lists.sugarlabs.org/listinfo/sugar-devel
> [6] mailto:members at sugarlabs.org
> [7] mailto:nicestep at gmail.com
> [8] mailto:members at sugarlabs.org
> [9] mailto:nicestep at gmail.com
> [10] https://github.com/
> [11] http://github.com/
> [12] mailto:nicestep at gmail.com
> [13] mailto:nicestep at gmail.com
> [14] mailto:members at sugarlabs.org
> [15] mailto:nicestep at gmail.com
> [16] https://github.com/
> [17] mailto:members at sugarlabs.org
> [18] mailto:nicestep at gmail.com
> [19] mailto:members at sugarlabs.org
> [20] mailto:nicestep at gmail.com
> [21] https://github.com/sugarlabs/getiabooks.git
> [22] https://github.com/sugarlabs/getiabooks.git
> [23] mailto:nicestep at gmail.com
> [24] mailto:nicestep at gmail.com
> [25] mailto:members at sugarlabs.org
> [26] mailto:nicestep at gmail.com
> [27] https://github.com/sugarlabs/getiabooks
> [28] mailto:quozl at laptop.org
> [29] http://lists.sugarlabs.org/listinfo/sugar-devel
> [30] mailto:members at sugarlabs.org
> [31] mailto:nicestep at gmail.com
> [32] mailto:members at sugarlabs.org
> [33] mailto:nicestep at gmail.com
> [34] https://github.com/
> [35] https://github.com/sugarlabs/
> [36] mailto:nicestep at gmail.com
> [37] mailto:nicestep at gmail.com
> [38] mailto:members at sugarlabs.org
> [39] mailto:nicestep at gmail.com
> [40] https://github.com/sugarlabs/getiabooks
> [41] mailto:members at sugarlabs.org
> [42] mailto:nicestep at gmail.com
> [43] mailto:members at sugarlabs.org
> [44] mailto:nicestep at gmail.com
> [45] https://github.com/sugarlabs/getiabooks.git
> [46] https://github.com/sugarlabs/getiabooks.git
> [47] mailto:nicestep at gmail.com
> [48] mailto:nicestep at gmail.com
> [49] mailto:members at sugarlabs.org
> [50] mailto:nicestep at gmail.com
> [51] https://github.com/sugarlabs/getiabooks
> [52] mailto:nicestep at gmail.com
> [53] mailto:quozl at laptop.org
> [54] mailto:quozl at laptop.org
> [55] http://lists.sugarlabs.org/listinfo/sugar-devel
> [56] mailto:members at sugarlabs.org
> [57] mailto:nicestep at gmail.com
> [58] mailto:members at sugarlabs.org
> [59] mailto:nicestep at gmail.com
> [60] https://github.com/
> [61] https://github.com/
> [62] mailto:nicestep at gmail.com
> [63] mailto:nicestep at gmail.com
> [64] mailto:members at sugarlabs.org
> [65] mailto:nicestep at gmail.com
> [66] https://github.com/sugarlabs/
> [67] mailto:members at sugarlabs.org
> [68] mailto:nicestep at gmail.com
> [69] mailto:members at sugarlabs.org
> [70] mailto:nicestep at gmail.com
> [71] https://github.com/sugarlabs/getiabooks.git
> [72] https://github.com/sugarlabs/getiabooks.git
> [73] mailto:nicestep at gmail.com
> [74] mailto:nicestep at gmail.com
> [75] mailto:members at sugarlabs.org
> [76] mailto:nicestep at gmail.com
> [77] https://github.com/sugarlabs/getiabooks
> [78] mailto:quozl at laptop.org
> [79] http://lists.sugarlabs.org/listinfo/sugar-devel
> [80] mailto:members at sugarlabs.org
> [81] mailto:nicestep at gmail.com
> [82] mailto:members at sugarlabs.org
> [83] mailto:nicestep at gmail.com
> [84] https://github.com/
> [85] https://github.com/sugarlabs/
> [86] mailto:nicestep at gmail.com
> [87] mailto:nicestep at gmail.com
> [88] mailto:members at sugarlabs.org
> [89] mailto:nicestep at gmail.com
> [90] https://github.com/sugarlabs/getiabooks
> [91] mailto:members at sugarlabs.org
> [92] mailto:nicestep at gmail.com
> [93] mailto:members at sugarlabs.org
> [94] mailto:nicestep at gmail.com
> [95] https://github.com/sugarlabs/getiabooks.git
> [96] https://github.com/sugarlabs/getiabooks.git
> [97] mailto:nicestep at gmail.com
> [98] mailto:nicestep at gmail.com
> [99] mailto:members at sugarlabs.org
> [100] mailto:nicestep at gmail.com
> [101] https://github.com/sugarlabs/getiabooks
More information about the Sugar-devel
mailing list