Skip to content

Commit

Permalink
Merge pull request #350 from fonttools/housekeeping
Browse files Browse the repository at this point in the history
Housekeeping
  • Loading branch information
madig authored Oct 20, 2024
2 parents 3a9644b + 2a3dc34 commit bbf9d05
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 224 deletions.
128 changes: 64 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,66 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Lint
run: |
pip install tox
tox -e lint
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Lint
run: |
pip install tox
tox -e lint
docs: # To see if they build.
docs: # To see if they build.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Lint
run: |
pip install tox
tox -e docs
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Lint
run: |
pip install tox
tox -e docs
test:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
python-version: ['3.8', '3.11']
python-version: ["3.8", "3.13"]
platform: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: pip install tox coverage
- name: Run Tox
run: tox -e py-cov
- name: Re-run Tox without cattrs
if: startsWith(matrix.platform, 'ubuntu-latest') && startsWith(matrix.python-version, '3.11')
run: |
tox -e py-nocattrs
- name: Re-run Tox without msgpack
if: startsWith(matrix.platform, 'ubuntu-latest') && startsWith(matrix.python-version, '3.10')
run: |
tox -e py-nomsgpack
- name: Produce coverage files
run: |
coverage combine
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: pip install tox coverage
- name: Run Tox
run: tox -e py-cov
- name: Re-run Tox without cattrs
if: startsWith(matrix.platform, 'ubuntu-latest') && startsWith(matrix.python-version, '3.13')
run: |
tox -e py-nocattrs
- name: Re-run Tox without msgpack
if: startsWith(matrix.platform, 'ubuntu-latest') && startsWith(matrix.python-version, '3.13')
run: |
tox -e py-nomsgpack
- name: Produce coverage files
run: |
coverage combine
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

deploy:
# only run if the commit is tagged...
Expand All @@ -84,19 +84,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine check dist/*
twine upload dist/*
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine check dist/*
twine upload dist/*
36 changes: 0 additions & 36 deletions mypy.ini

This file was deleted.

78 changes: 74 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,85 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
requires = ["setuptools>=61.2", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "ufoLib2"
description = "ufoLib2 is a UFO font processing library."
authors = [{ name = "Adrien Tétar", email = "[email protected]" }]
license = { text = "Apache 2.0" }
classifiers = [
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Topic :: Text Processing :: Fonts",
"License :: OSI Approved :: Apache Software License",
]
urls = { Homepage = "https://github.com/fonttools/ufoLib2" }
requires-python = ">=3.8"
dependencies = ["attrs >= 22.1.0", "fonttools[ufo] >= 4.0.0"]
dynamic = ["version"]

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.optional-dependencies]
lxml = ["lxml"]
converters = ["cattrs >= 22.2.0"]
json = ["cattrs >= 22.2.0", "orjson ; platform_python_implementation != 'PyPy'"]
msgpack = ["cattrs >= 22.2.0", "msgpack"]

[tool.setuptools]
package-dir = { "" = "src" }
license-files = ["LICENSE"]
include-package-data = false

# https://www.python.org/dev/peps/pep-0561
[tool.setuptools.package-data]
"*" = ["py.typed"]

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.setuptools_scm]
write_to = "src/ufoLib2/_version.py"

[tool.black]
target-version = ["py37"]
target-version = ["py38"]

[tool.isort]
multi_line_output = 3
profile = "black"
float_to_top = true
known_first_party = "ufoLib2"

[tool.setuptools_scm]
write_to = "src/ufoLib2/_version.py"
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests", "ufoLib2"]
addopts = "-ra --doctest-modules --doctest-ignore-import-errors --pyargs"
doctest_optionflags = ["ALLOW_UNICODE", "ELLIPSIS"]
filterwarnings = [
"ignore::DeprecationWarning:fs",
"ignore::DeprecationWarning:pkg_resources",
]

[tool.mypy]
python_version = "3.8"
disallow_incomplete_defs = true
no_implicit_optional = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
strict_equality = true

[[tool.mypy.overrides]]
module = "ufoLib2.*"
disallow_untyped_defs = true

[[tool.mypy.overrides]]
module = ["fontTools.*", "ufoLib2._version"]
ignore_missing_imports = true
48 changes: 28 additions & 20 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,52 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements-dev.txt requirements-dev.in
#
black==23.11.0
# This file was autogenerated by uv via the following command:
# uv pip compile --python 3.8 requirements-dev.in
black==24.8.0
# via -r requirements-dev.in
click==8.1.7
# via black
coverage==7.3.2
coverage==7.6.1
# via -r requirements-dev.in
flake8==6.1.0
exceptiongroup==1.2.2
# via
# -c requirements.txt
# pytest
flake8==7.1.1
# via -r requirements-dev.in
iniconfig==2.0.0
# via pytest
isort==5.12.0
isort==5.13.2
# via -r requirements-dev.in
mccabe==0.7.0
# via flake8
mypy==1.7.1
mypy==1.12.1
# via -r requirements-dev.in
mypy-extensions==1.0.0
# via
# black
# mypy
packaging==23.2
packaging==24.1
# via
# black
# pytest
pathspec==0.11.2
pathspec==0.12.1
# via black
platformdirs==4.0.0
platformdirs==4.3.6
# via black
pluggy==1.3.0
pluggy==1.5.0
# via pytest
pycodestyle==2.11.1
pycodestyle==2.12.1
# via flake8
pyflakes==3.1.0
pyflakes==3.2.0
# via flake8
pytest==7.4.3
pytest==8.3.3
# via -r requirements-dev.in
typing-extensions==4.8.0
# via mypy
tomli==2.0.2
# via
# black
# mypy
# pytest
typing-extensions==4.12.2
# via
# -c requirements.txt
# black
# mypy
Loading

0 comments on commit bbf9d05

Please sign in to comment.