Skip to content

Commit

Permalink
Use setup.cfg & PEP517
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDecan committed May 29, 2021
1 parent 03e2aa2 commit 4b2081e
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 638 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ repos:
hooks:
- id: black
name: check code style
entry: poetry run black --check
entry: black --check
language: python
pass_filenames: true
types: ["python"]
- id: pytest
name: run test suite
entry: poetry run pytest
entry: pytest
language: python
always_run: true
pass_filenames: false
Expand Down
23 changes: 10 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,20 @@ jobs:
- python: 3.10-dev
- python: pypy3
before_install:
- pip install pip virtualenv -U
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
- poetry run pip install coverage coveralls
- poetry update --lock
- pip install pip -U
install:
- poetry install
- pip install .[test,dev,ci]
script:
- poetry run black --check
- poetry run coverage run --source portion -m pytest
- black --check
- coverage run --source portion -m pytest
after_success:
- poetry run coveralls
before_deploy:
- poetry build
- poetry config pypi-token.pypi $PYPI_TOKEN
- coveralls
deploy:
provider: script
script: poetry publish
provider: pypi
distributions: sdist bdist_wheel
user: AlexandreDecan
password:
secure: ZEZTWgOAbgFAZ644FSekY+CZi1qPbdDLDxjMi6JQ7JkteB/8q74qyWBJFsBzVF3eBmq0QZZm186ryndu1K42iKG2XDlKcI29RQ9f2HpxPSvZvX9LfdAv13nb/JelDAWnrSTwYWMxyxsqWK0+wVJoyLN5E5ct8wLYSMrf3WcU8V3TqP9LCATy/zuXkM7XBjIinDA4mwdFTmXJCwc6N5auwXv/FVpvoZdCnzPuJVLMa+gcOvgXNZRwvQpB8djv7DXUU/e0Ybie5MpjkEsxnvTphjDS8eOSqhxjBHW/BB4halbEGidxsyyjb7Jm0u6CNxRtEazEyCDCHsN+HcCvlKTZ6AWm93T1GcVgX4S6xVYAKXrjJYmeVxagQq31zWupOQTAsKTXxA3O18JLcXtoPIRFPU9epH5eYfz5j0KVZUAAVLoNbf6nrEUYgNbCOF5KPD/Ysv6V88hZnQlNDcuYG7ZFACr1Ts53IKjeP3zoOFwV4HNX91OqHE9ku1X3DSG027SEfsm5dE2MGjja29ap5bZAtnjbaa0n0Y4abrn/+yNiELjaBHSXKaRqVSKpqLu1uRfD9Op/h4VTLNSgob54B6ZoTzeEz4N4I983fTgpUT8mJhaQaKYhufj03OJHucv1Gn6O7W/fdCHf496rpDixQHzpHYAHDGhkQI1ISsZm8deEnAU=
on:
branch: master
tags: true
Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
## 2.2.0 (not yet released)

### Changed
- Use `poetry` instead of `setuptools` to build `portion`.
- Some internal changes to ease subclassing `Interval`(see [#58](https://github.com/AlexandreDecan/issues/58)):
* Use `self.__class__` instead of `Interval` to create new instances;
* Deprecate and move `mergeable` function to `Interval._mergeable` class method;
* `Interval.from_atomic` is now a class method instead of a static method.

- Support [PEP 517](https://www.python.org/dev/peps/pep-0517).

## 2.1.6 (2021-04-17)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Pre-releases are available from the *master* branch on [GitHub](https://github.c
and can be installed with `pip install git+https://github.com/AlexandreDecan/portion`.
Note that `portion` is also available on [conda-forge](https://anaconda.org/conda-forge/portion).

`portion` relies on `poetry` for its dependencies and its build process. You can install `portion` and its development environment using `poetry install` at the root of this repository. This automatically installs [pytest](https://docs.pytest.org/en/latest/) (for the test suites), [black](https://black.readthedocs.io/en/stable/) (for code formatting) and [pre-commit](https://pre-commit.com) (to automatically install `portion`'s dependencies, execute `pytest` and `black`, assuming you executed `pre-commit install` beforehand).
You can install `portion` and its development environment using `pip install -e .[test,dev]` at the root of this repository. This automatically installs [pytest](https://docs.pytest.org/en/latest/) (for the test suites), [black](https://black.readthedocs.io/en/stable/) (for code formatting) and [pre-commit](https://pre-commit.com).


## Documentation & usage
Expand Down
Loading

0 comments on commit 4b2081e

Please sign in to comment.