Resolve "Add licence information page" #1791

Merged
hansegucker merged 21 commits from 108-add-licence-information-page into master 2020-04-18 23:02:46 +02:00
Owner

Closes #108

Closes #108
Author
Owner

added 1 commit

  • 96958a7e - Add about page with general, copyright and licence information

Compare with previous version

added 1 commit <ul><li>96958a7e - Add about page with general, copyright and licence information</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/146/diffs?diff_id=1281&start_sha=5ec792e4d443c3a96e1621f1bcf6ab4d33c3e424)
Author
Owner

unmarked as a Work In Progress

unmarked as a **Work In Progress**
Author
Owner

assigned to @nik

assigned to @nik
Owner

There is a de facto standard which puts most of the meta data in __init__.py.

There is a de facto standard which puts most of the meta data in `__init__.py`.
Author
Owner

added 1 commit

  • 668885f0 - Include licence information from __init__.py

Compare with previous version

added 1 commit <ul><li>668885f0 - Include licence information from __init__.py</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/146/diffs?diff_id=1282&start_sha=96958a7e1f1fd3d170abc0a25648b0ae32407a2b)
Author
Owner

See latest commit, I am open for suggestions how to improve it.

See latest commit, I am open for suggestions how to improve it.
Author
Owner

added 1 commit

  • c6da204a - Move crawling code for licence information from settings.py to corresponding view

Compare with previous version

added 1 commit <ul><li>c6da204a - Move crawling code for licence information from settings.py to corresponding view</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/146/diffs?diff_id=1283&start_sha=668885f0e8b67a04136014af33acfb48c4ae157b)
Owner

