From 8e2536f45a454e64b64266154421d56a739581a8 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Tue, 24 Nov 2026 10:26:51 +0100 Subject: [PATCH] Replace the `umd` alias with `velofy` --- docs/conf.py | 8 ++++---- migrations/env.py | 14 ++++++++------ src/velofy/__init__.py | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 36e176e..255ae4d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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', diff --git a/migrations/env.py b/migrations/env.py index b00355a..c93f08f 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -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(): diff --git a/src/velofy/__init__.py b/src/velofy/__init__.py index 3df7266..0a2f0fc 100644 --- a/src/velofy/__init__.py +++ b/src/velofy/__init__.py @@ -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.