-
Notifications
You must be signed in to change notification settings - Fork 1
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
OddpubMetrics Docker image and Database Table Generation #15
base: main
Are you sure you want to change the base?
Conversation
…per for PDF processing
…proved data handling
…a wrapper for the ODDPub API.
…hout mock API, ensuring correct data retrieval from the database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @quang-ng, it looks pretty solid! Some details to address but it's almost ready.
.docker/postgres-compose.yaml
Outdated
@@ -13,5 +13,13 @@ services: | |||
timeout: 5s # Added missing timeout value | |||
retries: 5 | |||
|
|||
oddpub-dsst: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we add all the services to this file then we should move it to the root directory and rename it to compose.yaml.
We could also launch the container using python-on-whales, or add separate compose files to this directory.
oddpub_metrics.work_id = self.work_id | ||
oddpub_metrics.document_id = self.document_id | ||
self.db_session.add(oddpub_metrics) | ||
self.db_session.commit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide some output to the user here to confirm the tool has run correctly and perhaps show the results concisely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, perhaps we should get user confirmation before uploading/updating the database and have a -y flag for those who are sure they want to upload?
# self.session.rollback() | ||
|
||
# Check if the Works table exists before attempting to update or delete | ||
inspector = inspect(self.engine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we deleting here instead of rolling back?
…xamples for Oddpub service
… ensuring a cleaner setup process.
Working on issue #14