Such code does not go into view functions. View functions contain only the code to transform data for passing to the template context (except for situations where it doesn't, because factoring utility code out would lead to higher complexity).

Such code does not go into view functions. View functions contain only the code to transform data for passing to the template context (except for situations where it doesn't, because factoring utility code out would lead to higher complexity).
Author
Owner

added 1 commit

  • 48ec91e6 - Sort copyright holders on licence information page

Compare with previous version

added 1 commit <ul><li>48ec91e6 - Sort copyright holders on licence information page</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/146/diffs?diff_id=1284&start_sha=c6da204a282615c4662157ecc7f79e0ac6c716cb)
Owner

I am somehow generally not convinced thatany part of this should go into settings. ALl metadata should be in the package's __init__.py.

I did not try that, but maybe it is worthwhile looking into how the Django Debug Toolbar achieves the exact same functionality in its package metadata panel.

I am somehow generally not convinced that*any* part of this should go into settings. ALl metadata should be in the package's `__init__.py`. I did not try that, but maybe it is worthwhile looking into how the Django Debug Toolbar achieves the exact same functionality in its package metadata panel.
Author
Owner

There are only two forgotten imports in settings.py.

There are only two forgotten imports in `settings.py`.
Author
Owner

changed this line in version 5 of the diff

changed this line in [version 5 of the diff](/AlekSIS/AlekSIS/merge_requests/146/diffs?diff_id=1285&start_sha=48ec91e6cc64a6269a8bba886d4d151919587575#ca5e4a886c594c4b59402dbdbd16348bdbcddf3a_56_50)
Author
Owner

added 1 commit

  • 4999abf1 - Move crawling of app licence information to core_helpers

Compare with previous version

added 1 commit <ul><li>4999abf1 - Move crawling of app licence information to core_helpers</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/146/diffs?diff_id=1285&start_sha=48ec91e6cc64a6269a8bba886d4d151919587575)
Owner

There is a whole bunch of stuff in settings.py as LICENCE_INFORMATION, and none of it belongs there. Implementing this definitely does not need any additions to settings.py (except you want to make something configurable).

There is a whole bunch of stuff in settings.py as `LICENCE_INFORMATION`, and none of it belongs there. Implementing this definitely does not need any additions to settings.py (except you want to make something configurable).
Author
Owner

resolved all threads

resolved all threads
Owner

There seems to be at least some consensus on using __foo__ variables for such metadata. ALso, some or most might be available fromthe packaging system, though it is not 100% reliabe, e.g. if people just copy stuff around. On the other hand, keeping this here leaves us with yet another (a third) location whre it needs to be kept up to date.

There seems to be at least some consensus on using `__foo__` variables for such metadata. ALso, some or most might be available fromthe packaging system, though it is not 100% reliabe, e.g. if people just copy stuff around. On the other hand, keeping this here leaves us with yet another (a third) location whre it needs to be kept up to date.
Owner

What for?

What for?
Owner

What for?

What for?
Owner

What for?

What for?
Author
Owner

I thought about using the AUTHORS variable from the packaging system for a moment, but there were missing some information I wanted to include (here years of copyright and e-mail addresses of copyright holders).

I would suggest following:

  1. Keep information about licence and copyright in __init__.py
  2. Rename LICENCE_INFORMATION to __licence_information__

But I don't think that this solution is ideal, especially because the third location that needs to be kept up to date.

I thought about using the `AUTHORS` variable from the packaging system for a moment, but there were missing some information I wanted to include (here years of copyright and e-mail addresses of copyright holders). I would suggest following: 1. Keep information about licence and copyright in `__init__.py` 1. Rename `LICENCE_INFORMATION` to `__licence_information__` But I don't think that this solution is ideal, especially because the third location that needs to be kept up to date.
Author
Owner

Well, forgotten imports. I am going to clean that.

Well, forgotten imports. I am going to clean that.
Author
Owner

An addition: We should document where developers need to update the copyright information (README, pyproject.toml, __init__.py etc.)

An addition: We should document where developers need to update the copyright information (README, `pyproject.toml`, `__init__.py` etc.)
Owner

Updating that information should be done by maintainers (in cooperation with contributors) because some attention needs to be given to what a copyrightable change is and what isn't.

Each meta-data field should get its own variable, not all in one dict (as shown in https://stackoverflow.com/questions/37989422/placing-metadata-like-title-author-version-etc-in-init-py?noredirect=1&lq=1 and the PEPs referenced there).

There are a lot of pseudo-standards around for this issue, including SPDX meta-data files, but I haven't really researched those.

Updating that information should be done by maintainers (in cooperation with contributors) because some attention needs to be given to what a copyrightable change is and what isn't. Each meta-data field should get its own variable, not all in one dict (as shown in https://stackoverflow.com/questions/37989422/placing-metadata-like-title-author-version-etc-in-init-py?noredirect=1&lq=1 and the PEPs referenced there). There are a lot of pseudo-standards around for this issue, including SPDX meta-data files, but I haven't really researched those.
Author
Owner

Updating that information should be done by maintainers (in cooperation with contributors) because some attention needs to be given to what a copyrightable change is and what isn't.

Maybe internal documentation (via Wiki)?

> Updating that information should be done by maintainers (in cooperation with contributors) because some attention needs to be given to what a copyrightable change is and what isn't. Maybe internal documentation (via Wiki)?
Author
Owner

Each meta-data field should get its own variable, not all in one dict (as shown in https://stackoverflow.com/questions/37989422/placing-metadata-like-title-author-version-etc-in-init-py?noredirect=1&lq=1 and the PEPs referenced there).

I am not sure what I should do now. For example: There are suggestions to use a field "license" (AE) but we usual write "licence" (BE).

> Each meta-data field should get its own variable, not all in one dict (as shown in https://stackoverflow.com/questions/37989422/placing-metadata-like-title-author-version-etc-in-init-py?noredirect=1&lq=1 and the PEPs referenced there). I am not sure what I should do now. For example: There are suggestions to use a field "__license__" (AE) but we usual write "__licence__" (BE).
Owner
__licence__ = __license__ = "EUPL-12"

;)

ANyway, I got another wild idea: Normally, each source file should carry copyright information in a comment or a docstring.

My current idea is to mandate a docstring in every module, containg the description of the module, and several fields in restructured-text format like in PEP 287. Then, the app's __init__.py could have the main information, and each source module could have its own set of copyrighth holders, like technically required by our licence.

The discovery code could then have a logic where it gets the app description from the main module, and generates the list of copyright holders and years by mergin the information from all source modules, or something.

This idea is not yet a usable draft.

``` __licence__ = __license__ = "EUPL-12" ``` ;) ANyway, I got another wild idea: Normally, each source file should carry copyright information in a comment or a docstring. My current idea is to mandate a docstring in every module, containg the description of the module, and several fields in restructured-text format like in PEP 287. Then, the app's `__init__.py` could have the main information, and each source module could have its own set of copyrighth holders, like technically required by our licence. The discovery code could then have a logic where it gets the app description from the main module, and generates the list of copyright holders and years by mergin the information from all source modules, or something. This idea is not yet a usable draft.
Owner

changed milestone to %"2.0a2"

changed milestone to %"2.0a2"
Author
Owner

How we want to go on here?

How we want to go on here?
Author
Owner

marked as a Work In Progress

marked as a **Work In Progress**
Author
Owner

added 291 commits

  • 4999abf1...a7665dd6 - 290 commits from branch master
  • c82e52ff - Resolve merge conflicts

Compare with previous version

added 291 commits <ul><li>4999abf1...a7665dd6 - 290 commits from branch <code>master</code></li><li>c82e52ff - Resolve merge conflicts</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1773&start_sha=4999abf1385828f2e39cd4fffdb563061662d5dd)
Owner

added 6 commits

  • c82e52ff...1c5ed5ea - 5 commits from branch master
  • a8b649b3 - Merge branch 'master' into 108-add-licence-information-page

Compare with previous version

added 6 commits <ul><li>c82e52ff...1c5ed5ea - 5 commits from branch <code>master</code></li><li>a8b649b3 - Merge branch &#39;master&#39; into 108-add-licence-information-page</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1792&start_sha=c82e52ff9ad49b8993be298bf8ca1461f5aa58cc)
Owner

changed this line in version 8 of the diff

changed this line in [version 8 of the diff](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1793&start_sha=a8b649b3877c31decdede60490424c7c3cb1511e#2aa43ef3bd5eb18f020d3d373d7ced5a164df2f2_18_17)
Owner

added 1 commit

  • d3578f67 - Define API for app metadata, copyright and license information

Compare with previous version

added 1 commit <ul><li>d3578f67 - Define API for app metadata, copyright and license information</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1793&start_sha=a8b649b3877c31decdede60490424c7c3cb1511e)
Owner

added 1 commit

  • dba534f4 - Turn metadata API into classmethods

Compare with previous version

added 1 commit <ul><li>dba534f4 - Turn metadata API into classmethods</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1794&start_sha=d3578f6781cd0703ca010622b3de0163b704ea29)
Owner

