Skip to content

Commit 722868d

Browse files
authored
Merge pull request #35 from achimoraites/feat/migrate-to-poetry
feat: migrate to poetry
2 parents b0d69f5 + db52946 commit 722868d

File tree

8 files changed

+358
-77
lines changed

8 files changed

+358
-77
lines changed

Diff for: .github/workflows/python-publish.yml

+17-24
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
81

92
name: Upload Python Package
103

@@ -17,23 +10,23 @@ permissions:
1710

1811
jobs:
1912
deploy:
20-
2113
runs-on: ubuntu-latest
2214

2315
steps:
24-
- uses: actions/checkout@v3
25-
- name: Set up Python
26-
uses: actions/setup-python@v3
27-
with:
28-
python-version: '3.10'
29-
- name: Install dependencies
30-
run: |
31-
python -m pip install --upgrade pip
32-
pip install build
33-
- name: Build package
34-
run: python -m build
35-
- name: Publish package
36-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37-
with:
38-
user: __token__
39-
password: ${{ secrets.PYPI_API_TOKEN }}
16+
- name: Check out repository
17+
uses: actions/checkout@v4
18+
- name: Set up python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install Poetry
24+
uses: snok/install-poetry@v1
25+
- name: Install project
26+
run: poetry install --no-interaction
27+
- name: Build and publish
28+
env:
29+
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
30+
run: |
31+
poetry build
32+
poetry publish -u __token__ -p $PYPI_TOKEN

Diff for: .github/workflows/tests.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
13-
- name: Set up Python
14-
uses: actions/setup-python@v4
12+
- name: Check out repository
13+
uses: actions/checkout@v4
14+
- name: Set up python
15+
uses: actions/setup-python@v5
1516
with:
16-
python-version: "3.10"
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install pytest
21-
pip install -r requirements.txt
17+
python-version: "3.12"
18+
19+
- name: Install Poetry
20+
uses: snok/install-poetry@v1
21+
- name: Install project
22+
run: poetry install --no-interaction --with dev
2223
- name: Run pytest
23-
run: python -m pytest
24+
run: poetry run pytest

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ $ pip3 install raw_image_converter
2828
git clone https://github.com/achimoraites/Python-Image-Converter.git [my-app-name]
2929
cd [my-app-name]
3030

31-
pip install -r requirements.txt
31+
poetry install
32+
poetry shell
3233

3334
python -m raw_image_converter --s <Enter-Path-Of-Directory>
3435
```

Diff for: poetry.lock

+295
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[tool.poetry]
2+
name = "python-image-converter"
3+
version = "1.1.3"
4+
description = "Batch image convertions"
5+
authors = ["Achilles Moraites <[email protected]>"]
6+
license = "MIT"
7+
readme = "README.md"
8+
classifiers=[
9+
"License :: OSI Approved :: MIT License",
10+
"Programming Language :: Python :: 3",
11+
"Programming Language :: Python :: 3.9",
12+
'Topic :: Utilities',
13+
]
14+
keywords = ["cli", "converter", "raw", "images"]
15+
repository = "https://github.com/achimoraites/Python-Image-Converter"
16+
packages=[{include = "raw_image_converter"}]
17+
18+
[tool.poetry.dependencies]
19+
python = "^3.9"
20+
imageio = "2.16.2"
21+
pillow = "10.3.0"
22+
rawpy = "0.19.1"
23+
numpy = "1.26.4"
24+
colorama = "0.4.6"
25+
26+
27+
[tool.poetry.group.dev.dependencies]
28+
pytest = "^8.2.0"
29+
30+
[build-system]
31+
requires = ["poetry-core"]
32+
build-backend = "poetry.core.masonry.api"

Diff for: raw_image_converter/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"""
66

77
# Version of the package
8-
__version__ = "1.1.2"
8+
__version__ = "1.1.3"

Diff for: requirements.txt

-5
This file was deleted.

Diff for: setup.py

-36
This file was deleted.

0 commit comments

Comments
 (0)