Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Poetry and pyproject.toml #636

Merged
merged 14 commits into from
Jul 19, 2022
8 changes: 4 additions & 4 deletions .github/workflows/docs-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
- name: Install mkdocs & deps
run: |
sudo apt install graphviz
pip install pipenv
pipenv install mkdocs graphviz --skip-lock
pip install poetry
poetry install
- name: Generate recipe doc
run: pipenv run python docs/generate_recipe_doc.py data/recipes docs
run: poetry run python docs/generate_recipe_doc.py data/recipes docs
- name: Build doc
run: pipenv run mkdocs gh-deploy --force
run: poetry run mkdocs gh-deploy --force
8 changes: 4 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: Install mkdocs & deps
run: |
sudo apt install graphviz
pip install pipenv
pipenv install mkdocs graphviz --skip-lock
pip install poetry
poetry install
- name: Generate recipe doc
run: pipenv run python docs/generate_recipe_doc.py data/recipes docs
run: poetry run python docs/generate_recipe_doc.py data/recipes docs
- name: Build doc
run: pipenv run mkdocs build
run: poetry run mkdocs build
54 changes: 5 additions & 49 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ on:

jobs:

pip:
poetry:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9, "3.10"]
env:
DFTIMEWOLF_NO_CURSES: 1
PYTHONPATH: "."
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -22,53 +23,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install .
pip install poetry
poetry install
- name: Test dftimewolf shortcut
run: |
dftimewolf -h

pipenv:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9, "3.10"]
env:
DFTIMEWOLF_NO_CURSES: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install pipenv
pipenv install
pipenv install . --skip-lock
- name: Test dftimewolf shortcut
run: |
pipenv run dftimewolf

setuppy:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9, "3.10"]
env:
DFTIMEWOLF_NO_CURSES: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip setuptools
python setup.py install
- name: Test dftimewolf shortcut
run: |
dftimewolf -h
poetry run python dftimewolf/cli/dftimewolf_recipes.py -h
6 changes: 3 additions & 3 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install pipenv
pipenv install -d
pip install poetry
poetry install
- name: Run mypy on all files
run: |
pipenv run mypy -p dftimewolf
poetry run mypy -p dftimewolf
6 changes: 3 additions & 3 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install pipenv
pipenv install -d
pip install poetry
poetry install
- name: Run pylint on dftimewolf and tests
run: |
pipenv run pylint --rcfile=.pylintrc setup.py dftimewolf tests
poetry run pylint --rcfile=.pylintrc setup.py dftimewolf tests
7 changes: 3 additions & 4 deletions .github/workflows/pytype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install pipenv
pipenv install -d
pipenv install pytype --skip-lock
pip install poetry
poetry install
- name: Run pytype on dftimewolf and tests
run: |
pipenv run pytype --config pytype.conf
poetry run pytype --config pytype.conf
30 changes: 4 additions & 26 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:

pipenv:
poetry:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -22,30 +22,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install pipenv
pipenv install -d
pip install poetry
poetry install
- name: Test with unittest
run: |
pipenv run python -m unittest discover -s tests -p '*.py'

pip:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, "3.10"]
env:
DFTIMEWOLF_NO_CURSES: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Test with unittest
run: |
python -m unittest discover -s tests -p '*.py'
poetry run python -m unittest discover -s tests -p '*.py'
Loading