diff --git a/README.md b/README.md index 00a02bbd..90330a45 100644 --- a/README.md +++ b/README.md @@ -721,6 +721,20 @@ If you're upgrading from v1 of the Kinde Python SDK, we've prepared comprehensiv Please refer to Kinde's [contributing guidelines](https://github.com/kinde-oss/.github/blob/489e2ca9c3307c2b2e098a885e22f2239116394a/CONTRIBUTING.md). +### Development Setup + +To set up the development environment, install the package in editable mode with development dependencies: + +```bash +pip install -e ".[dev]" +``` + +**Note:** The `dev` optional dependency group includes all development tools (pytest, mypy, pylint, etc.). Pylint is conditionally installed based on your Python version: +- **Python 3.10+**: pylint >=4.0.0 +- **Python 3.9**: pylint >=2.0, <4.0 + +This ensures compatibility with Python 3.9 while allowing newer Python versions to use the latest pylint features. + ## License By contributing to Kinde, you agree that your contributions will be licensed under its MIT License. diff --git a/pyproject.toml b/pyproject.toml index 7458681f..f1896edf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,21 @@ fastapi = [ flask = [ "flask >=3.0.0, <4.0.0", ] +dev = [ + "pytest >=7.4.0", + "pytest-cov >=4.1.0", + "pytest-django >=4.5.2", + "mypy >=1.5.0", + "bandit >=1.7", + "pylint >=4.0.0; python_version >= '3.10'", + "pylint >=2.0, <4.0; python_version < '3.10'", + "pycodestyle >=2.0", + "pytest-asyncio >=0.26.0", + "pytest-timeout >=2.2.0", + "black >=24.3.0", + "flake8 >=6.1.0", + "isort >=5.12.0", +] [project.urls] "Homepage" = "https://github.com/kinde-oss/kinde-python-sdk" @@ -71,7 +86,13 @@ pytest-cov = "^4.1.0" pytest-django = "^4.5.2" mypy = "^1.5.0" bandit = "^1.7" -pylint = "^2.0" +# pylint is conditionally installed based on Python version to maintain Python 3.9 compatibility +# Python 3.10+: pylint >=4.0.0 (use pip install -e ".[dev]" for conditional installation) +# Python 3.9: pylint >=2.0, <4.0 +# Note: Poetry doesn't support multiple conditional version constraints for the same package. +# This entry uses the Python 3.9-compatible version. Python 3.10+ users can upgrade manually +# or use: pip install -e ".[dev]" which respects the conditional markers in [project.optional-dependencies] +pylint = ">=2.0,<4.0" pycodestyle = "^2.0" pytest-asyncio = "^0.26.0" pytest-timeout = "^2.2.0"