Skip to content

Commit

Permalink
Merge branch 'schema-updates' into add-trial-runner-id-column
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Jan 4, 2025
2 parents b6c867c + 90e34ad commit 46a38ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def is_on_github_actions():
)
intersphinx_mapping.update(
{
"alembic": ("https://alembic.sqlalchemy.org/en/latest/", None),
"dabl": ("https://dabl.github.io/stable/", None),
}
)
Expand Down Expand Up @@ -216,6 +217,7 @@ def setup(app: SphinxApp) -> None:
# External classes that refuse to resolve:
("py:class", "contextlib.nullcontext"),
("py:class", "sqlalchemy.engine.Engine"),
("py:class", "sqlalchemy.MetaData"),
("py:exc", "jsonschema.exceptions.SchemaError"),
("py:exc", "jsonschema.exceptions.ValidationError"),
]
Expand Down Expand Up @@ -253,6 +255,9 @@ def setup(app: SphinxApp) -> None:
# Don't document internal environment scripts that aren't part of a module.
"*/mlos_bench/config/environments/*/*.py",
"*/mlos_bench/config/services/*/*.py",
# Don't document schema evolution scripts.
"*/mlos_bench/storage/sql/alembic/*.py",
"*/mlos_bench/storage/sql/alembic/versions/*.py",
]
autoapi_options = [
"members",
Expand Down
6 changes: 4 additions & 2 deletions mlos_bench/mlos_bench/storage/sql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ def __init__(self, engine: Engine | None):
----------
engine : sqlalchemy.engine.Engine | None
The SQLAlchemy engine to use for the DB schema.
Listed as optional for :external:mod:`alembic` schema migration
purposes, but won't be functional without one.
Listed as optional for `alembic <https://alembic.sqlalchemy.org>`_
schema migration purposes so we can reference it inside it's ``env.py``
config file for :attr:`~meta` data inspection, but won't generally be
functional without one.
"""
_LOG.info("Create the DB schema for: %s", engine)
self._engine = engine
Expand Down

0 comments on commit 46a38ee

Please sign in to comment.