Skip to content

Commit

Permalink
use pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
malihass committed Jan 3, 2025
1 parent 35a2d92 commit 9c77acc
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme
pip install .[docs] --no-deps
- name: Build documentation
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
pip install black
pip install isort
pip install codespell
pip install --upgrade pip
pip install .[format] --no-deps
- name: Formatting and sorting import
run: |
source .github/linters/formatting.sh
Expand All @@ -63,8 +63,8 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .
pip install pytest
pip install .[test,post]
- name: Test preprocess
run: |
pytest tests/preprocess
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme
pip install .[docs] --no-deps
- name: Build documentation
run: |
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@ conda create --name bird python=3.10
conda activate bird
git clone https://github.com/NREL/BioReactorDesign.git
cd BioReactorDesign
pip install -e .
pip install -e .[all]
```

## Installation of python package for users

```bash
conda create --name bird python=3.10
conda activate bird
pip install nrel-bird[post]
```

If you do not need the post processing tools, please replace the last line with

```bash
pip install nrel-bird
```

Expand Down
2 changes: 1 addition & 1 deletion docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Installation of python package for developers
conda activate bird
git clone https://github.com/NREL/BioReactorDesign.git
cd BioReactorDesign
pip install -e .
pip install -e .[all]
.. _installation_users:

Expand Down
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[build-system]
requires = ["setuptools >= 64", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "nrel-bird"
version = "0.0.15"
description = "Bio Reactor Design (BiRD): a toolbox to simulate and analyze different designs of bioreactors in OpenFOAM"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{name = "Malik Hassanaly", email = "[email protected]"},
{name = "Federico Municchi", email = "[email protected]"},
{name = "Hariswaran Sitaraman", email = "[email protected]"},
{name = "Mohammad Rahimi", email = "[email protected]"},
]
license = {text = "BSD-3-Clause"}
requires-python = ">= 3.9"
classifiers=[
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"numpy",
"prettyPlot",
"ruamel_yaml",
"numpy-stl==2.17.0",
"scipy",
]


[project.optional-dependencies]
post = [
"corner",
"jax",
"numpyro>=0.16.1"
]
format = [
"black",
"isort",
"codespell"
]
docs = [
"sphinx",
"sphinx_rtd_theme"
]
test = [
"pytest"
]
all = [
"corner",
"jax",
"numpyro>=0.16.1",
"black",
"isort",
"codespell",
"sphinx",
"sphinx_rtd_theme",
"pytest",
]


[project.urls]
homepage = "https://github.com/NREL/BioReactorDesign"
documentation = "https://nrel.github.io/BioReactorDesign/"
repository = "https://github.com/NREL/BioReactorDesign"

[tool.setuptools]
package-dir = {bird = "bird"}
packages = ["bird"]
include-package-data = true

[tool.setuptools.package-data]
"bird" = [
"*.json",
"*.yaml",
"*.csv",
"data_conditional_mean",
]

52 changes: 0 additions & 52 deletions setup.py

This file was deleted.

0 comments on commit 9c77acc

Please sign in to comment.