Skip to content

Commit

Permalink
Merge pull request #89 from valohai/decl-setup
Browse files Browse the repository at this point in the history
Declarative setup, PEP517
  • Loading branch information
ruksi authored Jun 3, 2022
2 parents 069fc50 + 55f0a66 commit 62ead76
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 58 deletions.
45 changes: 20 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,51 @@ jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: 3.6
python-version: "3.6"
cache: pip
cache-dependency-path: '**/requirements-dev.txt'
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install -e .
- name: Test with pytest
run: pytest -ra --cov .
- name: Cache deps
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: "3.10"
cache: pip
cache-dependency-path: '**/requirements-dev.txt'
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install -e .
- name: Lint
run: make lint
- name: Cache deps
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: "3.10"
cache: pip
cache-dependency-path: '**/requirements-dev.txt'
- name: Install
run: |
python -m pip install build
run: python -m pip install build
- run: python -m build
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[tool.black]
target-version = ["py36"]

[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
21 changes: 21 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
[metadata]
name = valohai-utils
author = Valohai
version = attr:valohai.__version__
author_email = [email protected]
license = MIT

[options.packages.find]
include =
valohai*

[options]
packages = find:
install_requires =
tqdm
requests
valohai-yaml>=0.13.0
valohai-papi>=0.1.1
python_requires = >=3.6
include_package_data = True

[bdist_wheel]
universal = 0

Expand Down
33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

0 comments on commit 62ead76

Please sign in to comment.