OpenMS / pyopenms-docs

pyOpenMS readthedocs documentation, additional utilities, addons, scripts, and examples.
https://pyopenms.readthedocs.io
Other
46 stars 56 forks source link

make copyright year dynamic #443

Open jcharkow opened 2 months ago

jcharkow commented 2 months ago

User description

this allows the datetime of the copyright to update with the current datetime


PR Type

enhancement, documentation


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
conf.py
Make copyright year dynamic in Sphinx configuration           

docs/source/conf.py
  • Imported the datetime module.
  • Updated the copyright year to be dynamic using datetime.now().year.
  • +2/-1     

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    codiumai-pr-agent-pro[bot] commented 2 months ago

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 1 ๐Ÿ”ตโšชโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก No key issues to review
    codiumai-pr-agent-pro[bot] commented 2 months ago

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Use explicit import for datetime to improve code clarity ___ **Use datetime.datetime.now() instead of datetime.now() to make the import and usage
    more explicit.** [docs/source/conf.py [26-78]](https://github.com/OpenMS/pyopenms-docs/pull/443/files#diff-008dcb3426febd767787b1521f1fe33086313b927ea37eaab86df5fa88a51698R26-R78) ```diff -import datetime +from datetime import datetime ... copyright = f'{datetime.now().year}, OpenMS Team' ```
    Suggestion importance[1-10]: 8 Why: The suggestion to use `from datetime import datetime` makes the code more explicit and improves readability by clearly indicating which part of the module is being used.
    8
    Enhancement
    Use UTC time to ensure consistency across time zones ___ **Consider using a UTC timestamp to ensure consistency across different time zones.** [docs/source/conf.py [78]](https://github.com/OpenMS/pyopenms-docs/pull/443/files#diff-008dcb3426febd767787b1521f1fe33086313b927ea37eaab86df5fa88a51698R78-R78) ```diff -copyright = f'{datetime.now().year}, OpenMS Team' +copyright = f'{datetime.datetime.utcnow().year}, OpenMS Team' ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: Using UTC time can be beneficial for consistency across different environments, especially in distributed systems, although it might not be crucial for this specific use case.
    7

    ๐Ÿ’ก Need additional feedback ? start a PR chat