Skip to content

Commit

Permalink
migrate to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Apr 20, 2024
1 parent d0ffb6b commit 11d9530
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 41 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Cargo Build
run: cargo build --verbose
run: cargo build
- name: Cargo Tests
run: cargo test --verbose
run: cargo test
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install python test dependencies
run: |
python -m pip install --upgrade pip
pip install -r python_client/test-requirements.txt
- name: Lint with flake8
run: |
pip install flake8
Expand All @@ -38,9 +34,8 @@ jobs:
- name: Test Python Client
run: |
export THROTTLE_LOG=debug
pip install pytest
pip install -e ./python_client
pytest python_client/tests -v
pip install -e .[test]
pytest -v
dependabot:
needs: [test]
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
cd python_client
python setup.py sdist bdist_wheel
python -m pip install --upgrade pip
pip install bulid
python -m build
twine upload dist/*
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Wether they be in code, intersting feature suggestions, design critique or bug r

```bash
cd python_client
pip install -r test-requirements.txt
pip install -e .
pip install -e .[test]
pytest
```
25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[project]
name = "throttle_client"
version = "0.4.5"
authors = [{ name = "Markus Klein " }]
license = { text = "MIT License" }
description = "Client for Throttle. Throttle is an http semaphore service, providing semaphores for distributed systems."
readme = "Readme.md"
requires-python = ">=3.6"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"requests", "tenacity"
]

[project.optional-dependencies]
test = ["pytest"]

[project.urls]
Repository = "https://github.com/pacman82/throttle.git"

[tool.setuptools.packages.find]
where = ["python_client"]
23 changes: 0 additions & 23 deletions python_client/setup.py

This file was deleted.

1 change: 0 additions & 1 deletion python_client/test-requirements.txt

This file was deleted.

0 comments on commit 11d9530

Please sign in to comment.