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

splitting up job entries into different tables #1009

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

Conversation

tnecnivkcots
Copy link
Member

As long time discussed and awaited, the splitting of job entries into different tables can now be seen and tested with the branch splitted_db_tables.

What is not already working:

  • master and parent relationships, as they point to the same primary key in the jobs table and lead to an error
  • using just one session, for the complete process of adding a job

There are also some additional questions:

  • do we want to have a view mode, as in pyiron_base?
  • do we want to check for the length of the chemicalformula?

Some documentation diagrams will follow.

Add Tables definitions (as sqlalchemy classes), namedtuple  DatabaseEntry and methods of TinyDB for handling datasets
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_contrib/splitted_db_tables

@coveralls
Copy link

coveralls commented Feb 29, 2024

Pull Request Test Coverage Report for Build 8097320551

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 257 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.3%) to 18.871%

Files with Coverage Reduction New Missed Lines %
tinybase/database.py 257 0.0%
Totals Coverage Status
Change from base Build 8071289420: -0.3%
Covered Lines: 2103
Relevant Lines: 11144

💛 - Coveralls

correction of method get_jobentry_id, change Job.job to Job.job_name
@jan-janssen
Copy link
Member

Hi @tnecnivkcots , do you think it makes sense to present this in next weeks pyiron meeting ? If so can you add a short comment to https://github.com/orgs/pyiron/discussions/218 . In addition, it would be great to have some examples and or unit tests to see how the new interface compares to the previous interface. Is the new interface backwards compatible? How can a user switch their local environment to use the new database interface?

@pmrv
Copy link
Contributor

pmrv commented Feb 29, 2024

So currently one cannot switch from the old to the new interface. My plan is to stabilize the new interface here first a little bit and then make DatabaseAccess from base conform to it. Switching over the base code would then be simple, but would also need some compatibility setup from our database, either by defining some table views or just migrating the whole database on a maintenance weekend.

Notebooks are failing right now because the rest of tinybase is not adapted yet, but once I've done that we can play a bit with the setup in a tinybase only setup.

add plantuml code and a shor description for the database schema
add uml diagram as png-image related to db_schema.md
@tnecnivkcots
Copy link
Member Author

In docs folder is now a subdirectory uml_diagrams, for concept documentation (in .md and .png-image). For the first there is just a database schema.

database schema

@tnecnivkcots
Copy link
Member Author

Hi @tnecnivkcots , do you think it makes sense to present this in next weeks pyiron meeting ? If so can you add a short comment to https://github.com/orgs/pyiron/discussions/218 . In addition, it would be great to have some examples and or unit tests to see how the new interface compares to the previous interface. Is the new interface backwards compatible? How can a user switch their local environment to use the new database interface?

I think it will be a bit of a work in progress for the presentation. In particular, using it on our cmti resources will require the adjustment of our database setup.

Add uml code with a short description how job handling works with add_jobentry method
UML diagram as png-image
Add plantuml code for the dependency between the tables and sqlalchemy classes `Table` and `Base`
Add the png-image related to the uml code of classes_tables.md
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.

4 participants