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 __version__ attribute consistent in Python modules #840

Open
josh-hadley opened this issue Jul 12, 2019 · 0 comments
Open

Make __version__ attribute consistent in Python modules #840

josh-hadley opened this issue Jul 12, 2019 · 0 comments

Comments

@josh-hadley
Copy link
Collaborator

AFDKO Python module __version__ attributes are inconsistent. Many don't have the attribute at all; some that do put the module name or date in the version string; others use "X.Y" while others still use "X.Y.Z" versioning.

After other cleanup & trimming is done (drop Python 2.7 support & other related initiatives), remaining Python modules should have consistent versioning applied, and the __version__ attribute should be the single source of truth for the module version (not docstrings or other attributes). I propose the following scheme:

  • Format: __version__ = 'X.Y.Z'

  • Location: module scope, ideally immediately following imports, before other module attributes, constants, etc.

  • How to set the value:

    • modules already using "X.Y.Z" scheme: increment 'Z' for bug/trivial/patch updates. Use 'X.Y+1.0' for minor updates, 'X+1.0.0' for major updates (semantic versioning)
    • modules with versions set in docstrings or other locations: remove from that location & increment (usually Z-value + 1 for minor updates).
    • modules with no version # anywhere: use X.Y.Z == current FDK release version
    • modules using "X.Y" versioning: add Z == 1 (see note above re: semantic versioning)
    • modules using the name, date, or other values in the __version__ attribute should remove those and leave only "X.Y.Z" (incremented as applicable for semantic versioning)

Versioning-related updates can be performed along with other work as needed or as a focused effort.

@josh-hadley josh-hadley self-assigned this Jul 12, 2019
@josh-hadley josh-hadley removed their assignment Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant