Skip to content

Commit f93b796

Browse files
committed
chore: reformat black and fix build
1 parent 5bd8f9a commit f93b796

21 files changed

+994
-881
lines changed

.github/workflows/publish.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,44 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: [3.7, 3.8, 3.9]
12+
python-version: [3.8]
1313
steps:
1414
- uses: actions/checkout@v2
1515
- name: Set up Python ${{ matrix.python-version }}
1616
uses: actions/setup-python@v2
1717
with:
1818
python-version: ${{ matrix.python-version }}
1919

20+
- name: Install poetry
21+
run: |
22+
python -m pip install --upgrade pip
23+
curl -sSL https://install.python-poetry.org | python - --version 1.2.2
24+
echo "${HOME}/.local/bin" >> $GITHUB_PATH
25+
2026
- name: Install dependencies
2127
run: |
22-
curl -sSL https://install.python-poetry.org | python - --version 1.2.1
23-
$HOME/.local/bin/poetry install --no-root
28+
poetry install --no-root
2429
2530
- name: Run tests
2631
run: |
27-
$HOME/.local/bin/poetry run pytest
32+
poetry run pytest
2833
2934
- name: Build wheels
3035
run: |
31-
$HOME/.local/bin/poetry version $(git tag --points-at HEAD)
32-
$HOME/.local/bin/poetry build
36+
poetry version $(git tag --points-at HEAD)
37+
poetry build
3338
3439
- name: Test install package
3540
run: |
36-
mkdir test_install
37-
cd test_install
38-
$HOME/.local/bin/poetry init
39-
$HOME/.local/bin/poetry add ../dist/$(ls dist/*.whl)
41+
poetry new test-install
42+
cd test-install
43+
poetry add ../dist/$(ls ../dist/*.whl)
4044
41-
$HOME/.local/bin/poetry run python -c "import datastream"
45+
poetry run python -c "import datastream"
4246
4347
- name: Upload
4448
env:
4549
USERNAME: __token__
4650
PASSWORD: ${{ secrets.PYPI_TOKEN }}
4751
run: |
48-
$HOME/.local/bin/poetry publish --username=$USERNAME --password=$PASSWORD
52+
poetry publish --username=$USERNAME --password=$PASSWORD

.github/workflows/test.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,23 @@ jobs:
2424
${{ runner.os }}-pip-
2525
${{ runner.os }}-
2626
27+
- name: Install poetry
28+
run: |
29+
python -m pip install --upgrade pip
30+
curl -sSL https://install.python-poetry.org | python - --version 1.2.2
31+
echo "${HOME}/.local/bin" >> $GITHUB_PATH
32+
2733
- name: Install dependencies
2834
run: |
29-
curl -sSL https://install.python-poetry.org | python - --version 1.2.1
30-
$HOME/.local/bin/poetry install install
35+
poetry install
3136
3237
- name: Run tests
3338
run: |
34-
$HOME/.local/bin/poetry install run pytest
39+
poetry run pytest
3540
3641
- name: Build wheels
3742
run: |
38-
$HOME/.local/bin/poetry install build
43+
poetry build
3944
4045
build-docs:
4146
runs-on: ubuntu-latest

README.rst

-6
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,3 @@ Install from source
110110
===================
111111

112112
.. pip install -e .
113-
114-
To patch the code locally for `Python 3.6` run `patch-python3.6.sh`.
115-
116-
.. code-block:: bash
117-
118-
$ ./patch-python3.6.sh

datastream/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
from datastream.datastream import Datastream
33

44
from pkg_resources import get_distribution, DistributionNotFound
5+
56
try:
6-
__version__ = get_distribution('pytorch-datastream').version
7+
__version__ = get_distribution("pytorch-datastream").version
78
except DistributionNotFound:
89
pass

0 commit comments

Comments
 (0)