-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Pip Package and Metadata attributes checking to toolkit #369
Comments
Warnings fine, but enforcing not fine. AppStream warning already exists, for Happy for you to add warnings about missing metadata, but most activity maintainers won't be using the latest toolkit, so the warnings won't be effective. You need a better point of enforcement than the toolkit. Also remember that anything you do to sugar-toolkit-gtk3 for warnings has to be replicated in sugar-toolkit for the GTK+ 2.0 activities. Please code your builder to build even with missing metadata, by assuming default values; which for the metadata you list (license, summary, categories) should be straightforward.
What you have in effect uncovered is the terrible state of activity maintenance, and changes to the toolkit won't do anything for that. Anything that makes activity maintenance harder will reduce maintenance. Toolkit is installed using Your issue title mentions Manifest. A file |
Correct.
Maybe you are right regarding that, some web activities don't have them. Point taken
Yes. But there is no information and instructions on how to install the toolkits, adding those changes to README.md would be good.
Yes I meant metadata, fixing the title |
I am not sure license is straightforward. The original submitter of the
activity specified the license. This information is not displayed by
ASLO but may be kept in the database. I am not sure of the implications
if a non-author changes the license terms.
Tony
…On 07/18/2017 02:05 PM, James Cameron wrote:
Warnings fine, but enforcing not fine.
AppStream warning already exists, for |install| target in |setup.py|.
You may use that as an example of how to make warnings. See
bundlebuilder.py.
Happy for you to add warnings about missing metadata, but most
activity maintainers won't be using the latest toolkit, so the
warnings won't be effective. You need a better point of enforcement
than the toolkit.
Also remember that anything you do to sugar-toolkit-gtk3 for warnings
has to be replicated in sugar-toolkit for the GTK+ 2.0 activities.
Please code your builder to build even with missing metadata, by
assuming default values; which for the metadata you list (license,
summary, categories) should be straightforward.
|po| folder will only be present if an activity is internationalised,
and not all of them are. Internationalisation of an activity is a much
larger task than adding a |po| folder. No sense in excluding
activities for lack of internationalisation, as some have no strings
to be internationalised. Please code your builder to build even with
missing |po| folder.
What you have in effect uncovered is the terrible state of activity
maintenance, and changes to the toolkit won't do anything for that.
Anything that makes activity maintenance harder will reduce maintenance.
Toolkit is installed using |make install|, not |pip|. sugar-build and
osbuild call |make install| for chroot development environment. Fedora
spec file and Debian packaging files call |make install| for packaged
development environment. |make install| is a standard GNU target.
Making a new install method needs a better justification than wanting
an easier way, because then there will be two methods to maintain. You
had best spend time understanding the existing methods.
Your issue title mentions Manifest. A file |MANIFEST| was deprecated a
long time ago, instead we use git to list source files for writing the
bundle. I think you mean metadata.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAULktx8I_TqQe3p7H4dEb7TC4ZbxtHkks5sPJ-IgaJpZM4ObNOi>.
|
I agree, warning is more appropriate. But I don't see how this makes things
more difficult for developers.
The one field I think we do need to require is a license. We cannot publish
on ASLO w/o a FOSS license. That said, the license should be present in the
code, even if it is missing in the metadata, so hopefully we can extract it
automatically in most cases.
…-walter
On Tue, Jul 18, 2017 at 8:05 AM, James Cameron ***@***.***> wrote:
Warnings fine, but enforcing not fine.
AppStream warning already exists, for install target in setup.py. You may
use that as an example of how to make warnings. See bundlebuilder.py.
Happy for you to add warnings about missing metadata, but most activity
maintainers won't be using the latest toolkit, so the warnings won't be
effective. You need a better point of enforcement than the toolkit.
Also remember that anything you do to sugar-toolkit-gtk3 for warnings has
to be replicated in sugar-toolkit for the GTK+ 2.0 activities.
Please code your builder to build even with missing metadata, by assuming
default values; which for the metadata you list (license, summary,
categories) should be straightforward.
po folder will only be present if an activity is internationalised, and
not all of them are. Internationalisation of an activity is a much larger
task than adding a po folder. No sense in excluding activities for lack
of internationalisation, as some have no strings to be internationalised.
Please code your builder to build even with missing po folder.
What you have in effect uncovered is the terrible state of activity
maintenance, and changes to the toolkit won't do anything for that.
Anything that makes activity maintenance harder will reduce maintenance.
Toolkit is installed using make install, not pip. sugar-build and osbuild
call make install for chroot development environment. Fedora spec file
and Debian packaging files call make install for packaged development
environment. make install is a standard GNU target. Making a new install
method needs a better justification than wanting an easier way, because
then there will be two methods to maintain. You had best spend time
understanding the existing methods.
Your issue title mentions Manifest. A file MANIFEST was deprecated a long
time ago, instead we use git to list source files for writing the bundle. I
think you mean metadata.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADz74Sg3QV7AVSbnnHiVJMAWhER-ApzNks5sPJ-JgaJpZM4ObNOi>
.
--
Walter Bender
Sugar Labs
http://www.sugarlabs.org
<http://www.sugarlabs.org>
|
Regarding license, most of the core and popular activities like read, portfolio do have a LICENSE file but then we need to read the license and extract the license (by reading headers),most of them have first header as license name Apache2.0, MIT |
Looking at your traceback;
You have somehow used the wrong toolkit. The activity source does import sugar.activity.bundlebuilder, see https://github.com/sugarlabs-test/4572-activity/blob/master/setup.py The toolkit does accept a bundle name, see https://github.com/sugarlabs/sugar-toolkit/blob/master/src/sugar/activity/bundlebuilder.py#L393 So for that error to appear the wrong toolkit must have been used. Why is that? |
For activities with missing license key value in activity.info, they should be reviewed to find what licenses have been used in source files, what license is asserted on the whole by a LICENSE or COPYING file, and then a pull request or commit made against the activity repository to add the license key value to activity.info. I don't think this is a candidate for automation, but you may be interested in the Debian package The in-production activities.sugarlabs.org only recently acquired a license verification check thanks to @scg's release of source changes to production, so there may be many activities without a license key value in activity.info. In my cache of activities, the ones without a license key value in activity.info are;
Sugar Labs must not publish on activities.sugarlabs.org any bundles without a license or with a license that conflicts with the policy. Same applies for publishing on download.sugarlabs.org or github.com/sugarlabs. So fixing licensing should be a priority, and the best time to do it for an activity is during the next release of an activity. On the addition of warnings to the |
FWIW,
Mastermind has a GPLv3 LICENSE file.
IRC has no LICENSE file but the code is GPLv2 (activity.py)
Finance has a GPLv3 COPYING file
Letters has a GPLv2 LICENSE file
Gears has an Apache LICENSE file
I cannot find the repos for PyCut, Find Words, or Planets (although I think
I can find the latter as it was a GCI project).
…-walter
On Tue, Jul 18, 2017 at 7:44 PM, James Cameron ***@***.***> wrote:
For activities with missing license key value in activity.info, they
should be reviewed to find what licenses have been used in source files,
what license is asserted on the whole by a LICENSE or COPYING file, and
then a pull request or commit made against the activity repository to add
the license key value to activity.info.
I don't think this is a candidate for automation, but you may be
interested in the Debian package licensecheck which can classify source
licenses. Meanwhile, the activities ought not to be processed into
activities.sugarlabs.org.
The in-production activities.sugarlabs.org only recently acquired a
license verification check thanks to @scg <https://github.com/scg>'s
release of source changes to production, so there may be many activities
without a license key value in activity.info.
In my cache of activities, the ones without a license key value in
activity.info are;
- Finance,
- Find Words,
- Gears,
- IRC,
- Letters,
- Mastermind,
- Planets, and;
- PyCut.
Sugar Labs must not publish on activities.sugarlabs.org any bundles
without a license or with a license that conflicts with the policy. Same
applies for publishing on download.sugarlabs.org or github.com/sugarlabs.
So fixing licensing should be a priority, and the best time to do it for an
activity is during the next release of an activity.
On the addition of warnings to the dist_xo and dist_source targets of the
bundlebuilder, you may be interested in the http://wiki.sugarlabs.org/go/
Features page which has a template for thinking through the impact of
feature proposals.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADz74diYRo43hbturOHB76KO9ZDBTeGjks5sPUNEgaJpZM4ObNOi>
.
--
Walter Bender
Sugar Labs
http://www.sugarlabs.org
<http://www.sugarlabs.org>
|
Just asked Pedro to add a license to:
https://github.com/pedro-sales/planets-activity
…-walter
On Tue, Jul 18, 2017 at 8:14 PM, Walter Bender <[email protected]>
wrote:
FWIW,
Mastermind has a GPLv3 LICENSE file.
IRC has no LICENSE file but the code is GPLv2 (activity.py)
Finance has a GPLv3 COPYING file
Letters has a GPLv2 LICENSE file
Gears has an Apache LICENSE file
I cannot find the repos for PyCut, Find Words, or Planets (although I
think I can find the latter as it was a GCI project).
-walter
On Tue, Jul 18, 2017 at 7:44 PM, James Cameron ***@***.***>
wrote:
> For activities with missing license key value in activity.info, they
> should be reviewed to find what licenses have been used in source files,
> what license is asserted on the whole by a LICENSE or COPYING file, and
> then a pull request or commit made against the activity repository to add
> the license key value to activity.info.
>
> I don't think this is a candidate for automation, but you may be
> interested in the Debian package licensecheck which can classify source
> licenses. Meanwhile, the activities ought not to be processed into
> activities.sugarlabs.org.
>
> The in-production activities.sugarlabs.org only recently acquired a
> license verification check thanks to @scg <https://github.com/scg>'s
> release of source changes to production, so there may be many activities
> without a license key value in activity.info.
>
> In my cache of activities, the ones without a license key value in
> activity.info are;
>
> - Finance,
> - Find Words,
> - Gears,
> - IRC,
> - Letters,
> - Mastermind,
> - Planets, and;
> - PyCut.
>
> Sugar Labs must not publish on activities.sugarlabs.org any bundles
> without a license or with a license that conflicts with the policy. Same
> applies for publishing on download.sugarlabs.org or github.com/sugarlabs.
> So fixing licensing should be a priority, and the best time to do it for an
> activity is during the next release of an activity.
>
> On the addition of warnings to the dist_xo and dist_source targets of
> the bundlebuilder, you may be interested in the
> http://wiki.sugarlabs.org/go/Features page which has a template for
> thinking through the impact of feature proposals.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#369 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADz74diYRo43hbturOHB76KO9ZDBTeGjks5sPUNEgaJpZM4ObNOi>
> .
>
--
Walter Bender
Sugar Labs
http://www.sugarlabs.org
<http://www.sugarlabs.org>
--
Walter Bender
Sugar Labs
http://www.sugarlabs.org
<http://www.sugarlabs.org>
|
Actually, IRC contains purk/COPYING (GPLv2 applied without source copyright header), setup.py (GPLv2+), and ircactivity.py (LGPLv2+). Useful confirming license assessment by Debian Find Words is at https://github.com/tchx84/find-words-activity and is a combination of MIT, BSD, Apache, and Freesfx.co.uk EULA. PyCut is at https://github.com/FOSSRIT/PyCut and is Mozilla Public License Version 2.0, with fonts under the Apache license. |
@jatindhankhar, please review the following repositories updated README.md files;
Information is somewhat redundant, as it is already in Wiki and packaging downstreams, but as you missed it for sugar-toolkit I've added it. |
I used the new gtk3-toolkit https://github.com/sugarlabs/sugar-toolkit-gtk3, I thought majority of activities use gtk3-toolkit , maybe it's one of the old activities. Developer can upload .xo files as well when releasing, so we can skip the building step.
Really helpful. New developers can easily set up development environment. I made a script to analyze all the 687 repos in sugar-activities to check for License in
Only 40 repos has no license (some of them are empty repos). |
Thanks. I thought majority use gtk2 toolkit. You might extend your script to check |
Thanks, Will try that 👍
I'll keep that in mind. |
Thanks. Don't think you need empty repositories. @i5o, why are they empty? e.g. https://github.com/sugar-activities/4411-activity |
I checked against my spreadsheet. Most of these represent addon
directories in ASLO that did not contain a bundle.
The following are exceptions:
https://github.com/sugar-activities/4248-activity.git, 'nijafable-1.xo'
https://github.com/sugar-activities/4264-activity.git, 'distance-34.xo'
https://github.com/sugar-activities/4344-activity.git, 'Tic-tac-toe-2.xo'
https://github.com/sugar-activities/4374-activity.git, 'oggconvert-1.xo'
https://github.com/sugar-activities/4411-activity.git, 'wikipediaen-36.xo'
https://github.com/sugar-activities/4417-activity.git, 'ideasnds-2.xo'
https://github.com/sugar-activities/4449-activity.git,
'instalador_java_de_unico_uso-1.xo'
https://github.com/sugar-activities/4535-activity.git, 'wikipediapl-33.3.xo'
https://github.com/sugar-activities/4540-activity.git, 'wikipediafr-36.xo'
The 'nijafable' bundle is effectively empty and can be discarded.
The 'distance' bundle is now at https://github.com/godiard/distance-activity
I believe the 4411, 4535, 4540 wikipedia bundles required special
handling and are represented on github.
This leaves Tic-tac-toe (4344), oggconvert (4374), ideasnds (4417), and
Instalador_java_de_unico_uso' (4449) which contain bundles on ASLO.
Tony
…On 07/19/2017 11:24 AM, James Cameron wrote:
Thanks. Don't think you need empty repositories. @i5o
<https://github.com/i5o>, why are they empty? e.g.
https://github.com/sugar-activities/4411-activity
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAULksrAVhOPqhCSkMxuL5IOhmMrCn46ks5sPcsxgaJpZM4ObNOi>.
|
@quozl I tried to build this activity https://github.com/sugarlabs-test/4726-activity (has no po files) and toolkit cannot build without missing po files. Dockerfile - https://github.com/jatindhankhar/aslo-v3/blob/extend_build_pipeline/activity-build-docker/Dockerfile
|
You're wrong, check again. Next time you are reporting a problem, show the step you are having a problem with, not the Docker or other virtualisation wrapping, cloning, using the
You'll find the bundle in the And please don't use Fedora 22, it is too old. |
Sorry, looked again, that was a warning 😞 .
Yes, my intention behind was to show the steps to reproduce and the environment used to build the bundle (same is used by aslo)
Fedora:latest then ? |
Yes; and by the way that's the type of thing I was proposing earlier in this issue thread; that problems with metadata should cause a warning and not a failure. Are you going to give us a pull request? The exit status of the command is where I would place my trust, not only the stdout or stderr writes.
When you use an old Fedora, we're more likely to say "upgrade" rather than do regression or bisection on such an old version of Sugar. Further back you go, the larger the bisection. Fedora 22 uses Sugar 0.104, Fedora 23 uses Sugar 0.106, Fedora 24 uses Sugar 0.108, Fedora 26 uses Sugar 0.110. From Fedora git. With no clear plans for a Sugar 0.112 yet, my guess is Fedora 26 is adequate for the moment. I don't know what latest would do. Possibly expose you to new packaging or distribution regressions. 😀 |
Yes, I made a pull request (jatindhankhar/aslo-v3#7) to aslo-v3 that handles missing po files and missing license(if license is not in Only activities that cannot be build by aslo are those which don't have
Thanks. Will test and replace 22 with 26. 👍 |
I meant adding warnings to both toolkits bundlebuilder.py. The missing setup.py should be patches to those activities. |
Oh 😅 |
@quozl, I was looking at the required_fields = ['metadata_license', 'license', 'name', 'icon',
'description']
for name in required_fields:
if not info.has_option('Activity', name):
print('[WARNING] Activity needs more metadata for AppStream '
'file')
print(' Without an AppStream file, the activity will NOT '
'show in software stores!')
print(' Please `pydoc sugar3.activity.bundlebuilder` for'
'more info')
return So I just need to add fields like bundle_id, summary and it seems like toolkit already warns the developer |
You originally said As you're suggesting
Hope you can see from the above why we're all resistant to changes to the metadata format. 😁 (You may sense an inconsistency; declaring the metadata mandatory in documentation yet implementing a check that does not fail the
My guess is you haven't tried this yet, or you would have found out why it would not work;
Also;
Was there any result? Knowing the number of GTK+ 2 activities will help prioritise any GTK+ 2 toolkit changes. |
Yes, GTK+ 2 activities are building fine. Although I do need to test the core activities as well. I just installed old toolkit and setup.py automatically loads the correct toolkit.
As for the parameters. Majority of the activities that I encountered use |
What do you mean by core activities? Perhaps you mean the Fructose set. Or maybe the set packaged by Fedora. Or maybe the set packaged by Debian. Or maybe the set chosen by OLPC. I still think you should extend your survey script to check
What has the You've twice mentioned new metadata keys that you want; could you please spend a moment giving a definitive list? |
Ah, in jatindhankhar/aslo-v3#8 you referred to the |
Yes but some of the activities like Chat, Log, Image Viewer, Write, Jukebox, Pippy are also part of the Fructose set and they all work fine.
On it.
This also needs to be surveyed, adding it to script. Aslo already uses summary field.
Thanks, I will try that (after adding some features to aslo). |
So, I modified the script and here the are the results. Total repos check : 687
Repos with MetaData License : 646
Repos with LICENSE File : 45
Repos with License entry in file and metadata : 45
Repos with Old Toolkit : 382
Repos with New Toolkit : 98
Repos with summary : 647
Repos with description : 0 Most of the activities use old toolkit and no activity uses description and most (not all) use summary. Here is the new gist https://gist.github.com/jatindhankhar/2fe548212257ad5911ac418547ede434 |
Thanks. About 75% GTK+ 2. Smaller than I had feared, but still very large. So I'm happy to take any feature backports from the GTK+ 3 toolkit to the GTK+ 2 toolkit. 😁 Fascinating that there are 207 repositories with no |
I modified the script. There are 201 such activities
Aslo-v3 supports bundled .xo, so developer can just upload buit .xo and aslo-v3 will process it. |
Currently toolkit produces a
.xo
file even when some fields which are standard (but not enforced) like License, summary, categories (insideactivity.info
and evenpo
files folder are not present. This creates a situation when an activity doesn't even contain metadata like License and a small description. Enforcing it inside the toolkit would allow a common pattern and standardize the activity ecosystem.Also there is no easy way to install sugar-toolkit, one need to manually copy the necessary files to python distribution folder, a pip package would really help in easing the process of setting up a development environment.
These points were raise during a the weekly GSOC meeting, conversation here
The text was updated successfully, but these errors were encountered: