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

Database Management #6

Merged
merged 11 commits into from
Aug 29, 2023
Merged

Database Management #6

merged 11 commits into from
Aug 29, 2023

Conversation

trappitsch
Copy link
Collaborator

@trappitsch trappitsch commented Aug 25, 2023

Add capability to manage databases from online repos.

  • Setup the local environment
  • Add function to donwload configuration from github repository
  • Add function to download files with requests
  • Get all databases / a specific database / the latest database (default)
  • Set the working database to user defined / to latest
  • Use the current database in PresolarGrains by default
  • Throw an error in presolar grains if no database has been downloaded / database cannot be found and automatic download does not succeed.
  • Documentation on how database management works
  • Documentation for install: pip install, but also download / update db, in case offline work is wanted.

@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2023

Codecov Report

Merging #6 (383b6ea) into main (e2e438b) will increase coverage by 9.76%.
The diff coverage is 99.72%.

@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
+ Coverage   72.96%   82.72%   +9.76%     
==========================================
  Files          13       22       +9     
  Lines         625      984     +359     
==========================================
+ Hits          456      814     +358     
- Misses        169      170       +1     
Flag Coverage Δ
unittests 82.72% <99.72%> (+9.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
noxfile.py 0.00% <0.00%> (ø)
pgdtools/__init__.py 100.00% <100.00%> (ø)
pgdtools/db/__init__.py 100.00% <100.00%> (ø)
pgdtools/db/config.py 100.00% <100.00%> (ø)
pgdtools/db/management.py 100.00% <100.00%> (ø)
pgdtools/db/setup_local.py 100.00% <100.00%> (ø)
pgdtools/pgdtools.py 55.62% <100.00%> (+0.89%) ⬆️
tests/conftest.py 100.00% <100.00%> (ø)
tests/test_data/test_urls.py 100.00% <100.00%> (ø)
tests/test_db/conftest.py 100.00% <100.00%> (ø)
... and 5 more

For xdoctest session, `nox` will now update the database locally first. This will allow us to have a fully installed and updated pgdtools installation available.
Note that on a personal computer, this will modify the `~/.config/pgdtools` folder (by updating it). However, this workflow most likely runs only on GitHub anyways (and also isn't harmful).
@trappitsch trappitsch marked this pull request as ready for review August 29, 2023 11:04
@trappitsch trappitsch merged commit 897e1ec into main Aug 29, 2023
4 checks passed
@trappitsch trappitsch deleted the db_management branch August 29, 2023 11:06
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.

2 participants