Skip to content

Commit

Permalink
feat(poetry) Use
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikstranneheim committed Sep 7, 2024
1 parent 5f1082c commit f8c29f3
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 212 deletions.
21 changes: 0 additions & 21 deletions .configs/pylintrc

This file was deleted.

29 changes: 9 additions & 20 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,20 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v4.1.1

- name: Set up Python 3.11
- name: Set up Python 0
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build tools
run: >-
python -m
pip install
wheel
twine
--user
- name: Install poetry
uses: snok/install-poetry@v1

- name: Build a binary wheel and a source tarball
run: >-
python
setup.py
sdist
bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Build and publish to PYPI
run: |
poetry publish --build
env:
GITHUB: 1
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}

push_to_registry:
name: Push Docker image to Docker Hub
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@ jobs:
steps:
- uses: actions/checkout@v4.1.1

- name: Set up Python ${{ matrix.python-version}}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Housekeeper Dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements-dev.txt
- name: Install and configure Poetry
uses: snok/install-poetry@v1

- name: Coveralls Dependencies
run: |
pip install pytest-cov coveralls
- name: Install dependencies
run: poetry install --no-interaction

- name: Test with pytest & Coveralls
- name: Test with Pytest & Coveralls
run: |
pytest --cov=housekeeper/
coveralls
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/pythonapp.yml

This file was deleted.

6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ RUN addgroup --system nonroot \
WORKDIR /app
COPY . /app/

RUN pip install --no-cache-dir .
RUN pip install poetry

# Install app requirements
RUN poetry export -f requirements.txt -o requirements.txt --without-hashes
RUN pip install -r requirements.txt -e .

USER nonroot
28 changes: 28 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
[tool.poetry]
name = "housekeeper"
version = "4.13.2"
description = "File data orchestrator"
authors = ["henrikstranneheim <henrik.stranneheim@scilifelab.se>"]
license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
click = "^8.1.7"
coloredlogs = "^15.0.1"
cryptography = "^43.0.1"
marshmallow = "^3.22.0"
PyYAML = "^6.0.2"
SQLAlchemy = "^2.0.34"
rich = "^13.8.0"
PyMySQL = "^1.1.1"

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.8.0"
pytest = "^8.3.2"
pytest-mock = "^3.14.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 100

Expand Down
4 changes: 0 additions & 4 deletions requirements-dev.txt

This file was deleted.

8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

95 changes: 0 additions & 95 deletions setup.py

This file was deleted.

0 comments on commit f8c29f3

Please sign in to comment.