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

add queries for adding new tables and routes for molecule data download #53

Merged
merged 7 commits into from
Oct 5, 2023

Conversation

janash
Copy link
Member

@janash janash commented Sep 29, 2023

this PR adds API routes for downloading data as CSV. It requires importing data for each data type (ml, dft, xtb, xtb_ni`) into new tables for each data type.

The added API endpoints are

  • /api/molecules/data/export/{molecule_id}
  • /api/molecules/data/export?molecule_id=X,Y,Z

The first API endpoint retrieves data for a particular molecule ID. The second retrieves for multiple molecules based on ID. Both return ml data by default. Different data can be returned by adding a parameter data_type=SOMETHING where something can be ml, xtb, xtb_ni, or dft

Pandas is added as a dependency to allow use of reading SQL results into a dataframe pd.read_sql_query and to allow pivoting of data from long format to wide format.

@janash janash marked this pull request as draft September 29, 2023 14:05
@janash janash marked this pull request as ready for review October 5, 2023 15:18
@janash janash merged commit 14cbe1e into Descriptor-Libraries:update Oct 5, 2023
1 check passed
@janash janash deleted the feature/download branch January 15, 2024 04:03
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