Skip to content

Commit 071f3e3

Browse files
committed
Switches to pyproject.toml and GitHub Actions
1 parent 213beaa commit 071f3e3

14 files changed

+188
-219
lines changed

.bumpversion.cfg

-19
This file was deleted.

.coveragerc

-9
This file was deleted.

.github/workflows/python-pr.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: tests (pull_request)
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install tox tox-gh-actions
25+
26+
- name: Test with tox
27+
run: tox

.github/workflows/python-tox.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install tox tox-gh-actions
25+
26+
- name: Test with tox
27+
run: tox

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __pycache__/
88
# Distribution / packaging
99
.Python
1010
env/
11+
venv/
1112
build/
1213
develop-eggs/
1314
dist/

.pre-commit-config.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
exclude: '^(.bumpversion.cfg)$'
7+
- id: mixed-line-ending
8+
- id: check-merge-conflict
9+
- id: check-ast
10+
- id: debug-statements
11+
- repo: https://github.com/seantis/pre-commit-hooks
12+
rev: v1.0.1
13+
hooks:
14+
- id: nocheckin
15+
exclude: .pre-commit-config.yaml
16+
- repo: https://github.com/PyCQA/flake8
17+
rev: 6.0.0
18+
hooks:
19+
- id: flake8
20+
files: '^(honyaku/.*|tests/.*)\.py$'
21+
arguments: --ignore=E712

.travis.yml

-54
This file was deleted.

README.md

-59
This file was deleted.

honyaku/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.0.0'

pyproject.toml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.pytest.ini_options]
6+
addopts = "-ra -q"
7+
testpaths = ["tests"]
8+
norecursedirs = [
9+
"*.egg",
10+
".git",
11+
".*",
12+
"_*"
13+
]
14+
15+
[tool.coverage.run]
16+
branch = true
17+
18+
[tool.coverage.report]
19+
omit = [
20+
"extras/*",
21+
"buildout-cache/eggs/*",
22+
"parts/*",
23+
"eggs/*",
24+
"*/test*",
25+
"*/test-views/*",
26+
"*/distutils/__init__.py"
27+
]
28+
29+
[tool.tox]
30+
legacy_tox_ini = """
31+
[tox]
32+
envlist = py37,py38,py39,py310,py311,flake8,report
33+
34+
[gh-actions]
35+
python =
36+
3.7: py37
37+
3.8: py38
38+
3.9: py39
39+
3.10: py310,flake8
40+
3.11: py311
41+
42+
[testenv]
43+
passenv = LANG
44+
setenv =
45+
py{37,38,39,310,311}: COVERAGE_FILE = .coverage.{envname}
46+
commands = pytest --cov --cov-report= {posargs:-vv}
47+
deps=
48+
-e{toxinidir}[test]
49+
50+
[testenv:flake8]
51+
skip_install = true
52+
deps = flake8
53+
commands = flake8 honyaku
54+
55+
[flake8]
56+
exclude = .venv,.git,.tox,dist,docs,*lib/python*,*egg,build
57+
58+
[testenv:report]
59+
deps = coverage
60+
skip_install = true
61+
commands =
62+
coverage combine
63+
coverage report
64+
65+
"""

setup.cfg

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[metadata]
2+
name = honyaku
3+
version = attr: honyaku.__version__
4+
description = Translate po-files using Gengo.com
5+
long_description = file: README.rst, HISTORY.rst
6+
url = http://github.com/seantis/honyaku
7+
author = Seantis GmbH
8+
author_email = [email protected]
9+
license = GPLv2
10+
classifiers =
11+
Intended Audience :: Developers
12+
Programming Language :: Python
13+
Programming Language :: Python :: 3
14+
Programming Language :: Python :: 3.7
15+
Programming Language :: Python :: 3.8
16+
Programming Language :: Python :: 3.9
17+
Programming Language :: Python :: 3.10
18+
Programming Language :: Python :: 3.11
19+
Topic :: Software Development :: Libraries :: Python Modules
20+
License :: OSI Approved :: GNU General Public License v2 (GPLv2)
21+
22+
[options]
23+
include_package_data = True
24+
zip_safe = False
25+
packages =
26+
honyaku
27+
python_requires = >=3.7
28+
install_requires =
29+
click
30+
gengo
31+
polib
32+
33+
[options.extras_require]
34+
test =
35+
coverage
36+
pre-commit
37+
pytest
38+
pytest-cov
39+
tox
40+
41+
[options.entry_points]
42+
console_scripts =
43+
honyaku=honyaku.cli:cli
44+
45+
[bdist_wheel]
46+
universal=1

0 commit comments

Comments
 (0)