-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Various dev chores - Migrate to GHA - Migrate to Ruff - Migrate to pyproject.toml - Publish types; add mypy * Update badges * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Lint fixes * Fix for py38 * ignores --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f646dce
commit 2438bc0
Showing
17 changed files
with
151 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
open_collective: "marshmallow" | ||
tidelift: "pypi/marshmallow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: ["main", "*.x-line"] | ||
tags: ["*"] | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { name: "3.8", python: "3.8", tox: py38 } | ||
- { name: "3.12", python: "3.12", tox: py312 } | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
allow-prereleases: true | ||
- run: python -m pip install --upgrade pip | ||
- run: python -m pip install tox | ||
- run: python -m tox -e ${{ matrix.tox }} | ||
# this duplicates pre-commit.ci, so only run it on tags | ||
# it guarantees that linting is passing prior to a release | ||
lint-pre-release: | ||
name: lint | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
- run: python -m pip install --upgrade pip | ||
- run: python -m pip install tox | ||
- run: python -m tox -e lint | ||
release: | ||
needs: [tests, lint-pre-release] | ||
name: PyPI release | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
- name: install requirements | ||
run: python -m pip install build twine | ||
- name: build dists | ||
run: python -m build | ||
- name: check package metadata | ||
run: twine check dist/* | ||
- name: publish | ||
run: twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ nosetests.xml | |
coverage.xml | ||
*,cover | ||
.pytest_cache/ | ||
.mypy_cache | ||
.ruff_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.11.0 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.13 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py36-plus] | ||
- repo: https://github.com/python/black | ||
rev: 20.8b1 | ||
- id: ruff | ||
- id: ruff-format | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.27.3 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-bugbear==21.4.3] | ||
- id: check-github-workflows | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.10.0 | ||
rev: 1.16.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==20.8b1] | ||
additional_dependencies: [black==23.12.1] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: ["marshmallow>=3,<4"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[project] | ||
name = "marshmallow-oneofschema" | ||
version = "3.0.2" | ||
description = "marshmallow multiplexing schema" | ||
readme = "README.rst" | ||
license = { file = "LICENSE" } | ||
authors = [{ name = "Maxim Kulkin", email = "[email protected]" }] | ||
maintainers = [{ name = "Steven Loria", email = "[email protected]" }] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"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", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = ["marshmallow>=3.0.0,<4.0.0"] | ||
|
||
[project.urls] | ||
Issues = "https://github.com/marshmallow-code/marshmallow-oneofschema/issues" | ||
Funding = "https://opencollective.com/marshmallow" | ||
Source = "https://github.com/marshmallow-code/marshmallow-oneofschema" | ||
|
||
[project.optional-dependencies] | ||
tests = ["pytest"] | ||
dev = ["marshmallow-oneofschema[tests]", "tox", "pre-commit~=3.5"] | ||
|
||
[build-system] | ||
requires = ["flit_core<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[tool.flit.sdist] | ||
include = ["tests/", "CHANGELOG.rst", "SECURITY.md", "tox.ini"] | ||
|
||
[tool.ruff] | ||
src = ["src"] | ||
fix = true | ||
show-fixes = true | ||
show-source = true | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"E", # pycodestyle error | ||
"F", # pyflakes | ||
"I", # isort | ||
"UP", # pyupgrade | ||
"W", # pycodestyle warning | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters