Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry setup #426

Closed
wants to merge 16 commits into from
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 120
ignore = E203,W503,B006
7 changes: 4 additions & 3 deletions .github/workflows/compile_card_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ jobs:
with:
python-version: 3.8
- run: |
pip install -r requirements.txt
pip install poetry
poetry install
pip install .
- name: Update Languages
run: doit update_languages
run: poetry run doit update_languages
- run: |
pip install .
- name: test generation with compiled Languages
run: pytest -k "test_languages"
run: poetry run pytest -k "test_languages"
- uses: dorny/paths-filter@v2
id: filter
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
with:
python-version: 3.8
- run: |
pip install -r requirements.txt
pip install .
pip install poetry
poetry install
- name: Lint
run: pre-commit run --all-files
run: poetry run pre-commit run --all-files
- name: Test
run: pytest
run: poetry run tox
11 changes: 5 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ jobs:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install poetry
poetry install
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
poetry publish --build
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def task_build():
files = [
fname
for fname in glob_no_dirs("src/domdiv/**/*")
+ glob.glob("card_db_src/**/*.json" + "setup.py")
+ glob.glob("card_db_src/**/*.json")
if os.path.isfile(fname)
]
return {
Expand Down
1,717 changes: 1,717 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

40 changes: 37 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.3", "pytest-runner"]

[tools.setuptools_scm]
[tool.poetry]
name = "domdiv"
version = "0.0.0"
description = "Divider Generation for the Dominion Card Game"
authors = ["Peter Gorniak <[email protected]>"]
license = "MIT"
homepage = "http://domdiv.bgtools.net"
readme = "README.md"
repository = "https:/sumpfork/dominiontabs"
keywords = ["boardgame", "cardgame", "dividers"]

[tool.poetry.scripts]
dominion_dividers = 'domdiv.main:main'
domdiv_update_language = 'domdiv.tools.update_language:run'
domdiv_bgg_release = 'domdiv.tools.bgg_release:make_bgg_release'
domdiv_dedupe_cards = 'domdiv.tools.cleanup_language_dupes:main'

[tool.poetry.dependencies]
python = "^3.7"
Pillow = "^8.2.0"
reportlab = "^3.5.67"
ConfigArgParse = "^1.4.1"

[tool.poetry.group.dev.dependencies]
pre-commit = "^2.12.1"
doit = "^0.33.1"

[tool.poetry.group.test.dependencies]
pytest = "^6.2.4"
tox-poetry-installer = {extras = ["poetry"], version = "^0.10.3"}

[tool.poetry-dynamic-versioning]
enable = true

[build-system]
requires = ["poetry-core>=1.0.2", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
8 changes: 0 additions & 8 deletions requirements.in

This file was deleted.

10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

32 changes: 0 additions & 32 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist = py38
isolated_build = true

[testenv]
deps = pytest
pytest-flake8
locked_deps = pytest
commands = pytest