Skip to content
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

make copyright year dynamic #443

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jcharkow
Copy link
Contributor

@jcharkow jcharkow commented Sep 17, 2024

User description

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


PR Type

enhancement, documentation


Description

  • Enhanced the Sphinx configuration file to dynamically update the copyright year using the current year.
  • This change ensures that the documentation always reflects the current year without manual updates.

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

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

    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

    Copy link

    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]

    -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]

    -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

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants