Skip to content

Commit 8079c96

Browse files
normanrzbulldozer-boy[bot]
authored andcommitted
Poetry (#175)
* 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
1 parent 167ea6a commit 8079c96

File tree

9 files changed

+882
-68
lines changed

9 files changed

+882
-68
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
python-version: [3.7]
11+
python-version: [3.6, 3.7]
1212

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

2424
- name: Install dependencies
25-
run: pip install -r requirements.txt
25+
run: |
26+
pip install poetry
27+
poetry install
2628
2729
- name: Decompress test data
2830
run: tar -xzvf testdata/WT1_wkw.tar.gz
@@ -122,12 +124,14 @@ jobs:
122124
docker push scalableminds/webknossos-cuber:latest
123125
fi
124126
127+
- name: Check if git is dirty
128+
run: |
129+
git diff --no-ext-diff --quiet --exit-code
130+
[[ -z $(git status -s) ]]
131+
125132
- name: Publish python package
126-
if: startsWith(github.event.ref, 'refs/tags')
133+
if: startsWith(github.event.ref, 'refs/tags') && matrix.python-version == '3.7'
127134
env:
128-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
129-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
130-
run: |
131-
pip install twine
132-
python setup.py sdist
133-
twine upload dist/*
135+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
136+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
137+
run: ./publish.sh

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ FROM python:3.7
22

33
RUN mkdir /app
44
WORKDIR /app
5-
COPY requirements.txt /app
6-
COPY setup.py /app
5+
76
COPY README.md /app
8-
RUN pip install -r requirements.txt
7+
COPY poetry.toml /app
8+
COPY poetry.lock /app
9+
COPY pyproject.toml /app
10+
11+
RUN pip install poetry
912

1013
COPY wkcuber /app/wkcuber
1114
COPY tests /app/tests
1215

13-
COPY .git /app/.git
14-
RUN python setup.py install
15-
RUN rm -r /app/.git
16+
RUN poetry install --no-dev
1617

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

0 commit comments

Comments
 (0)