From 39f16caea1a92c9fb3e7d9c55cdcc20a058174ee Mon Sep 17 00:00:00 2001 From: natsuoto <279971144+natsuoto@users.noreply.github.com> Date: Fri, 26 Jun 2026 19:23:09 +0530 Subject: chore!: package reorg, toolchain migration to uv+ruff+pytest+hatchling, Python 3.11 floor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drops the `src/` layout. The package lives at `edify/` at repo root, split into single-purpose subpackages: `builder/` (mixins composing RegexBuilder), `elements/` (sealed dataclass AST), `compile/` (per-family render functions plus dispatch), `validate/`, `errors/` (typed exception hierarchy), and `library/` (per-validator files in family folders). Pattern, serialize, and result subpackages ship as skeletons. Replaces tox / virtualenv / flake8+isort+black / setup.py+setup.cfg / pytest.ini / .coveragerc / .bumpversion.cfg / MANIFEST.in / ci/ / tests.local.sh with a unified uv + ruff + pytest + hatchling + hatch-vcs stack driven entirely from pyproject.toml. CI workflow rewritten to `uv sync --frozen` + `uv run pytest` per matrix entry; required-status- check names preserved for `check`, `docs`, `py3X (ubuntu)`, and `pypy311 (ubuntu)`. `py39` / `py310` / `pypy310` dropped (3.11 floor). Pre-commit replaced with ruff hooks (lint + format), all hook repos SHA-pinned to commit SHAs. Tests reorganised under `tests/builder/` and `tests/library//` with the `*.test.py` naming shape. 173 tests pass, 100% line coverage. Behaviour changes versus 0.3 (each will get a documented upgrade-guide entry once #80 lands): - `to_regex_string()` returns the bare pattern (no `/.../` wrap) - `to_regex()` on `named_back_reference` compiles successfully via `(?P=name)` instead of raising - builder errors raise typed `EdifyError` subclasses 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 Closes #68 Closes #69 Closes #253 Co-Authored-By: Claude Opus 4.7 --- setup.py | 80 ---------------------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100755 setup.py (limited to 'setup.py') 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='bobbyskhs@gmail.com', - 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'], - }, -) -- cgit v1.2.3