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

Add Version.revision_number attribute #119

Closed
12 tasks done
eoyilmaz opened this issue Nov 22, 2024 · 3 comments · Fixed by #125
Closed
12 tasks done

Add Version.revision_number attribute #119

eoyilmaz opened this issue Nov 22, 2024 · 3 comments · Fixed by #125
Assignees
Labels
enhancement feature Feature request
Milestone

Comments

@eoyilmaz
Copy link
Owner

eoyilmaz commented Nov 22, 2024

User Story

As the user of Stalker I want the Version class to have anoter major version counter called revision_number which precedes version_number attribute so that I can iterate with major and minor version numbers.

Acceptance Criteria

This should be done after #78 and #120 (the Version.variant_name being removed). This is basically replacing the variant_name with a numeric attribute.

  • Update Version class:

    • Add a new mapped int attribute called revision_number.
    • The revision_number should start from 1.
    • version_number attribute should be grouped with the revision_number so that incrementing revision_number by 1 should reset the version_number to 1.
    • Update Version.latest_version so that it returns the highest version_number with the current revision_number of the Version instance.
    • Update Version.maximum_version_number so that it returns the highest version_number with the current revision_number of that particular Version instance.
    • Add Version.maximum_revision_number that returns the maximum revision_number in the database.
    • Update Version.is_latest_published_version to check with the current revision_number of the Version instance.
    • Update Version.latest_published_version it should return the latest published version with the same revision_number.
    • Update Version.__eq__() tests to also check the functionality with different revision_number attribute values.
  • Update the defaults.filename_template to:

    filename_template='{% for naming_parent in version.naming_parents%}{{naming_parent.nice_name}}_{%endfor%}r{{"%02d"|format(version.revision_number)}}_v{{"%03d"|format(version.version_number)}}'
  • Add alembic revision.

@eoyilmaz eoyilmaz self-assigned this Nov 22, 2024
@eoyilmaz eoyilmaz added enhancement feature Feature request labels Nov 22, 2024
@eoyilmaz eoyilmaz added this to the 1.0.0 milestone Nov 22, 2024
@eoyilmaz eoyilmaz changed the title Add Version.revision_number Add Version.revision_number attribute Nov 22, 2024
@eoyilmaz eoyilmaz mentioned this issue Nov 22, 2024
1 task
@eoyilmaz
Copy link
Owner Author

Because the Review class now has the version attribute and the Version has the reviews attribute (8de3bf1), the Version.review_number is giving the impresion that it is related to the Review.review_number attribute, we might use the DNEG's approach by naming them as major and minor versions... I'm not sure, maybe we should come up with a different name.

@eoyilmaz
Copy link
Owner Author

We might keep the name revision_number but we might do it together with the removal of variant_name in #120 as the revision_number attribute is kind of replacing the variant_name attribute.

@eoyilmaz
Copy link
Owner Author

eoyilmaz commented Dec 4, 2024

Okay, so I didn't do this as a part of #120.

@eoyilmaz eoyilmaz linked a pull request Dec 6, 2024 that will close this issue
eoyilmaz added a commit that referenced this issue Dec 6, 2024
…attribute

[#119] Added `Version.revision_number` attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant