Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 6 additions & 24 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
python-version: '3.10'
cache: 'pip'

- name: Set up micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
cache-downloads: true
cache-env: true

- name: Install dependencies
run: |
micromamba install --yes -n test-env -c conda-forge paraview
python -m pip install --upgrade pip
pip install -e .
pip install .[docs]
pixi-version: v0.62.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

- name: Build documentation
run: |
cd docs
make html
pixi run docs


36 changes: 32 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
python-version: ['3.14']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the intention is one single version, you can remove this.

os: ['ubuntu-latest']
defaults:
run:
Expand All @@ -51,13 +51,16 @@
- name: Formatting and sorting import
run: nox -s linter

- name: Spellcheck
run: nox -s spell

Unit-Test-BiRD:
name: Unit-Test-BiRD (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.14']
python-version: ['3.11', '3.14']
os: ['ubuntu-latest', 'macos-latest']
defaults:
run:
Expand Down Expand Up @@ -91,14 +94,39 @@
- name: Test
run: nox -s tests -- no-reports

Unit-Test-pixi-BiRD:
name: Unit-Test-pixi-BiRD (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
defaults:
run:
shell: bash -l {0}
working-directory: ${{github.workspace}}

steps:
- uses: actions/checkout@v4

- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.62.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

- name: Formatting and sorting import
run: |
pixi run test

Unit-Test-pypi-Bird:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Unit-Test-pypi-BiRD (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
python-version: ['3.14']
os: ['ubuntu-latest']
defaults:
run:
Expand Down Expand Up @@ -137,7 +165,7 @@
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
python-version: ['3.14']
os: ['ubuntu-22.04']
defaults:
run:
Expand Down
31 changes: 7 additions & 24 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
python-version: '3.14'
cache: 'pip'
pixi-version: v0.62.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

- name: Set up micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
cache-downloads: true
cache-env: true

- name: Install dependencies
run: |
micromamba install --yes -n test-env -c conda-forge paraview
pip install --upgrade pip
pip install --upgrade nox
pip install -e .[tests]

- name: Generate coverage report
- name: Build documentation
run: |
pytest --cov=./ --cov-report=xml:coverage.xml
pixi run test-cov

- name: Upload coverage to Codecov

Expand Down
29 changes: 6 additions & 23 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
python-version: '3.10'
cache: 'pip'

- name: Set up micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
cache-downloads: true
cache-env: true

- name: Install dependencies
run: |
micromamba install --yes -n test-env -c conda-forge paraview
pip install --upgrade pip
pip install -e .[docs]
pixi-version: v0.62.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

- name: Build documentation
run: |
cd docs
make html
pixi run docs

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,6 @@ dmypy.json

*.swp
.vim
# pixi environments
.pixi/*
!.pixi/config.toml
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bash run.sh
## Installation of python package for developers

```bash
conda create -c conda-forge --name bird python=3.10 paraview
conda create -c conda-forge --name bird python=3.14 paraview
conda activate bird
git clone https://github.com/NatLabRockies/BioReactorDesign.git
cd BioReactorDesign
Expand All @@ -23,7 +23,7 @@ pip install -e .
## Installation of python package for users

```bash
conda create -c conda-forge --name bird python=3.10 paraview
conda create -c conda-forge --name bird python=3.14 paraview
conda activate bird
pip install nlr-bird=={version}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Installation of python package for developers

.. code-block:: console

conda create -c conda-forge --name bird python=3.10 paraview
conda create -c conda-forge --name bird python=3.14 paraview
conda activate bird
git clone https://github.com/NREL/BioReactorDesign.git
cd BioReactorDesign
Expand All @@ -24,7 +24,7 @@ Installation of python package for users

.. code-block:: console

conda create -c conda-forge --name bird python=3.10 paraview
conda create -c conda-forge --name bird python=3.14 paraview
conda activate bird
pip install nlr-bird

Expand Down
18 changes: 17 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def run_lint(session: nox.Session) -> None:
"--line-length",
"79",
"--target-version",
"py310",
"py314",
"--exclude",
".pixi",
".",
]
isort_command = [
Expand All @@ -75,6 +77,8 @@ def run_lint(session: nox.Session) -> None:
"--line-length",
"79",
"--use-parentheses",
"--skip",
".pixi",
".",
]

Expand Down Expand Up @@ -167,6 +171,18 @@ def run_pytest(session: nox.Session) -> None:
run_cleanup(session)


@nox.session(name="docs", python=False)
def run_sphinx(session: nox.Session) -> None:
"""
Run spellcheck and then use sphinx to build docs
"""

run_codespell(session)
os.chdir("docs")
session.run("make", "html")
os.chdir(" .. ".strip())


def run_pre_commit(session: nox.Session) -> None:
"""
Run all linters/tests and make new badges
Expand Down
Loading
Loading