Skip to content

Commit

Permalink
Switch project to Poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch00k committed Jul 30, 2024
1 parent 42247d7 commit 936a64f
Show file tree
Hide file tree
Showing 8 changed files with 515 additions and 62 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ jobs:
with:
python-version: "3.12"
architecture: x64
- run: pip install -U -r dev-requirements.txt
- run: flake8 .
- run: black --check --diff .
- run: isort --check --diff .
- run: |
pip install poetry
poetry install --with dev
- run: poetry run flake8 .
- run: poetry run black --check --diff .
- run: poetry run isort --check --diff .

test:
# https://github.com/actions/setup-python/issues/544
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand All @@ -44,8 +43,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip install -U -r test-requirements.txt
- run: PATH=./tests/ffmpeg:$PATH PYTHONPATH=. py.test tests --cov=ffmpy --cov-report xml
- run: |
pip install poetry
poetry install --with dev
- run: poetry run pytest --cov=ffmpy --cov-report xml
env:
PATH: ${{ env.github_workspace }}/tests/ffmpeg:$PATH
PYTHONPATH: ${{ env.github_workspace }}

- uses: codecov/codecov-action@v4
if: matrix.python-version == 3.12
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
*.pyc
*.egg-info
.tox
.eggs
.cache
dist
build

# Sphinx
docs/_build
3 changes: 0 additions & 3 deletions dev-requirements.txt

This file was deleted.

422 changes: 422 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

79 changes: 79 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[tool.poetry]
name = "ffmpy"
version = "0.3.3"
description = "A simple Python wrapper for FFmpeg"
authors = ["Andrii Yurchuk <ay@mntw.re>"]
license = "MIT"
readme = "README.rst"
homepage = "https://github.com/Ch00k/ffmpy"
repository = "https://github.com/Ch00k/ffmpy"
documentation = "https://ffmpy.readthedocs.io"
keywords = [
"ffmpeg",
"ffprobe",
"ffplay",
"ffserver",
"wrapper",
"media",
"audio",
"video",
"transcoding",
]
classifiers = [
"Topic :: Multimedia :: Sound/Audio",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
]
packages = [{ include = "ffmpy.py" }]

[tool.poetry.dependencies]
python = "^3.8.1" # flake8 requires Python 3.8.1 or higher

[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
isort = "^5.13.2"
mypy = "^1.11.0"
flake8 = "^7.1.0"
flake8-pyproject = "^1.2.3"
pytest = "^8.3.2"
pytest-cov = "^5.0.0"

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

[tool.black]
line-length = 101

[tool.flake8]
max-line-length = 101

[tool.isort]
profile = "black"
line_length = 101
include_trailing_comma = true

[tool.mypy]
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
show_column_numbers = true
3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.

38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

2 changes: 0 additions & 2 deletions test-requirements.txt

This file was deleted.

0 comments on commit 936a64f

Please sign in to comment.