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

Test for post usage when combining usage items #53

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dlpbc
Copy link
Contributor

@dlpbc dlpbc commented Sep 30, 2024

To address this issue:
alan-turing-institute/rctab-functions#42

tests are empty for now

to address this issue:
alan-turing-institute/rctab-functions#42

tests are empty for now

 On branch tests_for_post_usage
 Changes to be committed:
	modified:   tests/test_routes/test_usage.py
@dlpbc dlpbc requested a review from Iain-S September 30, 2024 14:56
@dlpbc dlpbc changed the title test for post usage when combining usage items Test for post usage when combining usage items Sep 30, 2024
rctab_models also updated to reflect the update class definition.
poetry dependency also updated to use a relative path to
rctab-models (which a local copy with the updated class definition)
@dlpbc
Copy link
Contributor Author

dlpbc commented Oct 7, 2024

Update the logic of post_usage to address the newly added tests that are failing (i.e., test_post_usage2 and test_post_usage3). See TODO below.

  • Delete any existing rows in the DB between the defined start and end dates.
  • Disable check for conflicts (based on id) in usage items. See
    on_duplicate_key_stmt = usage_query.on_conflict_do_update(
  • Remove primary key from the id field (update the database schema)
    • Option 1: local modification of table, followed by alembic revision --autogenerate.
    • Option 2: manually generate schema. See alembic/versions for examples.

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.

1 participant