added 1 commit

  • 7f107305 - Inject licence URLs into licence dicts

Compare with previous version

added 1 commit <ul><li>7f107305 - Inject licence URLs into licence dicts</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1795&start_sha=dba534f49d6ff1f767df4a4c435cc27c9fe78fda)
Owner

added 1 commit

  • 37edc08a - Calculate flags for licence combination

Compare with previous version

added 1 commit <ul><li>37edc08a - Calculate flags for licence combination</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1796&start_sha=7f107305e2088caf421f30297c622bf13cd27a4b)
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>3aee5929 - Fix list generation</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1797&start_sha=37edc08aeca67f0ecf30be748cda494e3673331e)
Author
Owner

added 2 commits

  • 10c09307 - Fix classmethod
  • 1fb529e0 - Merge branch '108-add-licence-information-page' of...

Compare with previous version

added 2 commits <ul><li>10c09307 - Fix classmethod</li><li>1fb529e0 - Merge branch &#39;108-add-licence-information-page&#39; of...</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1798&start_sha=3aee5929927c3d53c1b9217bbb9aadda0f5418ad)
Owner

added 2 commits

  • d2e90e15 - Add utility function to generate a copyright year string
  • 04ab1ed1 - Return copyright years as string

Compare with previous version

added 2 commits <ul><li>d2e90e15 - Add utility function to generate a copyright year string</li><li>04ab1ed1 - Return copyright years as string</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1799&start_sha=1fb529e005636d6d5bbec787a39d65df3070147c)
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>4cd0de0f - Remove ow unused function</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1800&start_sha=04ab1ed184f2be0d3303b5d2abbc866e74775027)
Author
Owner

added 2 commits

  • eb6fdd35 - Add missing import
  • 08088d4d - Merge branch '108-add-licence-information-page' of...

Compare with previous version

added 2 commits <ul><li>eb6fdd35 - Add missing import</li><li>08088d4d - Merge branch &#39;108-add-licence-information-page&#39; of...</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1801&start_sha=4cd0de0fde4f18c25a793e9c4587e706c52640af)
Owner

added 1 commit

  • 5c02f434 - Ignore + mark when finding license definitions

Compare with previous version

added 1 commit <ul><li>5c02f434 - Ignore + mark when finding license definitions</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1802&start_sha=08088d4dc87a13b6a71b635f5493681ba3e58959)
Owner

We decided to move most to an API defined in the AlekSIS AppConfig base class.

We decided to move most to an API defined in the AlekSIS `AppConfig` base class.
Author
Owner

added 1 commit

  • f0212de9 - Redesign about page (with new API)

Compare with previous version

added 1 commit <ul><li>f0212de9 - Redesign about page (with new API)</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1803&start_sha=5c02f434da242296948c3c2b369171485f183055)
Author
Owner

added 1 commit

  • 91c23501 - Redesign about page (with new API)

Compare with previous version

added 1 commit <ul><li>91c23501 - Redesign about page (with new API)</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/146/diffs?diff_id=1804&start_sha=f0212de948ed2eb3ef494e3f1bca1874bfd63f48)
Owner

unmarked as a Work In Progress

unmarked as a **Work In Progress**
Owner

merged

merged
Owner

mentioned in commit 701d811b8a

mentioned in commit 701d811b8afd55f08e21f5c9d7c7586ede5a6645
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-Core!1791
No description provided.