Replace the umd alias with velofy

This commit is contained in:
Alexander Hess 2026-11-24 10:26:51 +01:00
commit 8e2536f45a
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
3 changed files with 14 additions and 12 deletions

View file

@ -1,12 +1,12 @@
"""Configure sphinx."""
import velofy as umd
import velofy
project = umd.__pkg_name__
author = umd.__author__
project = velofy.__pkg_name__
author = velofy.__author__
copyright = f'2020, {author}'
version = release = umd.__version__
version = release = velofy.__version__
extensions = [
'sphinx.ext.autodoc',

View file

@ -6,7 +6,7 @@ from logging import config as log_config
import sqlalchemy as sa
from alembic import context
from velofy import config as umd_config
from velofy import config as velofy_config
from velofy import db
@ -24,14 +24,14 @@ def include_object(obj, _name, type_, _reflected, _compare_to):
if ( # noqa:WPS337
type_ in {'table', 'column'}
and hasattr(obj, 'schema') # noqa:WPS421 => fix for rare edge case
and obj.schema != umd_config.CLEAN_SCHEMA
and obj.schema != velofy_config.CLEAN_SCHEMA
):
return False
return True
engine = sa.create_engine(umd_config.DATABASE_URI)
engine = sa.create_engine(velofy_config.DATABASE_URI)
with engine.connect() as connection:
context.configure(
@ -39,10 +39,12 @@ with engine.connect() as connection:
include_object=include_object,
target_metadata=db.Base.metadata,
version_table='{alembic_table}{test_schema}'.format(
alembic_table=umd_config.ALEMBIC_TABLE,
test_schema=(f'_{umd_config.CLEAN_SCHEMA}' if os.getenv('TESTING') else ''),
alembic_table=velofy_config.ALEMBIC_TABLE,
test_schema=(
f'_{velofy_config.CLEAN_SCHEMA}' if os.getenv('TESTING') else ''
),
),
version_table_schema=umd_config.ALEMBIC_TABLE_SCHEMA,
version_table_schema=velofy_config.ALEMBIC_TABLE_SCHEMA,
)
with context.begin_transaction():

View file

@ -1,8 +1,8 @@
"""Source code for the urban-meal-delivery research project.
Example:
>>> import velofy as umd
>>> umd.__version__ != '0.0.0'
>>> import velofy
>>> velofy.__version__ != '0.0.0'
True
"""
# The config object must come before all other project-internal imports.