Skip to content

Commit

Permalink
Poetry (#175)
Browse files Browse the repository at this point in the history
* use poetry instead of pip/setup.py
* install poetry
* docker
* mention setuptools-scm
* test publish
* ci
* ci
* Update main.yml
* ci
* Merge branch 'poetry' of github.com:scalableminds/webknossos-cuber into poetry
* publish
  • Loading branch information
normanrz authored and bulldozer-boy[bot] committed Dec 18, 2019
1 parent 167ea6a commit 8079c96
Show file tree
Hide file tree
Showing 9 changed files with 882 additions and 68 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]
python-version: [3.6, 3.7]

steps:
- uses: actions/checkout@v1
Expand All @@ -22,7 +22,9 @@ jobs:
run: docker build -t scalableminds/webknossos-cuber:$GITHUB_SHA .

- name: Install dependencies
run: pip install -r requirements.txt
run: |
pip install poetry
poetry install
- name: Decompress test data
run: tar -xzvf testdata/WT1_wkw.tar.gz
Expand Down Expand Up @@ -122,12 +124,14 @@ jobs:
docker push scalableminds/webknossos-cuber:latest
fi
- name: Check if git is dirty
run: |
git diff --no-ext-diff --quiet --exit-code
[[ -z $(git status -s) ]]
- name: Publish python package
if: startsWith(github.event.ref, 'refs/tags')
if: startsWith(github.event.ref, 'refs/tags') && matrix.python-version == '3.7'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
python setup.py sdist
twine upload dist/*
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: ./publish.sh
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ FROM python:3.7

RUN mkdir /app
WORKDIR /app
COPY requirements.txt /app
COPY setup.py /app

COPY README.md /app
RUN pip install -r requirements.txt
COPY poetry.toml /app
COPY poetry.lock /app
COPY pyproject.toml /app

RUN pip install poetry

COPY wkcuber /app/wkcuber
COPY tests /app/tests

COPY .git /app/.git
RUN python setup.py install
RUN rm -r /app/.git
RUN poetry install --no-dev

ENTRYPOINT [ "python", "-m" ]
Loading

0 comments on commit 8079c96

Please sign in to comment.