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

Feature/243 calculate sponsored percentage #255

Merged

Conversation

NicolasDontigny
Copy link
Collaborator

Implemented the calculations for the sponsored progress of a site.

I had to update models, serializers, and so I squashed the migrations to one initial script again.
Sponsor progress is now calculated dynamically according to the number of species of a site and of its batches, it is not a field that should be stored in the model/DB

@Samuel-Therrien-Beslogic
Copy link
Contributor

Samuel-Therrien-Beslogic commented Oct 1, 2024

Let's merge #257 first for testing purposes

Also remember to link your PR and issue together. You can either use the "Development" menu on the left, or use a "closing keyword" in your description https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword (I created a new PR template to help us remember: #258)

Copy link
Contributor

@Samuel-Therrien-Beslogic Samuel-Therrien-Beslogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your typing error should be fixed simply by adding the return type annotation on your model methods.

It would be nicer if the default dev DB actually came with various progressions (it can be randomized just like before, but on DB creation instead of every get)
image

canopeum_backend/canopeum_backend/models.py Outdated Show resolved Hide resolved
canopeum_backend/canopeum_backend/models.py Outdated Show resolved Hide resolved
canopeum_backend/canopeum_backend/models.py Outdated Show resolved Hide resolved
@Samuel-Therrien-Beslogic Samuel-Therrien-Beslogic linked an issue Oct 1, 2024 that may be closed by this pull request
@NicolasDontigny
Copy link
Collaborator Author

Your typing error should be fixed simply by adding the return type annotation on your model methods.

It would be nicer if the default dev DB actually came with various progressions (it can be randomized just like before, but on DB creation instead of every get) image

Added type annotations

@Samuel-Therrien-Beslogic Samuel-Therrien-Beslogic merged commit 586ffe4 into main Oct 3, 2024
6 checks passed
@Samuel-Therrien-Beslogic Samuel-Therrien-Beslogic deleted the feature/243-calculate-sponsored-percentage branch October 3, 2024 23:14
andy2great pushed a commit that referenced this pull request Oct 10, 2024
---------

Co-authored-by: Nicolas Dontigny <[email protected]>
Co-authored-by: Samuel T. <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
andy2great pushed a commit that referenced this pull request Oct 10, 2024
---------

Co-authored-by: Nicolas Dontigny <[email protected]>
Co-authored-by: Samuel T. <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calculate the sponsored percentage for a Site
2 participants