Skip to content

Commit d9582a1

Browse files
authored
Merge pull request #275 from VariantEffect/release-2024.3.0
Release 2024.3.0
2 parents baddfe8 + 201154a commit d9582a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+4782
-1286
lines changed

.github/workflows/run-tests-on-push.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Run Tests (On Push)
22
on:
33
push:
44

5+
env:
6+
LOG_CONFIG: test
7+
58
jobs:
69
run-tests-3_9:
710
runs-on: ubuntu-20.04
@@ -15,7 +18,7 @@ jobs:
1518
- run: pip install --upgrade pip
1619
- run: pip install poetry
1720
- run: poetry install --with dev --extras server
18-
- run: poetry run pytest tests/
21+
- run: poetry run pytest tests/ --show-capture=stdout
1922

2023
run-tests-3_10:
2124
runs-on: ubuntu-latest
@@ -29,7 +32,7 @@ jobs:
2932
- run: pip install --upgrade pip
3033
- run: pip install poetry
3134
- run: poetry install --with dev --extras server
32-
- run: poetry run pytest tests/
35+
- run: poetry run pytest tests/ --show-capture=stdout
3336

3437
run-tests-3_11:
3538
runs-on: ubuntu-latest
@@ -43,7 +46,7 @@ jobs:
4346
- run: pip install --upgrade pip
4447
- run: pip install poetry
4548
- run: poetry install --with dev --extras server
46-
- run: poetry run pytest tests/
49+
- run: poetry run pytest tests/ --show-capture=stdout
4750

4851
run-mypy-3_10:
4952
runs-on: ubuntu-latest

Dockerfile.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ COPY src ./src
3737
COPY tests/ ./tests/
3838
COPY mypy_stubs ./mypy_stubs/
3939

