Skip to content

Commit

Permalink
try: migrate to poetry (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoosnick committed Feb 28, 2024
1 parent 1d565b0 commit 981419c
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 133 deletions.
43 changes: 32 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,39 @@ on:

jobs:
release:
name: "Publish release"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
poetry-version: ["1.8.1"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v1"
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
python-version: 3.12
- name: "Install dependencies"
run: "pip install -r dev-requirements.txt"
- name: "Publish to PyPI"
run: "./scripts/release.sh"
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}

- name: Install the project dependencies
run: poetry install

- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
env/
venv/

dist/
.pypirc
*.lock

.env

.vscode/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ print(response.model_dump())
## More Examples

In examples diriectory: [see](/examples/)
In examples diriectory: [see](https://github.com/old-juniors/eskiz-sms/tree/main/examples)

## Documentation

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

This file was deleted.

2 changes: 1 addition & 1 deletion eskiz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

__all__ = ['SMSClient', 'types', 'enums', 'utils', 'exceptions']

__version__ = '1.0.1'
__version__ = '1.0.2a0'
48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[tool.poetry]
name = "eskiz-sms-client"
packages = [{ include = "eskiz" }]
version = "1.0.2a0"
description = "Async/Sync Python SDK of Eskiz.uz SMS Gateway"
authors = ["hoosnick <[email protected]>"]
license = "MIT"
readme = "README.md"
keywords = ["eskiz-sms", "eskiz", "eskiz-sms-client", "eskiz.uz"]
classifiers = [
"Development Status :: 4 - Beta",

"Intended Audience :: Developers",
"Topic :: Software Development :: SDK",

"License :: OSI Approved :: MIT License",

"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[tool.poetry.dependencies]
python = "^3.9"
aiohttp = ">=3.9.3"
attrs = ">=23.2.0"
certifi = ">=2024.2.2"
pydantic = ">=2.6.2"
pyjwt = ">=2.8.0"
ujson = { version = ">=5.9.0", optional = true }

[tool.poetry.group.dev.dependencies]
pytest = ">=8.0.1"
pytest-asyncio = ">=0.23.5"
pytest-cov = ">=4.1.0"
codecov = ">=2.1.13"

[tool.poetry.extras]
ujson = ["ujson"]

[tool.poetry.urls]
"Source" = "https://github.com/old-juniors/eskiz-sms"
"Bug Tracker" = "https://github.com/old-juniors/eskiz-sms/issues"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.

101 changes: 0 additions & 101 deletions setup.py

This file was deleted.

0 comments on commit 981419c

Please sign in to comment.