-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create metadata table for stored properties (#156)
* add metadata table * fix typos * fix typos * add metadata table with initial contents * add ParrPearson on hardness * update metadata schema and data * add documentation for PropertyMetadata class * update docstring * add propertymetadata to fetch tables * correct format * update units * render updated data docs * update isotope metadata * add isotope metadata to PropertyMetadata * docs * add PropertyMetadata to models.__all__
- Loading branch information
Showing
12 changed files
with
379 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
alembic/versions/7d745d77a7c1_add_propertymetadata_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""add PropertyMetadata table | ||
Revision ID: 7d745d77a7c1 | ||
Revises: 703682715347 | ||
Create Date: 2024-05-21 13:11:24.427405 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '7d745d77a7c1' | ||
down_revision = '703682715347' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
value_origin_enum = sa.Enum('STORED', 'COMPUTED', name='valueorigin') | ||
|
||
def upgrade(): | ||
|
||
op.create_table( | ||
'propertymetadata', | ||
sa.Column('id', sa.Integer, primary_key=True, autoincrement=True), | ||
sa.Column('table_name', sa.String, nullable=True), | ||
sa.Column('column_name', sa.String, nullable=True), | ||
sa.Column('class_name', sa.String, nullable=False), | ||
sa.Column('attribute_name', sa.String, nullable=False), | ||
sa.Column('category', sa.String, nullable=False), | ||
sa.Column('value_origin', value_origin_enum, nullable=False), | ||
sa.Column('description', sa.Text, nullable=False), | ||
sa.Column('unit', sa.String, nullable=True), | ||
sa.Column('annotations', sa.Text, nullable=True), | ||
sa.Column('citation_keys', sa.String, nullable=True) | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_table('propertymetadata') | ||
value_origin_enum.drop(op.get_bind()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,6 @@ | ||
mendeleev.cli | ||
============= | ||
|
||
.. automodule:: mendeleev.cli | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
clielement | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. currentmodule:: mendeleev | ||
|
||
.. autodata:: cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,6 @@ | ||
mendeleev.ion | ||
============= | ||
|
||
.. automodule:: mendeleev.ion | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
|
||
Ion | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. currentmodule:: mendeleev | ||
|
||
.. autodata:: ion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters