Skip to content

Commit

Permalink
Merge pull request #30 from paulsaxe/main
Browse files Browse the repository at this point in the history
Fixed problem with Alembic
  • Loading branch information
seamm authored Mar 13, 2024
2 parents 96023c8 + 7a4b4c2 commit d4660fe
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/BranchCI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Run linters
shell: bash -l {0}
run: |
black --check --diff --extend-exclude '_version.py' seamm_datastore
black --check --diff --extend-exclude '_version.py|alembic/' seamm_datastore
flake8 seamm_datastore
- name: Run tests
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Run linters
shell: bash -l {0}
run: |
black --check --diff --extend-exclude '_version.py' seamm_datastore
black --check --diff --extend-exclude '_version.py|alembic/' seamm_datastore
flake8 seamm_datastore
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Run linters
shell: bash -l {0}
run: |
black --check --diff --extend-exclude '_version.py' seamm_datastore
black --check --diff --extend-exclude '_version.py|alembic/' seamm_datastore
flake8 seamm_datastore
test:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ clean-test: ## remove test and coverage artifacts
find . -name '.pytype' -exec rm -fr {} +

lint: ## check style with black and flake8
black --check --diff --extend-exclude '_version.py' $(MODULE)
black --check --diff --extend-exclude '_version.py|alembic/' $(MODULE)
flake8 $(MODULE)

format: ## reformat with black
black --extend-exclude '_version.py' $(MODULE)
black --extend-exclude '_version.py|alembic/' $(MODULE)

typing: ## check typing
pytype $(MODULE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Create Date: 2022-03-24 19:20:10.341379
"""

from alembic import op
import sqlalchemy as sa

Expand All @@ -19,11 +18,20 @@

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("flowcharts", sa.Column("conceptdoi", sa.Text(), nullable=True))
op.add_column(
"flowcharts", sa.Column("flowchart_metadata", sa.JSON(), nullable=True)
)
op.drop_column("flowcharts", "path")
try:
op.add_column("flowcharts", sa.Column("conceptdoi", sa.Text(), nullable=True))
except Exception:
pass
try:
op.add_column(
"flowcharts", sa.Column("flowchart_metadata", sa.JSON(), nullable=True)
)
except Exception:
pass
try:
op.drop_column("flowcharts", "path")
except Exception:
pass
# ### end Alembic commands ###


Expand Down

0 comments on commit d4660fe

Please sign in to comment.