Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Poetry #14

Merged
merged 10 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 12 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,30 @@ language: python
cache: pip

before_script:
- pip install pipenv
- pipenv install --dev
- pip install poetry
- poetry install

jobs:
include:
- stage: test
python: "3.6"
script:
- pipenv run pytest --cov=pypokedex
- pipenv run mypy pypokedex
- pipenv run pylint pypokedex
- pipenv run black --check pypokedex
- poetry run pytest --cov=pypokedex
- poetry run mypy pypokedex
- poetry run pylint pypokedex
- poetry run black --check pypokedex
after_success: bash <(curl -s https://codecov.io/bash)
- python: "3.7"
script: pipenv run pytest
script: poetry run pytest
- python: "3.8"
script: pipenv run pytest
# Deployment script
script: poetry run pytest

- stage: deploy
python: "3.6"
script: skip
deploy:
provider: pypi
username: "arnavb"
password:
secure: LyFCxViZHVR1GcniOYCxOocA0uhpOhPM2A9pjqFWPU1MIW9EQvDiqAOhsxXXVwEFF5BRX7qZepPX0iBZSAl1cC8iXp2L6rn5cERyXDUWJHLlNnKjFVo6Er8T87bTFJOq8FCq3iDZaAkYenNTaPEOVbequnKAffSzKhhjaNStk/hokaCBaJWjpKeS/mYFh5ukhq795413LVyVcKu0Z/hdHOisGzN6hfZomWvqBQ+v0N2WWOWHzlvXTBrS44JkUlAHoXlLLWeNzVYTJHN4q2kb/4WA6VDmJefbRiIiZrCpgs66WUCqF0jZuqGgi3Wi4NOI3iKnlGhxC38npcEljvlh2UpyazvkbEm7fTqnquT6cbLrKJZqZ8rulMIfjnN9X7VUu5uL22wtxgNsoYNOZVNHpsXdMdBbLBGU7uYOChGV1Hd9akiG8OGHK0bjUpA6IKtimH5rPU3Ey5Hpfu9E5S7kXhl6Tfxo7w1mn1F4Aejivi4vFoUXc3//XTGJILAuTi7SwLA+CR3eqVWrT7ZiLLie53bg8rknncFwm5Zd5O1N962fz/gePr/GPZ1opeh1fdpy7wNk0FGzonTre2eNq0HmpZ2pfwnGxMGqk9U87z0+YxSxQaT8AmL5WLPHtav9PhE7EnFgcPV7vnYwL2FAP8/BFyPpC9elatfPIr9ndMqysTk=
skip_cleanup: true
distributions: "sdist bdist_wheel"
provider: script
script: ./deploy.sh
on:
tags: true
# Some weird dependency issue occurs with typed-ast
allow_failures:
- python: "3.8"
skip_cleanup: true
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

19 changes: 0 additions & 19 deletions Pipfile

This file was deleted.

481 changes: 0 additions & 481 deletions Pipfile.lock

This file was deleted.

6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ environment:
PYTHON_ARCH: "32"

install:
- "%PYTHON%\\python.exe -m pip install pipenv"
- "%PYTHON%\\python.exe -m pipenv install --dev"
- "%PYTHON%\\python.exe -m pip install poetry"
- "%PYTHON%\\python.exe -m poetry install"

build: off

test_script: "%PYTHON%\\python.exe -m pipenv run pytest"
test_script: "%PYTHON%\\python.exe -m poetry run pytest"
24 changes: 24 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

if ! poetry build; then
echo "Failed to build pypokedex. Rerun 'poetry build'. Aborting."
exit 1
fi

echo "Built pypokedex in dist folder"

# Requires rename utility with perl replace support
if ! rename 's/py3/py36/' dist/pypokedex-1.4.0-py3-none-any.whl; then
echo "Unable to rename built wheel. Aborting."
exit 1
fi

echo "Renamed wheel"

if ! poetry publish; then
echo "Failed to publish pypokedex. Rerun 'poetry publish'. Aborting."
exit 1
fi

echo "Successfully published package to PyPI"
exit 0