-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from python-odin/development
Release 2.8
- Loading branch information
Showing
88 changed files
with
1,174 additions
and
897 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
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,44 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_language_version: | ||
python: python3.10 | ||
repos: | ||
#- repo: https://github.com/pre-commit/pre-commit-hooks | ||
# rev: v4.4.0 | ||
# hooks: | ||
# - id: check-added-large-files | ||
# - id: check-toml | ||
# - id: check-yaml | ||
# args: | ||
# - --unsafe | ||
# - id: end-of-file-fixer | ||
# - id: trailing-whitespace | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py38-plus | ||
- --keep-runtime-typing | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.270 | ||
hooks: | ||
- id: ruff | ||
args: | ||
- --fix | ||
- --exit-non-zero-on-fix | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- id: isort | ||
name: isort (cython) | ||
types: [cython] | ||
- id: isort | ||
name: isort (pyi) | ||
types: [pyi] | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Odin documentation build configuration file, created by | ||
# sphinx-quickstart on Tue Aug 20 18:57:24 2013. | ||
|
@@ -11,8 +10,8 @@ | |
# All configuration values have a default; values that are commented out | ||
# serve to show the default. | ||
|
||
import sys | ||
import os | ||
import sys | ||
|
||
HERE = os.path.dirname(__file__) | ||
|
||
|
@@ -53,8 +52,8 @@ | |
master_doc = "contents" | ||
|
||
# General information about the project. | ||
project = u"Odin" | ||
copyright = u"2023, Tim Savage" | ||
project = "Odin" | ||
copyright = "2023, Tim Savage" | ||
author = "Tim Savage <[email protected]>" | ||
|
||
# The version info for the project you're documenting, acts as replacement for | ||
|
@@ -205,8 +204,8 @@ | |
( | ||
"index", | ||
"Odin.tex", | ||
u"Odin Documentation", | ||
u"Tim Savage \\textless{}[email protected]\\textgreater{}", | ||
"Odin Documentation", | ||
"Tim Savage \\textless{}[email protected]\\textgreater{}", | ||
"manual", | ||
), | ||
] | ||
|
@@ -236,7 +235,7 @@ | |
|
||
# One entry per manual page. List of tuples | ||
# (source start file, name, description, authors, manual section). | ||
man_pages = [("index", "odin", u"Odin Documentation", [author], 1)] | ||
man_pages = [("index", "odin", "Odin Documentation", [author], 1)] | ||
|
||
# If true, show URL addresses after external links. | ||
# man_show_urls = False | ||
|
@@ -251,7 +250,7 @@ | |
( | ||
"index", | ||
"Odin", | ||
u"Odin Documentation", | ||
"Odin Documentation", | ||
author, | ||
"Odin", | ||
"One line description of project.", | ||
|
Large diffs are not rendered by default.
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "odin" | ||
version = "2.6" | ||
version = "2.8" | ||
description = "Data-structure definition/validation/traversal, mapping and serialisation toolkit for Python" | ||
authors = ["Tim Savage <[email protected]>"] | ||
license = "BSD-3-Clause" | ||
|
@@ -53,4 +53,32 @@ msgpack = ["msgpack"] | |
toml = ["toml"] | ||
pint = ["pint"] | ||
arrow = ["arrow"] | ||
rich = ["rich"] | ||
rich = ["rich"] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.ruff] | ||
select = [ | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings | ||
"F", # pyflakes | ||
# "I", # isort | ||
"C", # flake8-comprehensions | ||
"B", # flake8-bugbear | ||
] | ||
ignore = [ | ||
"E501", # line too long, handled by black | ||
"B008", # do not perform function calls in argument defaults | ||
"C901", # too complex | ||
] | ||
|
||
# Assume Python 3.8. | ||
target-version = "py38" | ||
|
||
[tool.ruff.per-file-ignores] | ||
"tests/test_adapters.py" = ["F403", "F405"] | ||
"tests/test_codec*.py" = ["F403", "F405"] | ||
"tests/test_fields.py" = ["F403", "F405"] | ||
"tests/test_kitchensink.py" = ["F403", "F405"] | ||
"tests/test_mapping.py" = ["F403", "F405"] |
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 |
---|---|---|
|
@@ -4,16 +4,16 @@ | |
logging.getLogger("odin.registration").addHandler(logging.NullHandler()) | ||
|
||
from odin import exceptions # noqa | ||
from odin.adapters import ResourceAdapter # noqa | ||
from odin.annotated_resource import * # noqa | ||
from odin.annotated_resource import type_aliases as types # noqa | ||
from odin.fields import * # noqa | ||
from odin.fields.composite import * # noqa | ||
from odin.fields.virtual import * # noqa | ||
from odin.helpers import * # noqa | ||
from odin.mapping import * # noqa | ||
from odin.resources import Resource # noqa | ||
from odin.adapters import ResourceAdapter # noqa | ||
from odin.proxy import ResourceProxy # noqa | ||
from odin.annotated_resource import * # noqa | ||
from odin.annotated_resource import type_aliases as types # noqa | ||
from odin.helpers import * # noqa | ||
from odin.resources import Resource # noqa | ||
|
||
__authors__ = "Tim Savage <[email protected]>" | ||
__copyright__ = "Copyright (C) 2021 Tim Savage" |
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 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 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
Oops, something went wrong.