Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,toml,yml,yaml}]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ Contributions are welcome! Please see our [contributing guidelines](CONTRIBUTING

## License

MIT License - see [LICENSE](LICENSE) file for details.
Apache License 2.0 - see [LICENSE](LICENSE) file for details.
4 changes: 2 additions & 2 deletions embody/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class TemplateWrapper:

Examples:
>>> template = TemplateWrapper({'name': '${user}', 'age': '${years}'})
>>> template.get_dependencies()
{'user', 'years'}
>>> sorted(template.get_dependencies())
['user', 'years']
"""

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion embody/naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def mk_pattern_from_template_and_format_dict(template, format_dict=None, sep=pat
... assert p == re.compile('(?P<here>[^/]+)/and/(?P<there>[^/]+)')
>>> p = mk_pattern_from_template_and_format_dict('{here}/and/{there}', {'there': r'\d+'})
>>> if os.name == 'nt': # for windows
... assert p == re.compile(r'(?P<here>[^\\\\]+)/and/(?P<there>\d+)')
... assert p == re.compile(r'(?P<here>[^\\]+)/and/(?P<there>\d+)')
... else:
... assert p == re.compile(r'(?P<here>[^/]+)/and/(?P<there>\d+)')
>>> type(p)
Expand Down
41 changes: 36 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,38 @@ version = "0.1.9"
description = "Generate templated objects"
readme = "README.md"
requires-python = ">=3.10"
keywords = []
license = "Apache-2.0"
license-files = ["LICENSE"]
keywords = [
"templating",
"template",
"object-generation",
"nested-data",
"json-pointer",
"path-addressing",
"mapping",
"configuration",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Code Generators",
]
authors = [{ name = "Thor Whalen" }]
dependencies = ["dol"]

[project.license]
text = "Apache-2.0"

[project.urls]
Homepage = "https://github.com/i2mint/embody"
Documentation = "https://i2mint.github.io/embody/"
Repository = "https://github.com/i2mint/embody"
Issues = "https://github.com/i2mint/embody/issues"

[project.optional-dependencies]
dev = ["pytest>=7.0", "pytest-cov>=4.0", "ruff>=0.1.0"]
Expand Down Expand Up @@ -48,7 +71,15 @@ convention = "google"
"**/examples/*" = ["D"]
"**/scrap/*" = ["D"]

[tool.wads.ci.testing]
# `scrap/` is throwaway code (already excluded from ruff); wads' default
# exclude of "scrap" only matches a top-level dir, so name the real path.
exclude_paths = ["examples", "embody/scrap"]

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
# CI runs `pytest --doctest-modules` with no path argument, so collection is
# driven entirely by testpaths. The package dir must be listed here or none of
# its doctests ever run.
testpaths = ["tests", "embody"]
doctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS"]
Loading