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

Replace setup.py with poetry #95

Merged
merged 22 commits into from Aug 24, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -1,7 +1,9 @@
[bumpversion]
current_version = 0.1.4
current_version = 0.1.5
commit = True
tag = True

[bumpversion:file:iredis/__init__.py]

[bumpversion:file:pyproject.toml]

@@ -4,7 +4,97 @@
#
version: 2
jobs:
code_style_check:
upload-to-pypi:
docker:
- image: circleci/python:3.7.1
working_directory: ~/repo
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-twine

- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install twine
- save_cache:
paths:
- ./venv
key: v1-dependencies-poetry

- run:
name: build release
command: |
. venv/bin/activate
twine --help
test-release:
docker:
- image: circleci/python:3.7.1
working_directory: ~/repo
steps:
- restore_cache:
keys:
- v1-dependencies-pexpect
- attach_workspace:
at: /tmp/workspace
- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -U pip
pip install /tmp/workspace/dist/*.whl
- save_cache:
paths:
- ./venv
key: v1-dependencies-pexpect

- run:
name: test built release
command: |
. venv/bin/activate
build-release:
docker:
- image: circleci/python:3.7.1
working_directory: ~/repo
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-poetry

- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -U poetry pip
- save_cache:
paths:
- ./venv
key: v1-dependencies-poetry

- run:
name: build release
command: |
. venv/bin/activate
poetry build
- persist_to_workspace:
root: .
paths:
- dist

style-check:
docker:
- image: circleci/python:3.7.1
working_directory: ~/repo
@@ -25,7 +115,7 @@ jobs:
- save_cache:
paths:
- ./venv
- ./venv
key: v1-dependencies-black

- run:
@@ -34,8 +124,7 @@ jobs:
. venv/bin/activate
black --check
build_then_test:
unittest:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
@@ -54,7 +143,7 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-{{ checksum "dev-requirements.txt" }}
- v2-dependencies-{{ checksum "pyproject.toml" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-

@@ -63,26 +152,38 @@ jobs:
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r dev-requirements.txt
pip install -U poetry pip
poetry install --develop=DEVELOP
- save_cache:
paths:
- ./venv
key: v2-dependencies-{{ checksum "dev-requirements.txt" }}
key: v2-dependencies-{{ checksum "pyproject.toml" }}

- run:
name: run tests
command: |
. venv/bin/activate
pytest
- store_artifacts:
path: test-reports
destination: test-reports

workflows:
version: 2
unittest:
jobs:
- code_style_check
- build_then_test
- style-check
- unittest
- build-release:
requires:
- style-check
- unittest
- test-release:
requires:
- build-release
- upload-to-pypi:
requires:
- test-release
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
branches:
only: master

This file was deleted.

This file was deleted.

@@ -1,6 +1,6 @@
import logging

__version__ = "0.1.4"
__version__ = "0.1.5"


logging.basicConfig(
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.