From a60f5a02d6a64826540b35dc315a4fd3ca4baade Mon Sep 17 00:00:00 2001 From: rht Date: Sat, 29 Jun 2024 22:17:38 -0400 Subject: [PATCH] Merge requirements.txt into pyproject.toml --- README.md | 28 +++++++++++++++++++--------- pyproject.toml | 13 +++++++++++++ requirements.txt | 4 ---- 3 files changed, 32 insertions(+), 13 deletions(-) delete mode 100644 requirements.txt diff --git a/README.md b/README.md index 843a059..908d891 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,21 @@ cd mesa_frames If you want to install it into a new environment: ```bash -conda create -n myenv -f requirements.txt -pip install -e . +conda create -n myenv ``` If you want to install it into an existing environment: ```bash conda activate myenv -conda install -f requirements.txt -pip install -e . +``` + +Then, to install mesa-frames itself: +```bash +# For pandas backend +pip install -e .[pandas] +# Alternatively, for Polars backend +pip install -e .[polars] ``` ### Installing in a Python Virtual Environment @@ -50,18 +55,23 @@ If you want to install it into a new environment: ```bash python3 -m venv myenv source myenv/bin/activate # On Windows, use `myenv\Scripts\activate` -pip install -r requirements.txt -pip install -e . ``` If you want to install it into an existing environment: ```bash source myenv/bin/activate # On Windows, use `myenv\Scripts\activate` -pip install -r requirements.txt -pip install -e . ``` +Then, to install mesa-frames itself: +```bash +# For pandas backend +pip install -e .[pandas] +# Alternatively, for Polars backend +pip install -e .[polars] +``` + + ## Usage **Note:** mesa-frames is currently in its early stages of development. As such, the usage patterns and API are subject to change. Breaking changes may be introduced. Reports of feedback and issues are encouraged. @@ -143,4 +153,4 @@ mesa-frames is made available under the MIT License. This license allows you to - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - The software is provided "as is", without warranty of any kind. -For the full license text, see the [LICENSE](https://github.com/adamamer20/mesa_frames/blob/main/LICENSE) file in the GitHub repository. \ No newline at end of file +For the full license text, see the [LICENSE](https://github.com/adamamer20/mesa_frames/blob/main/LICENSE) file in the GitHub repository. diff --git a/pyproject.toml b/pyproject.toml index 2f1e080..b714647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,19 @@ authors = [ { name = "Adam Amer" }, ] license = { text = "MIT" } +dependencies = [ + "numpy~=1.26", +] + +[project.optional-dependencies] +pandas = [ + "pandas~=2.2", + "geopandas", + "pyarrow", +] +polars = [ + "polars", +] [tool.hatch.build.targets.wheel] packages = ["mesa_frames"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index f45d0f0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -geopandas == 0.14.1 -pandas == 2.1.4 -numpy == 1.26.3 -pyarrow == 16.1.0 \ No newline at end of file