Skip to content

Commit

Permalink
Merge pull request #143 from MichaelAquilina/poetry
Browse files Browse the repository at this point in the history
Poetry
  • Loading branch information
MichaelAquilina committed Jul 25, 2018
2 parents 578bb4d + 09492d4 commit 2b7fdec
Show file tree
Hide file tree
Showing 7 changed files with 797 additions and 83 deletions.
24 changes: 19 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ test: &test
- run:
name: install less pager dependency
command: apt-get update && apt-get install -y less
- run:
name: install poetry
command: curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
- run:
name: install python dependencies
command: pip install -r requirements.txt -r dev-requirements.txt
command: poetry install
- run:
name: run pytest
command: |
mkdir -p /tmp/test-results
PYTHONPATH="." pytest --cov=s4 --cov=tests --cov-report xml --junitxml=/tmp/test-results/pytest-results.xml
PYTHONPATH="." poetry run pytest --cov=s4 --cov=tests --cov-report xml --junitxml=/tmp/test-results/pytest-results.xml
# Only upload for python 3.7 instead of uploading multiple
if [[ "$CIRCLE_JOB" == "test-3.7" ]]; then
Expand Down Expand Up @@ -42,12 +45,23 @@ jobs:
pip install black
black s4 tests --check
- run:
name: install poetry
command: curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python

- run:
name: version lint
command: |
pip install .
test "$(s4 version)" = "$(git tag --sort "v:refname" | tail -1)"
grep "$(s4 version)" CHANGELOG.rst
poetry install --no-dev
CLIENT_VERSION="$(poetry run s4 version)"
GIT_VERSION="$(git tag --sort "v:refname" | tail -1)"
PYPROJECT_VERSION="$(grep version pyproject.toml | cut -d" " -f 3)"
PYPROJECT_VERSION="${PYPROJECT_VERSION//\"/}"
echo "$CLIENT_VERSION $GIT_VERSION $PYPROJECT_VERSION"
test "$CLIENT_VERSION" = "$GIT_VERSION"
test "$CLIENT_VERSION" = "$PYPROJECT_VERSION"
grep "$CLIENT_VERSION" CHANGELOG.rst
test-3.7:
docker:
Expand Down
19 changes: 1 addition & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
S4 = S3 Syncer
==============

|CircleCI| |CodeCov| |Snyk| |PyPi| |GPLv3|
|CircleCI| |CodeCov| |PyPi| |GPLv3|

Fast and cheap synchronisation of files using `Amazon
S3 <https://aws.amazon.com/s3/>`__.
Expand Down Expand Up @@ -200,20 +200,6 @@ Contributing

Pull requests are welcome! Make sure you pass all the tests, Travis will tell you if you don't ;)

Running locally
```````````````

``tox`` is used to run the tests locally:

::

pip install tox

And then to run the tests locally:

::

tox

.. |CircleCI| image:: https://circleci.com/gh/MichaelAquilina/S4.svg?style=svg
:target: https://circleci.com/gh/MichaelAquilina/S4
Expand All @@ -224,9 +210,6 @@ And then to run the tests locally:
.. |CodeCov| image:: https://codecov.io/gh/MichaelAquilina/s4/branch/master/graph/badge.svg
:target: https://codecov.io/gh/MichaelAquilina/s4

.. |Snyk| image:: https://snyk.io/test/github/MichaelAquilina/S4/badge.svg?targetFile=requirements.txt
:target: https://snyk.io/test/github/MichaelAquilina/S4?targetFile=requirements.txt

.. |GPLv3| image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg
:target: https://www.gnu.org/licenses/gpl-3.0

Expand Down
7 changes: 0 additions & 7 deletions dev-requirements.txt

This file was deleted.

0 comments on commit 2b7fdec

Please sign in to comment.