diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 1f83fff..cc9e078 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -30,7 +30,7 @@ jobs: experimental: true - name: Install optional - run: poetry install + run: poetry install --all-extras - name: Run Formatter run: mise run format diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 18010c1..e8646c5 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -30,7 +30,7 @@ jobs: experimental: true - name: Install optional - run: poetry install + run: poetry install --all-extras - name: Run Linter run: mise run lint diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4cd9931..fda5221 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,7 +30,7 @@ jobs: experimental: true - name: Install optional - run: poetry install + run: poetry install --all-extras - name: Run Unit Tests run: mise run test diff --git a/.github/workflows/typecheck.yaml b/.github/workflows/typecheck.yaml index 7c4b561..902af5c 100644 --- a/.github/workflows/typecheck.yaml +++ b/.github/workflows/typecheck.yaml @@ -30,7 +30,7 @@ jobs: experimental: true - name: Install optional - run: poetry install + run: poetry install --all-extras - name: Run Type Checker run: mise run typecheck diff --git a/README.md b/README.md index b667c00..ae75938 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ First, install `poetry` using the instructions located [here](https://python-poe Then, install the requirements using: ```bash -poetry install +poetry install --all-extras ``` You can run the tests (with coverage) using: diff --git a/poetry.lock b/poetry.lock index 4c84849..1fd5d0b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,11 +1,13 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. [[package]] name = "certifi" version = "2024.8.30" description = "Python package for providing Mozilla's CA Bundle." -optional = false +optional = true python-versions = ">=3.6" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, @@ -15,8 +17,10 @@ files = [ name = "charset-normalizer" version = "3.4.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false +optional = true python-versions = ">=3.7.0" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, @@ -129,8 +133,10 @@ files = [ name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -optional = false +optional = true python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main"] +markers = "extra == \"test\" and sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -140,8 +146,10 @@ files = [ name = "coverage" version = "6.5.0" description = "Code coverage measurement for Python" -optional = false +optional = true python-versions = ">=3.7" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"}, {file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"}, @@ -205,8 +213,10 @@ toml = ["tomli"] name = "coveralls" version = "3.3.1" description = "Show coverage stats online via coveralls.io" -optional = false +optional = true python-versions = ">= 3.5" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "coveralls-3.3.1-py2.py3-none-any.whl", hash = "sha256:f42015f31d386b351d4226389b387ae173207058832fbf5c8ec4b40e27b16026"}, {file = "coveralls-3.3.1.tar.gz", hash = "sha256:b32a8bb5d2df585207c119d6c01567b81fba690c9c10a753bfe27a335bfc43ea"}, @@ -224,8 +234,10 @@ yaml = ["PyYAML (>=3.10)"] name = "docopt" version = "0.6.2" description = "Pythonic argument parser, that will make you smile" -optional = false +optional = true python-versions = "*" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"}, ] @@ -234,8 +246,10 @@ files = [ name = "exceptiongroup" version = "1.2.2" description = "Backport of PEP 654 (exception groups)" -optional = false +optional = true python-versions = ">=3.7" +groups = ["main"] +markers = "extra == \"test\" and python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -248,8 +262,10 @@ test = ["pytest (>=6)"] name = "idna" version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" -optional = false +optional = true python-versions = ">=3.6" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -262,8 +278,10 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -optional = false +optional = true python-versions = ">=3.7" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -273,8 +291,10 @@ files = [ name = "mypy" version = "1.14.1" description = "Optional static typing for Python" -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"dev\"" files = [ {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, @@ -332,8 +352,10 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -optional = false +optional = true python-versions = ">=3.5" +groups = ["main"] +markers = "extra == \"dev\"" files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -343,8 +365,10 @@ files = [ name = "packaging" version = "24.2" description = "Core utilities for Python packages" -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -354,8 +378,10 @@ files = [ name = "pluggy" version = "1.5.0" description = "plugin and hook calling mechanisms for python" -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -369,8 +395,10 @@ testing = ["pytest", "pytest-benchmark"] name = "pytest" version = "8.3.4" description = "pytest: simple powerful testing with Python" -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, @@ -391,8 +419,10 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments name = "pytest-cov" version = "5.0.0" description = "Pytest plugin for measuring coverage." -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, @@ -409,8 +439,10 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] name = "requests" version = "2.32.3" description = "Python HTTP for Humans." -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -430,8 +462,10 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "ruff" version = "0.8.6" description = "An extremely fast Python linter and code formatter, written in Rust." -optional = false +optional = true python-versions = ">=3.7" +groups = ["main"] +markers = "extra == \"dev\"" files = [ {file = "ruff-0.8.6-py3-none-linux_armv6l.whl", hash = "sha256:defed167955d42c68b407e8f2e6f56ba52520e790aba4ca707a9c88619e580e3"}, {file = "ruff-0.8.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:54799ca3d67ae5e0b7a7ac234baa657a9c1784b48ec954a094da7c206e0365b1"}, @@ -457,8 +491,10 @@ files = [ name = "tomli" version = "2.1.0" description = "A lil' TOML parser" -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"dev\" and python_version < \"3.11\" or extra == \"test\" and python_full_version <= \"3.11.0a6\"" files = [ {file = "tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391"}, {file = "tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8"}, @@ -468,8 +504,10 @@ files = [ name = "typing-extensions" version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"dev\"" files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -479,8 +517,10 @@ files = [ name = "urllib3" version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false +optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"test\"" files = [ {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, @@ -492,7 +532,11 @@ h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] +[extras] +dev = ["mypy", "ruff"] +test = ["coverage", "coveralls", "pytest", "pytest-cov"] + [metadata] -lock-version = "2.0" -python-versions = "^3.10" -content-hash = "dd5fdd48e5e8c454fce4b57df39ee6e29b172ccf4ed4fc8b12ec35d45f5d17e0" +lock-version = "2.1" +python-versions = ">= 3.10" +content-hash = "7aa55df5bbe61286788fc085efb8bd11bbe078c7bbdcd2d6659cbaabee2b407e" diff --git a/pyproject.toml b/pyproject.toml index f5b7b07..e88a08d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,39 +1,27 @@ -[tool.poetry] +[project] name = "optional.py" version = "2.0.0" description = "An implementation of the Optional object in Python" - license = "MIT" - authors = [ - "Chad Befus ", - "Derek Passen " + {name = "Chad Befus", email = "crbefus@gmail.com"}, + {name = "Derek Passen", email = "dpassen1@gmail.com"} ] - readme = "README.md" - repository = "https://github.com/Python-Optional/optional.py" homepage = "https://github.com/Python-Optional/optional.py" +keywords = ["optional datatype library"] +requires-python = ">= 3.10" + +[project.optional-dependencies] +dev = ["ruff", "mypy"] +test = ["pytest", "pytest-cov", "coveralls", "coverage"] +[tool.poetry] packages = [ { include = "optional" }, ] -keywords = ["optional datatype library"] - -[tool.poetry.dependencies] -python = "^3.10" - -[tool.poetry.group.dev.dependencies] -ruff = "^0.8.0" -mypy = "^1.6.0" - -[tool.poetry.group.test.dependencies] -pytest = ">=7.2,<9.0" -pytest-cov = ">=4,<6" -coveralls = "^3.3" -coverage = "^6.5" - [tool.coverage.report] exclude_lines = ["@overload"] @@ -50,5 +38,5 @@ line-length = 88 select = ["E", "F", "I"] [build-system] -requires = ["poetry-core"] +requires = ["poetry-core>=2.0"] build-backend = "poetry.core.masonry.api"