diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index af00b58..0000000 --- a/.coveragerc +++ /dev/null @@ -1,9 +0,0 @@ -[run] -branch = True -source = sage_imap - -[report] -omit = - tests/* - .tox/* - docs/* diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 848f4fb..0000000 --- a/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -max-line-length = 88 -extend-ignore = E203, W503 -exclude = docs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae517fa..e1dcdf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,8 @@ jobs: coverage run -m pytest - name: Generate coverage report run: coverage xml + - name: Run Tox tests + run: tox - name: Upload coverage to Codecov run: codecov env: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5856ddd..cd65a8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,17 +9,18 @@ repos: - id: check-merge-conflict - id: check-docstring-first + - repo: https://github.com/pre-commit/mirrors-isort + rev: v5.10.1 + hooks: + - id: isort + exclude: docs/ + - repo: https://github.com/psf/black rev: 23.3.0 hooks: - id: black exclude: docs/ - - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.10.1 - hooks: - - id: isort - exclude: docs/ - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.991 diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index e0fbb70..0000000 --- a/.pylintrc +++ /dev/null @@ -1,13 +0,0 @@ -[MASTER] -ignore=tests,docs,build,stubs -persistent=yes -ignore-patterns=^tests/.*, ^docs/.*, ^build/.*, ^stubs/.* - -[MESSAGES CONTROL] -disable=C0114,C0115,C0116,R0903 - -[FORMAT] -max-line-length=88 - -[DESIGN] -max-args=5 diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 4f3e3d3..0000000 --- a/mypy.ini +++ /dev/null @@ -1,10 +0,0 @@ -[mypy] -mypy_path = stubs -disallow_untyped_calls = true -disallow_untyped_defs = true -ignore_missing_imports = true -explicit_package_bases = true -exclude = ^(docs/source/conf.py|build/|tests/|stubs/) - -[mypy-sage_imap.*] -ignore_missing_imports = True \ No newline at end of file diff --git a/packages/requirements-dev.txt b/packages/requirements-dev.txt index ea008a4..62b12cd 100644 --- a/packages/requirements-dev.txt +++ b/packages/requirements-dev.txt @@ -93,4 +93,4 @@ urllib3==2.2.2 ; python_version >= "3.11" and python_version < "4.0" virtualenv==20.26.3 ; python_version >= "3.11" and python_version < "4.0" wcwidth==0.2.13 ; python_version >= "3.11" and python_version < "4.0" wheel==0.43.0 ; python_version >= "3.11" and python_version < "4.0" -zipp==3.20.1 ; python_version >= "3.11" and python_version < "4.0" +zipp==3.20.1 ; python_version >= "3.11" and python_version < "4.0" \ No newline at end of file diff --git a/packages/requirements.txt b/packages/requirements.txt new file mode 100644 index 0000000..e864421 --- /dev/null +++ b/packages/requirements.txt @@ -0,0 +1,6 @@ +certifi==2024.7.4 ; python_version >= "3.8" and python_version < "4.0" +charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0" +idna==3.7 ; python_version >= "3.8" and python_version < "4.0" +requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0" +setuptools==70.3.0 ; python_version >= "3.8" and python_version < "4.0" +urllib3==2.2.2 ; python_version >= "3.8" and python_version < "4.0" diff --git a/poetry.lock b/poetry.lock index ced4271..48e55a6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "alabaster" -version = "0.7.16" -description = "A light, configurable Sphinx theme" +version = "0.7.13" +description = "A configurable sidebar-enabled Sphinx theme" optional = false -python-versions = ">=3.9" +python-versions = ">=3.6" files = [ - {file = "alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92"}, - {file = "alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65"}, + {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, + {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, ] [[package]] @@ -36,6 +36,9 @@ files = [ {file = "astroid-3.2.4.tar.gz", hash = "sha256:0e14202810b30da1b735827f78f5157be2bbd4a7a59b7707ca0bfc2fb4c0063a"}, ] +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} + [[package]] name = "babel" version = "2.16.0" @@ -47,6 +50,9 @@ files = [ {file = "babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"}, ] +[package.dependencies] +pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} + [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] @@ -126,6 +132,8 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -411,6 +419,7 @@ argcomplete = ">=1.12.1,<3.6" charset-normalizer = ">=2.1.0,<4" colorama = ">=0.4.1,<0.5.0" decli = ">=0.6.0,<0.7.0" +importlib_metadata = {version = ">=8.0.0,<9", markers = "python_version < \"3.10\""} jinja2 = ">=2.10.3" packaging = ">=19" pyyaml = ">=3.08" @@ -499,6 +508,9 @@ files = [ {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, ] +[package.dependencies] +tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} + [package.extras] toml = ["tomli"] @@ -617,6 +629,9 @@ files = [ {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, ] +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "filelock" version = "3.15.4" @@ -1004,6 +1019,7 @@ files = [ [package.dependencies] mypy-extensions = ">=1.0.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = ">=4.6.0" [package.extras] @@ -1139,13 +1155,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.8.0" +version = "3.5.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" files = [ - {file = "pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f"}, - {file = "pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af"}, + {file = "pre_commit-3.5.0-py2.py3-none-any.whl", hash = "sha256:841dc9aef25daba9a0238cd27984041fa0467b4199fc4852e27950664919f660"}, + {file = "pre_commit-3.5.0.tar.gz", hash = "sha256:5804465c675b659b0862f07907f96295d490822a450c4c40e747d0b1c6ebcb32"}, ] [package.dependencies] @@ -1231,13 +1247,16 @@ files = [ astroid = ">=3.2.4,<=3.3.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ + {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, ] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" +typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] @@ -1256,6 +1275,7 @@ files = [ [package.dependencies] packaging = ">=24.1" +tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [package.extras] docs = ["furo (>=2024.5.6)", "sphinx-autodoc-typehints (>=2.2.1)"] @@ -1274,9 +1294,11 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=1.5,<2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -1553,50 +1575,47 @@ dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] [[package]] name = "sphinxcontrib-applehelp" -version = "2.0.0" +version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" files = [ - {file = "sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5"}, - {file = "sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1"}, + {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, + {file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"}, ] [package.extras] -lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] -standalone = ["Sphinx (>=5)"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "sphinxcontrib-devhelp" -version = "2.0.0" -description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." optional = false -python-versions = ">=3.9" +python-versions = ">=3.5" files = [ - {file = "sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2"}, - {file = "sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad"}, + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, ] [package.extras] -lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] -standalone = ["Sphinx (>=5)"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.1.0" +version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" files = [ - {file = "sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8"}, - {file = "sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9"}, + {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, + {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, ] [package.extras] -lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] -standalone = ["Sphinx (>=5)"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["html5lib", "pytest"] [[package]] @@ -1629,34 +1648,32 @@ test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" -version = "2.0.0" -description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." optional = false -python-versions = ">=3.9" +python-versions = ">=3.5" files = [ - {file = "sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb"}, - {file = "sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab"}, + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, ] [package.extras] -lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] -standalone = ["Sphinx (>=5)"] -test = ["defusedxml (>=0.7.1)", "pytest"] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "2.0.0" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." optional = false -python-versions = ">=3.9" +python-versions = ">=3.5" files = [ - {file = "sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331"}, - {file = "sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d"}, + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] [package.extras] -lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] -standalone = ["Sphinx (>=5)"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -1687,6 +1704,17 @@ files = [ [package.extras] tests = ["pytest", "pytest-cov"] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "tomlkit" version = "0.13.2" @@ -1718,6 +1746,7 @@ packaging = ">=24.1" platformdirs = ">=4.2.2" pluggy = ">=1.5" pyproject-api = ">=1.7.1" +tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} virtualenv = ">=20.26.3" [package.extras] @@ -1862,4 +1891,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.11,<4.0" -content-hash = "f725a43999439a8229ff8135666cbcbd19dd6dd72f585403076d8cf19b67f658" +content-hash = "f725a43999439a8229ff8135666cbcbd19dd6dd72f585403076d8cf19b67f658" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3e685cf..cef53b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,8 @@ packages = [ "Issues" = "https://github.com/sageteamorg/python-sage-imap/issues" [tool.poetry.dependencies] -python = ">=3.11,<4.0" +python = "^3.8" +setuptools = "^70.2.0" requests = "^2.32.3" [tool.poetry.group.dev.dependencies] @@ -105,10 +106,29 @@ exclude = ''' ^stubs/ ''' +[tool.pylint.master] +ignore = ["tests", "docs", "build", "stubs"] +persistent = true +ignore-patterns = ["^tests/.*", "^docs/.*", "^build/.*", "^stubs/.*"] + +[tool.pylint."messages control"] +disable = ["C0114", "C0115", "C0116", "R0903"] + +[tool.pylint.format] +max-line-length = 88 + +[tool.pylint.design] +max-args = 5 + [tool.commitizen] name = "cz_conventional_commits" version = "0.1.0" +[tool.flake8] +max-line-length = 88 +extend-ignore = ["E203", "W503"] +exclude = ["docs"] + [tool.pytest.ini_options] addopts = "--cov --cov-report=term-missing --cov-report=html --cov-fail-under=90" python_files = ["tests.py", "test_*.py"] @@ -122,6 +142,18 @@ norecursedirs = [ "build", ] +[tool.coverage.run] +branch = true +source = ["sage_imap"] + +[tool.coverage.report] +omit = [ + "tests/*", + ".tox/*", + "docs/*" +] + + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/setup.py b/setup.py index 412bc84..5558b62 100644 --- a/setup.py +++ b/setup.py @@ -24,5 +24,5 @@ "Operating System :: OS Independent", "Intended Audience :: Developers", ], - python_requires=">=3.11", + python_requires=">=3.8", ) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..fc86511 --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +[tox] +envlist = + py38, py39, py310, py311, py312 + +[gh-actions] +python = + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + 3.12: py312 + +[testenv] +description = Run Pytest tests +usedevelop = True +deps = + pytest + pytest-cov + +commands = + pytest --cov