Resolve "Add licence information page" #1791
No reviewers
Labels
No labels
Security
TeX
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
breaking
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aleksis/AlekSIS-Core!1791
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "108-add-licence-information-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #108
added 1 commit
96958a7e- Add about page with general, copyright and licence informationCompare with previous version
unmarked as a Work In Progress
assigned to @nik
There is a de facto standard which puts most of the meta data in
__init__.py.added 1 commit
668885f0- Include licence information from __init__.pyCompare with previous version
See latest commit, I am open for suggestions how to improve it.
added 1 commit
c6da204a- Move crawling code for licence information from settings.py to corresponding viewCompare with previous version
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).
added 1 commit
48ec91e6- Sort copyright holders on licence information pageCompare with previous version
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.
There are only two forgotten imports in
settings.py.changed this line in version 5 of the diff
added 1 commit
4999abf1- Move crawling of app licence information to core_helpersCompare with previous version
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).resolved all threads
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.What for?
What for?
What for?
I thought about using the
AUTHORSvariable 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:
__init__.pyLICENCE_INFORMATIONto__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.
Well, forgotten imports. I am going to clean that.
An addition: We should document where developers need to update the copyright information (README,
pyproject.toml,__init__.pyetc.)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.
Maybe internal documentation (via Wiki)?
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).
;)
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__.pycould 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.
changed milestone to %"2.0a2"
How we want to go on here?
marked as a Work In Progress
added 291 commits
masterc82e52ff- Resolve merge conflictsCompare with previous version
added 6 commits
mastera8b649b3- Merge branch 'master' into 108-add-licence-information-pageCompare with previous version
changed this line in version 8 of the diff
added 1 commit
d3578f67- Define API for app metadata, copyright and license informationCompare with previous version
added 1 commit
dba534f4- Turn metadata API into classmethodsCompare with previous version
added 1 commit
7f107305- Inject licence URLs into licence dictsCompare with previous version
added 1 commit
37edc08a- Calculate flags for licence combinationCompare with previous version
added 1 commit
3aee5929- Fix list generationCompare with previous version
added 2 commits
10c09307- Fix classmethod1fb529e0- Merge branch '108-add-licence-information-page' of...Compare with previous version
added 2 commits
d2e90e15- Add utility function to generate a copyright year string04ab1ed1- Return copyright years as stringCompare with previous version
added 1 commit
4cd0de0f- Remove ow unused functionCompare with previous version
added 2 commits
eb6fdd35- Add missing import08088d4d- Merge branch '108-add-licence-information-page' of...Compare with previous version
added 1 commit
5c02f434- Ignore + mark when finding license definitionsCompare with previous version
We decided to move most to an API defined in the AlekSIS
AppConfigbase class.added 1 commit
Compare with previous version
added 1 commit
91c23501- Redesign about page (with new API)Compare with previous version
unmarked as a Work In Progress
merged
mentioned in commit
701d811b8a