Draft: Resolve "Lint sphinx copyright statement"
2 unresolved threads
2 unresolved threads
Closes #2
Lint ./doc/conf.py
when present. Currently only checks the copyright statement.
Edited by Wout De Nolf
Merge request reports
Activity
Filter activity
assigned to @denolf
requested review from @loic.huder
198 echo ' print(f"No package '{package_name}' on pypi")' >> assert_copyright.py 199 echo 'else:' >> assert_copyright.py 200 echo ' releases = res.json()["releases"]' >> assert_copyright.py 201 echo ' dates = {' >> assert_copyright.py 202 echo ' datetime.fromisoformat(frelease["upload_time"])' >> assert_copyright.py 203 echo ' for release in releases.values()' >> assert_copyright.py 204 echo ' for frelease in release' >> assert_copyright.py 205 echo ' }' >> assert_copyright.py 206 echo ' first_publish = min(dates).year' >> assert_copyright.py 207 echo ' last_publish = max(dates).year' >> assert_copyright.py 208 echo ' if first_publish == last_publish:' >> assert_copyright.py 209 echo ' expected = f"{first_publish}, ESRF"' >> assert_copyright.py 210 echo ' else:' >> assert_copyright.py 211 echo ' expected = f"{first_publish}-{last_publish}, ESRF"' >> assert_copyright.py 212 echo ' assert conf.copyright == expected' >> assert_copyright.py 213 - cat assert_copyright.py Also, I think we need to run
pip install requests
right ?yes
Wow, that is a lots of
echo
I didn't know how else to do it.
include
only applies to gitlab config, not files.
Yes I was thinking about this. We would need to create an separate project (
ewoksdocs
oresrfdocs
or whatever) and include the logic in there and have it a[doc]
dependency.Btw, when looking for explanations on copyrighting, the years seem to refer to "publication" years. Git or PyPi publication
. Obviously I took pypi publication here. Edited by Wout De Nolf
Please register or sign in to reply