Skip to content

Commit b67c9e9

Browse files
author
maxim-lixakov
committed
[DOP-21268] - update RTD config
1 parent 6824462 commit b67c9e9

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build:
1717
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH python -m poetry install --no-root --all-extras --with docs --without dev,test
1818
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH python -m poetry show -v
1919
- python -m pip list -v
20-
- SYNCMASTER__DATABASE__URL=postgresql+psycopg://fake:[email protected]:5432/fake SYNCMASTER__BROKER__URL=amqp://fake:faket@fake:5672/ SYNCMASTER__CRYPTO_KEY=crypto_key python -m syncmaster.backend.export_openapi_schema docs/_static/openapi.json
20+
- SYNCMASTER__DATABASE__URL=postgresql+psycopg://fake:[email protected]:5432/fake SYNCMASTER__BROKER__URL=amqp://fake:faket@fake:5672/ SYNCMASTER__CRYPTO_KEY=crypto_key SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=fakepython python -m syncmaster.backend.export_openapi_schema docs/_static/openapi.json
2121

2222
sphinx:
2323
configuration: docs/conf.py

syncmaster/backend/export_openapi_schema.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@
77

88
from fastapi import FastAPI
99

10-
from syncmaster.backend import application_factory
11-
from syncmaster.backend.settings import BackendSettings as Settings
10+
from syncmaster.backend import get_application
1211

1312

1413
def get_openapi_schema(app: FastAPI) -> dict:
1514
return app.openapi()
1615

1716

1817
if __name__ == "__main__":
19-
settings = Settings()
20-
app = application_factory(settings)
18+
app = get_application()
2119
schema = get_openapi_schema(app)
2220
file_path = sys.argv[1]
2321
if not file_path:

syncmaster/db/migrations/versions/2023-11-23_0001_create_user_table.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def upgrade():
3232
sa.Column("updated_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False),
3333
sa.Column("is_deleted", sa.Boolean(), nullable=False),
3434
sa.PrimaryKeyConstraint("id", name=op.f("pk__user")),
35+
sa.UniqueConstraint("email", name=op.f("uq__user__email")),
3536
)
3637
op.create_index(op.f("ix__user__username"), "user", ["username"], unique=True)
3738

0 commit comments

Comments
 (0)