From b834c802086a2ba2d72e7ba2c308270578523f39 Mon Sep 17 00:00:00 2001 From: Justin Mahlik Date: Mon, 18 Sep 2023 14:58:07 -0500 Subject: [PATCH 1/2] move pre-commit to dev extra so it is not installed downstream --- README.rst | 8 +++++++- requirements.txt | 1 - setup.py | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5885117..a7603b5 100644 --- a/README.rst +++ b/README.rst @@ -202,7 +202,6 @@ Requirements - ``pandas`` - ``scipy`` - ``scikit-learn`` -- ``pre-commit`` Contributing ------------ @@ -210,6 +209,13 @@ Contributing Contributions to ``factor_analyzer`` are very welcome. Please file an issue in the repository if you would like to contribute. +You can install the development requirements in a virtual environment with: + +.. codeblock:: + + python -m pip install -e .[dev] + pre-commit install + Installation ------------ diff --git a/requirements.txt b/requirements.txt index 38a6827..9d36908 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,3 @@ pandas scipy numpy scikit-learn -pre-commit diff --git a/setup.py b/setup.py index 708bbc9..96cf15c 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ def requirements(): # noqa: D103 maintainer_email="nmadnani@ets.org", url="https://github.com/EducationalTestingService/factor_analyzer", install_requires=requirements(), + extras_require={"dev": ["pre-commit"]}, include_package_data=True, classifiers=[ "Intended Audience :: Science/Research", From dd22a50579a5fb25536a0ac814fb36026fa51254 Mon Sep 17 00:00:00 2001 From: Justin Mahlik Date: Mon, 18 Sep 2023 14:58:52 -0500 Subject: [PATCH 2/2] add build system info to pyproject.toml to support PEP 518 --- README.rst | 2 +- pyproject.toml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a7603b5..ee35d2e 100644 --- a/README.rst +++ b/README.rst @@ -211,7 +211,7 @@ in the repository if you would like to contribute. You can install the development requirements in a virtual environment with: -.. codeblock:: +.. code-block:: bash python -m pip install -e .[dev] pre-commit install diff --git a/pyproject.toml b/pyproject.toml index b2004ea..b105c74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,9 @@ +[build-system] +requires = [ + "setuptools >= 59.0.0", +] +build-backend = "setuptools.build_meta" + [tool.isort] profile = "black"