-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use poetry for packaging & dependency management
- Loading branch information
1 parent
b4b718c
commit d732670
Showing
5 changed files
with
76 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,20 @@ on: [push] | |
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Install poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Setup | ||
run: bash setup.sh | ||
- name: Analysing the code with pylint | ||
run: | | ||
python -m pylint --fail-under=9 `find -regextype egrep -regex '(.*.py)$'` | ||
run: poetry run pylint ./src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,27 +10,23 @@ jobs: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.7 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.7 | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
. | ||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Setup | ||
run: bash setup.sh | ||
- name: Build | ||
run: poetry build | ||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
run: poetry publish | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
[tool.poetry] | ||
name = "opensignals" | ||
version = "0.0.2" | ||
description = "" | ||
authors = ["Jordi Villar <[email protected]>"] | ||
|
||
[tool.poetry.urls] | ||
Issues = "https://github.com/councilofelders/opensignals/issues" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8,<3.11" | ||
docopt = "^0.6.2" | ||
pandas = "^1.3.4" | ||
numpy = "^1.21.3" | ||
pyarrow = "^6.0.0" | ||
requests = "^2.26.0" | ||
tqdm = "^4.62.3" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pylint = "^2.11.1" | ||
|
||
[build-system] | ||
requires = [ | ||
'setuptools>=42', | ||
'wheel' | ||
] | ||
build-backend = 'setuptools.build_meta' | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! /usr/bin/bash | ||
echo "install poetry if not in path" | ||
if ! command -v poetry &> /dev/null | ||
then | ||
echo "poetry is missing. Installing ..." | ||
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - | ||
source "$HOME/.poetry/env" | ||
fi | ||
|
||
echo "setting up poetry config" | ||
poetry config virtualenvs.path .venv | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
|
||
echo "installing dependencies" | ||
poetry install --no-interaction --no-root | ||
|
||
echo "installing libraries" | ||
poetry install --no-interaction |