Skip to content

Commit

Permalink
Add pyyaml dependency and add install tests workflow (#2007)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsheni committed May 15, 2024
1 parent 32b373a commit e5e99a0
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Install Tests
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
jobs:
install:
name: ${{ matrix.python_version }} install
strategy:
fail-fast: true
matrix:
python_version: ["3.8", "3.12"]
runs-on: ubuntu-latest
steps:
- name: Set up python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- uses: actions/checkout@v4
- name: Build package
run: |
make package
- name: Install package
run: |
python -m pip install "unpacked_sdist/."
- name: Test by importing packages
run: |
python -c "import sdv"
python -c "import sdv;print(sdv.version.public)"
- name: Check package conflicts
run: |
python -m pip check
1 change: 1 addition & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
integration:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
minimum:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
unit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest]
Expand Down
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,24 @@ release-major: check-release bumpversion-major release

.PHONY: check-deps
check-deps:
$(eval allow_list='cloudpickle=|graphviz=|numpy=|pandas=|tqdm=|copulas=|ctgan=|deepecho=|rdt=|sdmetrics=|platformdirs=')
$(eval allow_list='cloudpickle=|graphviz=|numpy=|pandas=|tqdm=|copulas=|ctgan=|deepecho=|rdt=|sdmetrics=|platformdirs=|pyyaml=')
pip freeze | grep -v "SDV.git" | grep -E $(allow_list) | sort > $(OUTPUT_FILEPATH)

.PHONY: upgradepip
upgradepip:
python -m pip install --upgrade pip

.PHONY: upgradebuild
upgradebuild:
python -m pip install --upgrade build

.PHONY: upgradesetuptools
upgradesetuptools:
python -m pip install --upgrade setuptools

.PHONY: package
package: upgradepip upgradebuild upgradesetuptools
python -m build ; \
$(eval VERSION=$(shell python -c 'import setuptools; setuptools.setup()' --version))
tar -zxvf "dist/sdv-${VERSION}.tar.gz"
mv "sdv-${VERSION}" unpacked_sdist
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies = [
'rdt>=1.12.0',
'sdmetrics>=0.14.0',
'platformdirs>=4.0',
'pyyaml>=6.0.1',
]

[project.urls]
Expand Down

0 comments on commit e5e99a0

Please sign in to comment.