40+
ENV LOG_CONFIG=test
41+
4042
RUN useradd testuser -d /code
4143
USER testuser
4244
RUN --network=none poetry run pytest
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""Make Index on Users Unique
2+
3+
Revision ID: 44a45d616036
4+
Revises: ec5d2787bec9
5+
Create Date: 2024-08-16 13:25:14.980820
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
# revision identifiers, used by Alembic.
12+
revision = "44a45d616036"
13+
down_revision = "ec5d2787bec9"
14+
branch_labels = None
15+
depends_on = None
16+
17+
18+
def upgrade():
19+
# ### commands auto generated by Alembic - please adjust! ###
20+
op.drop_index("ix_users_username", table_name="users")
21+
op.create_index(op.f("ix_users_username"), "users", ["username"], unique=True)
22+
# ### end Alembic commands ###
23+
24+
25+
def downgrade():
26+
# ### commands auto generated by Alembic - please adjust! ###
27+
op.drop_index(op.f("ix_users_username"), table_name="users")
28+
op.create_index("ix_users_username", "users", ["username"], unique=False)
29+
# ### end Alembic commands ###
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"""Add contributors
2+
3+
Revision ID: 76e1e55bc5c1
4+
Revises: 9702d32bacb3
5+
Create Date: 2024-08-22 06:17:03.265438
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '76e1e55bc5c1'
14+
down_revision = '9702d32bacb3'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
op.create_table('contributors',
21+
sa.Column('id', sa.Integer(), nullable=False),
22+
sa.Column('orcid_id', sa.String(), nullable=False),
23+
sa.Column('given_name', sa.String(), nullable=True),
24+
sa.Column('family_name', sa.String(), nullable=True),
25+
sa.PrimaryKeyConstraint('id')
26+
)
27+
op.create_index(op.f('ix_contributors_orcid_id'), 'contributors', ['orcid_id'], unique=False)
28+
op.create_table('experiment_set_contributors',
29+
sa.Column('experiment_set_id', sa.Integer(), nullable=False),
30+
sa.Column('contributor_id', sa.Integer(), nullable=False),
31+
sa.ForeignKeyConstraint(['contributor_id'], ['contributors.id'], ),
32+
sa.ForeignKeyConstraint(['experiment_set_id'], ['experiment_sets.id'], ),
33+
sa.PrimaryKeyConstraint('experiment_set_id', 'contributor_id')
34+
)
35+
op.create_table('experiment_contributors',
36+
sa.Column('experiment_id', sa.Integer(), nullable=False),
37+
sa.Column('contributor_id', sa.Integer(), nullable=False),
38+
sa.ForeignKeyConstraint(['contributor_id'], ['contributors.id'], ),
39+
sa.ForeignKeyConstraint(['experiment_id'], ['experiments.id'], ),
40+
sa.PrimaryKeyConstraint('experiment_id', 'contributor_id')
41+
)
42+
op.create_table('scoreset_contributors',
43+
sa.Column('scoreset_id', sa.Integer(), nullable=False),
44+
sa.Column('contributor_id', sa.Integer(), nullable=False),
45+
sa.ForeignKeyConstraint(['contributor_id'], ['contributors.id'], ),
46+
sa.ForeignKeyConstraint(['scoreset_id'], ['scoresets.id'], ),
47+
sa.PrimaryKeyConstraint('scoreset_id', 'contributor_id')
48+
)
49+
50+
51+
def downgrade():
52+
op.drop_table('scoreset_contributors')
53+
op.drop_table('experiment_contributors')
54+
op.drop_table('experiment_set_contributors')
55+
op.drop_index(op.f('ix_contributors_orcid_id'), table_name='contributors')
56+
op.drop_table('contributors')

alembic/versions/9702d32bacb3_controlled_keyword.py

Lines changed: 270 additions & 0 deletions
Large diffs are not rendered by default.

docker-compose-dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ services:
1818
REDIS_IP: redis
1919
REDIS_PORT: 6379
2020
REDIS_SSL: "false"
21+
LOG_CONFIG: dev
2122
ports:
2223
- "8002:8000"
2324
volumes:
@@ -37,6 +38,7 @@ services:
3738
REDIS_IP: redis
3839
REDIS_PORT: 6379
3940
REDIS_SSL: "false"
41+
LOG_CONFIG: dev
4042
volumes:
4143
- .:/code
4244
depends_on:

docker-compose-local.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ services:
1515
environment:
1616
DB_HOST: db
1717
DB_PORT: 5432
18+
REDIS_IP: redis
19+
REDIS_PORT: 6379
20+
REDIS_SSL: False
21+
LOG_CONFIG: dev
1822
ports:
1923
- "8444:8000"
2024
restart: unless-stopped
@@ -33,6 +37,7 @@ services:
3337
REDIS_IP: redis
3438
REDIS_PORT: 6379
3539
REDIS_SSL: False
40+
LOG_CONFIG: dev
3641
depends_on:
3742
- db
3843
- redis

poetry.lock

Lines changed: 904 additions & 842 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "mavedb"
7-
version = "2024.2.2"
7+
version = "2024.3.0"
88
description = "API for MaveDB, the database of Multiplexed Assays of Variant Effect."
99
license = "AGPL-3.0-only"
1010
readme = "README.md"
@@ -37,7 +37,10 @@ httpx = "~0.26.0"
3737
pandas = "~1.4.1"
3838
pydantic = "~1.10"
3939
python-dotenv = "~0.20.0"
40+
python-json-logger = "~2.0.7"
4041
SQLAlchemy = "~2.0.0"
42+
starlette = "~0.27.0"
43+
starlette-context = "^0.3.6"
4144

4245
# Optional dependencies for running this application as a server
4346
alembic = { version = "~1.7.6", optional = true }
@@ -53,7 +56,6 @@ python-jose = { extras = ["cryptography"], version = "~3.3.0", optional = true }
5356
python-multipart = { version = "~0.0.5", optional = true }
5457
requests = { version = "~2.31.0", optional = true }
5558
slack-sdk = { version = "~3.21.3", optional = true }
56-
starlette = { version = "~0.27.0", optional = true }
5759
uvicorn = { extras = ["standard"], version = "*", optional = true }
5860
watchtower = { version = "~3.2.0", optional = true }
5961

@@ -64,7 +66,7 @@ optional = true
6466
black = "*"
6567
boto3-stubs = "~1.34.97"
6668
flake8 = "*"
67-
mypy = "*"
69+
mypy = "~1.10.0"
6870
pre-commit = "*"
6971
jsonschema = "*"
7072
fakeredis = "~2.21.1"
@@ -75,13 +77,14 @@ pytest-socket = "~0.6.0"
7577
pandas-stubs = "~2.1.4"
7678
types-requests = "~2.31.0"
7779
types-python-jose = "~3.3.4"
80+
types-PyYAML = "~6.0.12.20240808"
7881
redis = "~5.0.2"
7982
requests-mock = "~1.11.0"
8083
SQLAlchemy = { extras = ["mypy"], version = "~2.0.0" }
8184

8285

8386
[tool.poetry.extras]
84-
server = ["alembic", "arq", "authlib", "boto3", "cryptography", "fastapi", "email-validator", "orcid", "psycopg2", "python-jose", "python-multipart", "requests", "slack-sdk", "starlette", "uvicorn", "watchtower"]
87+
server = ["alembic", "arq", "authlib", "boto3", "cryptography", "fastapi", "email-validator", "orcid", "psycopg2", "python-jose", "python-multipart", "requests", "slack-sdk", "uvicorn", "watchtower"]
8588

8689

8790
[tool.black]

src/mavedb/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
import logging as module_logging
2+
3+
import mavedb.logging as application_logging
4+
5+
application_logging.configure()
6+
logger = module_logging.getLogger(__name__)
7+
18
__project__ = "mavedb-api"
2-
__version__ = "2024.2.2"
9+
__version__ = "2024.3.0"
10+
11+
logger.info(f"MaveDB {__version__}")

0 commit comments

Comments
 (0)