Consolidate configuration into pyproject.toml - #1188
Conversation
Co-authored-by: bact <128572+bact@users.noreply.github.com>
Co-authored-by: bact <128572+bact@users.noreply.github.com>
Co-authored-by: bact <128572+bact@users.noreply.github.com>
Co-authored-by: bact <128572+bact@users.noreply.github.com>
|
@copilot The use of "License :: OSI Approved :: Apache Software License" in |
- Change license from dict format to string format using SPDX identifier - Remove deprecated "License :: OSI Approved :: Apache Software License" classifier - Update build-system to require setuptools>=69.0.0 for new license format support Co-authored-by: bact <128572+bact@users.noreply.github.com>
Fixed in cd957b5. Updated to use the modern SPDX license identifier format ( |
|
@copilot verify |
The codebase uses PEP 585 type hints (dict[...], list[...]) which require Python 3.9+. Updated requires-python from >=3.7 to >=3.9 and removed backports.zoneinfo dependency since it's no longer needed. Also updated README files to reflect the correct minimum version. Co-authored-by: bact <128572+bact@users.noreply.github.com>
Verified and fixed in ee27142. The codebase uses PEP 585 type hints ( |
license-files, authors, keywords, supported Python versions, etc
PyO3 does not support Python 3.14 yet
|
@copilot changes from dev branch are merged, please recheck all the changes proposed in this PR again to confirm that they are still valid. |
Rechecked all changes after dev branch merge - everything is still valid and functional: ✅ Configuration consolidation: All old files removed (setup.py, setup.cfg, requirements.txt, docker_requirements.txt), everything consolidated in pyproject.toml The dev merge actually enhanced this PR by adding |
|
@copilot Update Dockerfile and CONTRIBUTING.md to reflects changes in this PR.
|
- Dockerfile: Replace docker_requirements.txt with pip install -e ".[testing]" - CONTRIBUTING.md: Add Building and Installing section explaining pyproject.toml-based workflow - CONTRIBUTING.md: Update bumpversion to bump-my-version with pyproject.toml config reference Co-authored-by: bact <128572+bact@users.noreply.github.com>
Updated in 518c278: Dockerfile changes:
CONTRIBUTING.md changes:
|
|



What does this changes
Consolidates all configuration files (
setup.py,setup.cfg,requirements.txt,docker_requirements.txt,tox.ini) into a singlepyproject.tomlfollowing PEP 517/518/621/639 standards. Updates all documentation and infrastructure files to reflect the new configuration structure.What was wrong
Configuration was fragmented across 5+ files with inconsistent dependency versions between extras groups. The project still used legacy
setup.py-based packaging with deprecated license format, incorrect Python version requirements, anddocker_requirements.txtwas misused in workflows instead of being defined as proper optional dependencies. Documentation and infrastructure files (Dockerfile, CONTRIBUTING.md) referenced obsolete configuration files and build processes.How this fixes it
Configuration Migration:
pyproject.toml[project.optional-dependencies]with 36 extras groupstestingextra with pinned versions (replacesdocker_requirements.txt)setup.cfgto[tool.bumpversion]Modern License Format (PEP 639):
license = "Apache-2.0")Correct Python Version Requirements:
requires-pythonfrom>=3.7to>=3.9backports.zoneinfodependency (not needed for Python 3.9+)dict[...],list[...]) which require Python 3.9+Dependency Consistency:
Standardized versions across feature extras:
transformers:>=4.22.1(was mixed>=4.6.0/>=4.22.1)attacut:>=1.0.6(was mixed>=1.0.4/>=1.0.6)numpy:>=1.22(consistent everywhere)bpemb:>=0.3.2(added version spec)wunsen:>=0.0.3(was>=0.0.1)Workflow Updates:
unittest.yml: now usespip install ".[testing]"pypi-test.yml: now usespip install pythainlp[testing,full]Makefileto usepython -m buildREADME.mdandREADME_TH.mdwith complete extras listInfrastructure and Documentation Updates:
Dockerfile: Updated to usepip install -e ".[testing]"instead of docker_requirements.txtCONTRIBUTING.md: Added "Building and Installing" section explaining pyproject.toml-based workflowCONTRIBUTING.md: Updated "Releasing" section to referencebump-my-versionand pyproject.toml configurationCompatibility with Dev Branch:
from __future__ import annotationsto 151 files, allowing modern type hint syntax while maintaining Python 3.9+ supportRemoved:
setup.py,setup.cfg,requirements.txt,docker_requirements.txtYour checklist for this pull request
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.