diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2c71ffc..e151f00 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,8 +6,12 @@ version: 2 sphinx: configuration: docs/conf.py +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # Explicitly set the version of Python and its requirements python: - version: 3.8 install: - requirements: docs/requirements.txt diff --git a/README.md b/README.md index 9749774..65dc975 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,15 @@ True CURP Suite te permite extraer toda la información que contiene una CURP de forma conveniente. Además, toda la validación es automática. CURP Suite está diseñado para dar soporte a toda la especificación oficial de la CURP. +También puede ser invocada desde la terminal + +```bash +$ curp SABC560626MDFLRN01 +{"curp": "SABC560626MDFLRN01", "sexo": 2, "fecha_nacimiento": "1956-06-26", "entidad_nacimiento": {"name": "Ciudad de México", "iso": "MX-CMX"}} +``` + + + ## Instalación diff --git a/curp/__about__.py b/curp/__about__.py index 790ad84..a695b7e 100644 --- a/curp/__about__.py +++ b/curp/__about__.py @@ -33,7 +33,7 @@ __summary__ = "Análisis y validación de la CURP Mexicana" __uri__ = "https://github.com/jacobszpz/CURPSuite" -__version__ = "2.6.0" +__version__ = "2.6.1" __author__ = "Jacob Sánchez" __email__ = "jacobszpz@protonmail.com" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..483d2b2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,59 @@ +[build-system] +requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "CURPSuite" +description = "Análisis y validación de la CURP Mexicana" +dynamic = ["version", "readme"] +authors = [ + { name="Jacob Sánchez", email="jacobszpz@protonmail.com" }, +] +requires-python = ">=3.8" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Legal Industry", + "Intended Audience :: Science/Research", + "Natural Language :: Spanish" +] +dependencies = [ + "unidecode" +] +keywords = ["CURP", "validation", "analysis", "Mexico"] + +[project.scripts] +curp = "curp.cli:main" + +[project.urls] +"Homepage" = "https://curpsuite.readthedocs.io" +"Repository" = "https://github.com/jacobszpz/CURPSuite" + +[tool.setuptools.dynamic] +version = {attr = "curp.__about__.__version__"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[project.optional-dependencies] +test = ["pytest", "hypothesis", "coverage"] + +[tool.coverage.run] +branch = true + +[tool.coverage.report] +omit = [ + "*/python?.?/*", + "*/lib-python/?.?/*.py", + "*/pypy/*" +] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "raise AssertionError", + "raise NotImplementedError", + "if __name__ == .__main__.:" +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 07eb76e..0000000 --- a/setup.cfg +++ /dev/null @@ -1,65 +0,0 @@ -[metadata] -long_description = file: README.md -long_description_content_type = text/markdown -keywords = CURP, validation, analysis, Mexico -license_file = LICENSE -project_urls = - Documentation = https://curpsuite.readthedocs.io -classifiers = - Development Status :: 5 - Production/Stable - License :: OSI Approved :: GNU General Public License v2 (GPLv2) - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Intended Audience :: Developers - Intended Audience :: Information Technology - Intended Audience :: Legal Industry - Intended Audience :: Science/Research - Natural Language :: Spanish - -[options] -python_requires = >=3.8 -packages = find: -install_requires = - unidecode - -[options.entry_points] -console_scripts = - curp = curp.cli:main - -[options.packages.find] -exclude = - tests* - -[options.package_data] -curp = py.typed - -[tox:tox] -envlist = py39, py38, py310 - -[testenv] -deps = - unidecode - hypothesis - -commands = - python -m unittest discover - -[flake8] -max-line-length = 99 - -[coverage:run] -branch = True - -[coverage:report] -exclude_lines = - pragma: no cover - def __repr__ - raise AssertionError - raise NotImplementedError - if __name__ == .__main__.: - -omit = - */python?.?/* - */lib-python/?.?/*.py - */pypy/* diff --git a/setup.py b/setup.py deleted file mode 100644 index 2756244..0000000 --- a/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -from setuptools import setup -from curp.__about__ import (__title__, __version__, __summary__, __uri__, __author__, __email__, __license__) - -setup( - name=__title__, - version=__version__, - description=__summary__, - url=__uri__, - author=__author__, - author_email=__email__, - license=__license__)