-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from marmig0404/dev
Migrate from setup.py to pyproject.toml
- Loading branch information
Showing
6 changed files
with
100 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python lint and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" # matches every branch | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry | ||
poetry install --with dev | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
poetry run flake8 . --count --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Run unittest | ||
run: | | ||
poetry run python -m unittest discover "test" -p 'test_*.py' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,26 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python package | ||
name: Build pypi package | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' # matches every branch | ||
pull_request: | ||
branches: [ master ] | ||
tags: # on tags with versions | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
|
||
# https://github.com/actions/setup-python | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pep8-naming nose | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with nose | ||
run: | | ||
nosetests test/ | ||
build-n-publish: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
. | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
- uses: actions/checkout@master | ||
- name: Set up Python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
- name: Build and publish | ||
run: | | ||
poetry version $(git describe --tags --abbrev=0) | ||
poetry build | ||
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
poetry.lock | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "stl-to-voxel" | ||
packages = [ | ||
{ include = "stltovoxel" }, | ||
] | ||
version = "v0.0.0" | ||
description = "Turn STL files into voxels, images, and videos" | ||
readme = "README.md" | ||
authors = ["Christian Pederkoff"] | ||
license = "MIT" | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Software Development :: Libraries :: Python Modules" | ||
] | ||
keywords = ['numpy', 'Pillow', 'matplotlib', 'numpy-stl'] | ||
repository = "https://github.com/cpederkoff/stl-to-voxel" | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
matplotlib = "^3.6" | ||
numpy = "^1.13" | ||
Pillow = "^9.3" | ||
numpy-stl = "^2.17" | ||
|
||
[tool.poetry.group.dev] | ||
optional = true | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
flake8 = "^5.0.4" | ||
pep8-naming = "^0.13.2" | ||
|
||
[tool.poetry.scripts] | ||
stltovoxel = "stltovoxel.__main__:main" |
This file was deleted.
Oops, something went wrong.