diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..91abb11 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/punchpipe/__init__.py b/punchpipe/__init__.py index 990b741..bc7806c 100644 --- a/punchpipe/__init__.py +++ b/punchpipe/__init__.py @@ -1,16 +1,4 @@ -# version stuff copied from https://stackoverflow.com/a/17638236 -from pkg_resources import get_distribution, DistributionNotFound -import os.path +# version guidance from https://stackoverflow.com/a/56331414 +from importlib.metadata import version -try: - _dist = get_distribution('punchpipe') - # Normalize case for Windows systems - dist_loc = os.path.normcase(_dist.location) - here = os.path.normcase(__file__) - if not here.startswith(os.path.join(dist_loc, 'punchpipe')): - # not installed, but there is another version that *is* - raise DistributionNotFound -except DistributionNotFound: - __version__ = 'Please install punchpipe project with setup.py' -else: - __version__ = _dist.version \ No newline at end of file +__version__ = version("punchpipe") diff --git a/punchpipe/controlsegment/tests/conftest.py b/punchpipe/controlsegment/tests/conftest.py new file mode 100644 index 0000000..5acfa6f --- /dev/null +++ b/punchpipe/controlsegment/tests/conftest.py @@ -0,0 +1,7 @@ +import pytest +from pytest_mock_resources import MysqlConfig + + +@pytest.fixture(scope='session') +def pmr_mysql_config(): + return MysqlConfig(image='mariadb:latest') \ No newline at end of file diff --git a/punchpipe/flows/tests/conftest.py b/punchpipe/flows/tests/conftest.py new file mode 100644 index 0000000..5acfa6f --- /dev/null +++ b/punchpipe/flows/tests/conftest.py @@ -0,0 +1,7 @@ +import pytest +from pytest_mock_resources import MysqlConfig + + +@pytest.fixture(scope='session') +def pmr_mysql_config(): + return MysqlConfig(image='mariadb:latest') \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 0959d67..3e06c09 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -git+ssh://git@github.com/punch-mission/punchbowl.git#egg=punchbowl prefect -pydantic +git+ssh://git@github.com/punch-mission/punchbowl.git#egg=punchbowl +pydantic==1.10.12 pymysql sqlalchemy pyyaml diff --git a/setup.py b/setup.py index f95448d..809053f 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ install_requires=[ 'prefect', 'pymysql', - 'pydantic', + 'pydantic==1.10.12', 'sqlalchemy', 'punchbowl', 'datapane',