Skip to content

Commit

Permalink
fix(build): Switch to poetry (#171)
Browse files Browse the repository at this point in the history
* fix(build): Switch to poetry

* Fix pyproject errors

* Match python_requires

* Updating lock file

* Fix tox config

* Ensure poetry is installed

* Add env back

* Helps to have the `s`
  • Loading branch information
mcaulifn authored Oct 25, 2023
1 parent e1f63a2 commit fd761e2
Show file tree
Hide file tree
Showing 8 changed files with 1,330 additions and 1,178 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
- name: Run tox
run: |
python -m pip install --upgrade pip
pip install tox
pip install tox poetry
tox -e py
- name: Build
run: poetry build
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
27 changes: 0 additions & 27 deletions Pipfile

This file was deleted.

1,061 changes: 0 additions & 1,061 deletions Pipfile.lock

This file was deleted.

1,288 changes: 1,288 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

45 changes: 30 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
[tool.poetry]
name = "pysolcast"
version = "1.0.15"
description = ""
authors = ["Nathaniel McAuliffe <[email protected]>"]
readme = "README.rst"

[tool.setuptools_scm]
local_scheme = "no-local-version"
version_scheme = "release-branch-semver"
write_to = "pysolcast/version.py"
[tool.poetry.dependencies]
python = ">=3.8"
anyconfig = "0.13.0"
responses = "0.22.0"
isodate = "0.6.1"

[tool.pytest.ini_options]
addopts = "--ignore=pysolcast/version.py"
[tool.poetry.group.dev.dependencies]
bump2version = "1.0.1"
tox = "3.27.0"
pytest = "7.2.1"
pytest-cov = "4.0.0"
sphinx-autodoc-typehints = "1.19.5"
autopep8 = "2.0.2"
rope = "1.6.0"
pydocstyle = "6.1.1"
pycodestyle = "2.10.0"
mock = "5.1.0"
pylint = "2.15.10"
setuptools-scm = "7.1.0"
Sphinx = "5.3.0"

[tool.coverage.run]
omit = ["pysolcast/version.py"]
relative_files = true

[tool.pylint."message_control"]
disable = ["logging-fstring-interpolation"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.pylint.master]
ignore-patterns = "version.py"
[tool.black]
max-line-length = 120
25 changes: 0 additions & 25 deletions setup.cfg

This file was deleted.

42 changes: 0 additions & 42 deletions setup.py

This file was deleted.

16 changes: 9 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
[tox]
envlist = py38, py39, py310, py311, coverage, pylint
isolated_build = true


[testenv:pylint]
basepython = python
deps = pipenv
allowlist_externals = poetry
commands_pre =
poetry install --no-root --sync
commands =
pipenv install --dev --ignore-pipfile
pipenv run pylint pysolcast
poetry run pylint pysolcast

[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
pipenv
allowlist_externals = poetry
commands_pre =
poetry install --no-root --sync
commands =
pipenv install --dev --ignore-pipfile
pipenv run python -m pytest --cov=pysolcast --doctest-modules --cov-report=term-missing -l --junitxml=pytest-report.xml --cov-report xml:coverage.xml tests/
poetry run python -m pytest --cov=pysolcast --doctest-modules --cov-report=term-missing -l --junitxml=pytest-report.xml --cov-report xml:coverage.xml tests/

0 comments on commit fd761e2

Please sign in to comment.