diff options
| author | Bobby <[email protected]> | 2026-06-30 16:34:20 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-06-30 16:34:20 +0530 |
| commit | bd3b12ff2f30c251c5fc52b43f81ec2f282d53ab (patch) | |
| tree | ce6e3f57da4c7d9af29c39df4dea78e54523cf3d /setup.py | |
| parent | 21ec7908c94839fff63b5275871cf84e92787a08 (diff) | |
| parent | 6774eab5f8a1bbda930efd38d41d793557057aed (diff) | |
| download | edify-bd3b12ff2f30c251c5fc52b43f81ec2f282d53ab.tar.xz edify-bd3b12ff2f30c251c5fc52b43f81ec2f282d53ab.zip | |
chore!: package reorg + uv/ruff/pytest/hatchling toolchain + Python 3.11 floor (#255)
## Summary
Closes #68 — package reorganization to a single-purpose, dir-per-concern
layout (no `src/`).
Closes #69 — toolchain migration to `uv` + `ruff` + `pytest` +
`hatchling` + `hatch-vcs`, driven entirely from `pyproject.toml`.
Closes #253.
Closes #259 — drop `.editorconfig`; LF / trim / final-newline / Python
indent now enforced by `mixed-line-ending` (added in fixup) + existing
pre-commit hooks + `ruff format`.— Python floor bump to 3.11; drops
`py39` / `py310` / `pypy310` from the CI matrix.
The three issues are paired by construction (dropping `src/` requires
the new build backend's package discovery, and the 3.11 floor lets the
new layout use `typing.Self`, frozen dataclasses, `match`/`case`, and
Python-3.11 idioms throughout).
## Highlights
**Layout** — `edify/builder/` (RegexBuilder + 11 mixin files + `types/`
for state/flags/frame/protocol), `edify/elements/types/` (sealed
dataclass union: 16 leaves, 7 char-shaped, 4 captures, 7 groups, 9
quantifiers, RootElement), `edify/compile/` (per-family render functions
+ dispatch, plus `quantifier/` subpackage for suffix + apply),
`edify/validate/`, `edify/errors/` (typed exception hierarchy),
`edify/library/` (per-validator files in family folders: `email/`,
`ip/`, `date/`, plus flat single-validator files), `pattern/`,
`serialize/`, `result/` skeletons.
**Toolchain** — replaces `tox` / `virtualenv` / `flake8` / `isort` /
`black` / `setup.py` / `setup.cfg` / `pytest.ini` / `.coveragerc` /
`.bumpversion.cfg` / `MANIFEST.in` / `ci/` / `tests.local.sh` with
`pyproject.toml`-driven `uv` + `ruff` + `pytest` + `hatchling` +
`hatch-vcs`. CI workflow rewritten to `uv sync --frozen` + `uv run
pytest`; required-status-check names preserved (`check`, `docs`, `py311
(ubuntu)`, `py312 (ubuntu)`, `py313 (ubuntu)`, `py314 (ubuntu)`,
`pypy311 (ubuntu)`). Pre-commit replaced with `ruff` hooks, all hook
repos pinned by commit SHA.
**Tests** — reorganised under `tests/builder/` and
`tests/library/<family>/` using the `*.test.py` naming shape. 173 tests,
100% line coverage, ruff lint + format clean, `uv build` produces sdist
+ wheel cleanly.
## Behaviour changes versus 0.3
These will get their own upgrade-guide entries when the migration
tooling lands (#80):
- `to_regex_string()` now returns the bare pattern (no `/.../` wrap).
- `to_regex()` on a named back-reference compiles successfully via
`(?P=name)` instead of raising.
- Builder errors raise typed `EdifyError` subclasses
(`MustBeAStringError`, `StartInputAlreadyDefinedError`, etc.) instead of
bare `Exception` — catch via `except EdifyError`.
- Internal helpers (`apply_quantifier`, `frame_creating_element`,
`evaluate`, `state`, etc.) removed outright per the 0.3 → 1.0 stub-free
policy.
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/setup.py b/setup.py deleted file mode 100755 index 9547444..0000000 --- a/setup.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python -# -*- encoding: utf-8 -*- - -import io -import re -from glob import glob -from os.path import basename -from os.path import dirname -from os.path import join -from os.path import splitext - -from setuptools import find_namespace_packages -from setuptools import setup - - -def read(*names, **kwargs): - with io.open(join(dirname(__file__), *names), encoding=kwargs.get('encoding', 'utf8')) as fh: - return fh.read() - - -setup( - name='edify', - version='0.3.0', - license='Apache-2.0', - description='Regular Expressions Made Simple', - long_description='{}\n{}'.format( - re.compile('^.. start-badges.*^.. end-badges', re.M | re.S).sub('', read('README.rst')), - re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst')), - ), - author='Bobby', - author_email='[email protected]', - url='https://github.com/luciferreeves/edify', - packages=find_namespace_packages('src'), - package_dir={'': 'src'}, - py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')], - include_package_data=True, - zip_safe=False, - classifiers=[ - # complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: Unix', - 'Operating System :: POSIX', - 'Operating System :: Microsoft :: Windows', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Programming Language :: Python :: 3.14', - 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', - # uncomment if you test on these interpreters: - # 'Programming Language :: Python :: Implementation :: IronPython', - # 'Programming Language :: Python :: Implementation :: Jython', - # 'Programming Language :: Python :: Implementation :: Stackless', - 'Topic :: Utilities', - ], - project_urls={ - 'Documentation': 'https://edify.readthedocs.io/', - 'Changelog': 'https://edify.readthedocs.io/en/latest/changelog.html', - 'Issue Tracker': 'https://github.com/luciferreeves/edify/issues', - }, - keywords=[ - # eg: 'keyword1', 'keyword2', 'keyword3', - ], - python_requires='>=3.9', - install_requires=[ - # eg: 'aspectlib==1.1.1', 'six>=1.7', - ], - extras_require={ - # eg: - # 'rst': ['docutils>=0.11'], - # ':python_version=="2.6"': ['argparse'], - }, -) |
