-
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.
Merge pull request #878 from MolSSI/create_view
Dataset internal jobs, external files, & server-side view creation
- Loading branch information
Showing
57 changed files
with
2,119 additions
and
837 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,9 @@ geoip = [ | |
snowflake = [ | ||
"qcfractalcompute" | ||
] | ||
s3 = [ | ||
"boto3" | ||
] | ||
|
||
|
||
[project.urls] | ||
|
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
43 changes: 43 additions & 0 deletions
43
qcfractal/qcfractal/alembic/versions/2025-01-03-02afa97249c7_add_external_files_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,43 @@ | ||
"""Add external files table | ||
Revision ID: 02afa97249c7 | ||
Revises: c13116948b54 | ||
Create Date: 2025-01-03 10:01:55.717905 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "02afa97249c7" | ||
down_revision = "c13116948b54" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"external_file", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("created_on", sa.TIMESTAMP(), nullable=False), | ||
sa.Column("status", sa.Enum("available", "processing", name="externalfilestatusenum"), nullable=False), | ||
sa.Column("file_type", sa.Enum("dataset_attachment", name="externalfiletypeenum"), nullable=False), | ||
sa.Column("bucket", sa.String(), nullable=False), | ||
sa.Column("file_name", sa.String(), nullable=False), | ||
sa.Column("object_key", sa.String(), nullable=False), | ||
sa.Column("sha256sum", sa.String(), nullable=False), | ||
sa.Column("file_size", sa.BigInteger(), nullable=False), | ||
sa.Column("description", sa.String(), nullable=True), | ||
sa.Column("provenance", postgresql.JSONB(astext_type=sa.Text()), nullable=False), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("external_file") | ||
# ### end Alembic commands ### |
38 changes: 38 additions & 0 deletions
38
qcfractal/qcfractal/alembic/versions/2025-01-03-84285e3620fd_add_dataset_attachment_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,38 @@ | ||
"""Add dataset attachment table | ||
Revision ID: 84285e3620fd | ||
Revises: 02afa97249c7 | ||
Create Date: 2025-01-03 10:04:16.201770 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "84285e3620fd" | ||
down_revision = "02afa97249c7" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"dataset_attachment", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("dataset_id", sa.Integer(), nullable=False), | ||
sa.Column("attachment_type", sa.Enum("other", "view", name="datasetattachmenttype"), nullable=False), | ||
sa.ForeignKeyConstraint(["dataset_id"], ["base_dataset.id"], ondelete="cascade"), | ||
sa.ForeignKeyConstraint(["id"], ["external_file.id"], ondelete="cascade"), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index("ix_dataset_attachment_dataset_id", "dataset_attachment", ["dataset_id"], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("ix_dataset_attachment_dataset_id", table_name="dataset_attachment") | ||
op.drop_table("dataset_attachment") | ||
# ### end Alembic commands ### |
28 changes: 28 additions & 0 deletions
28
qcfractal/qcfractal/alembic/versions/2025-01-07-c13116948b54_add_progress_description.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,28 @@ | ||
"""Add progress description | ||
Revision ID: c13116948b54 | ||
Revises: e798462e0c03 | ||
Create Date: 2025-01-07 10:35:23.654928 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "c13116948b54" | ||
down_revision = "e798462e0c03" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("internal_jobs", sa.Column("progress_description", sa.String(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("internal_jobs", "progress_description") | ||
# ### end Alembic commands ### |
35 changes: 35 additions & 0 deletions
35
qcfractal/qcfractal/alembic/versions/2025-01-09-5f6f804e11d3_add_dataset_internal_jobs.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,35 @@ | ||
"""Add dataset internal jobs | ||
Revision ID: 5f6f804e11d3 | ||
Revises: 84285e3620fd | ||
Create Date: 2025-01-09 16:25:50.187495 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "5f6f804e11d3" | ||
down_revision = "84285e3620fd" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"dataset_internal_job", | ||
sa.Column("internal_job_id", sa.Integer(), nullable=False), | ||
sa.Column("dataset_id", sa.Integer(), nullable=False), | ||
sa.ForeignKeyConstraint(["dataset_id"], ["base_dataset.id"], ondelete="cascade"), | ||
sa.ForeignKeyConstraint(["internal_job_id"], ["internal_jobs.id"], ondelete="cascade"), | ||
sa.PrimaryKeyConstraint("internal_job_id", "dataset_id"), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("dataset_internal_job") | ||
# ### end Alembic commands ### |
40 changes: 40 additions & 0 deletions
40
...actal/qcfractal/alembic/versions/2025-01-10-3690c677f8d1_add_internal_job_serial_group.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,40 @@ | ||
"""Add internal job serial group | ||
Revision ID: 3690c677f8d1 | ||
Revises: 5f6f804e11d3 | ||
Create Date: 2025-01-10 16:08:36.541807 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "3690c677f8d1" | ||
down_revision = "5f6f804e11d3" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("internal_jobs", sa.Column("serial_group", sa.String(), nullable=True)) | ||
op.create_index( | ||
"ux_internal_jobs_status_serial_group", | ||
"internal_jobs", | ||
["status", "serial_group"], | ||
unique=True, | ||
postgresql_where=sa.text("status = 'running'"), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index( | ||
"ux_internal_jobs_status_serial_group", | ||
table_name="internal_jobs", | ||
postgresql_where=sa.text("status = 'running'"), | ||
) | ||
op.drop_column("internal_jobs", "serial_group") | ||
# ### end Alembic commands ### |
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
Oops, something went wrong.