Skip to content

Commit

Permalink
Merge pull request #13 from punch-mission/develop
Browse files Browse the repository at this point in the history
Fix pydantic validation
  • Loading branch information
jmbhughes authored Oct 16, 2023
2 parents 9c80371 + 13e1560 commit b89aebf
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
18 changes: 3 additions & 15 deletions punchpipe/__init__.py
Original file line number Diff line number Diff line change
@@ -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
__version__ = version("punchpipe")
7 changes: 7 additions & 0 deletions punchpipe/controlsegment/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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')
7 changes: 7 additions & 0 deletions punchpipe/flows/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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')
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
git+ssh://[email protected]/punch-mission/punchbowl.git#egg=punchbowl
prefect
pydantic
git+ssh://[email protected]/punch-mission/punchbowl.git#egg=punchbowl
pydantic==1.10.12
pymysql
sqlalchemy
pyyaml
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
install_requires=[
'prefect',
'pymysql',
'pydantic',
'pydantic==1.10.12',
'sqlalchemy',
'punchbowl',
'datapane',
Expand Down

0 comments on commit b89aebf

Please sign in to comment.