Skip to content
Open
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
12 changes: 6 additions & 6 deletions .github/workflows/manual_tests_CPU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
with:
miniforge-version: latest
python-version: "3.10"
- name: pip install
run: |
pip install wakis['notebook']
pip uninstall vtk -y
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa

- name: Print versions
run: conda list
- name: Checkout wakis
uses: actions/checkout@v4
with:
path: wakis
- name: pip install
run: |
cd wakis
pip install .[notebook,tests]
pip uninstall vtk -y
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
- name: Run pytest
run: |
cd wakis
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual_tests_MPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
run: |
conda install -c conda-forge openmpi
conda install -c conda-forge mpi4py
- name: pip install
run: |
pip install wakis['notebook']

- name: Print versions
run: conda list
- name: Checkout wakis
uses: actions/checkout@v4
with:
path: wakis
- name: pip install
run: |
cd wakis
pip install .[notebook,tests]
- name: Run pytest
run: |
cd wakis
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly_codecov_CPU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
with:
miniforge-version: latest
python-version: "3.10"
- name: pip install
run: |
pip install wakis['notebook']
pip install pytest pytest-cov
- name: Print versions
run: conda list
- name: Checkout wakis
uses: actions/checkout@v4
with:
path: wakis
- name: pip install
run: |
cd wakis
pip install .[notebook,tests]
- name: Run pytest
run: |
cd wakis
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/nightly_tests_CPU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ jobs:
with:
miniforge-version: latest
python-version: "3.10"
- name: pip install
run: |
pip install wakis['notebook']
pip uninstall vtk -y
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
- name: Print versions
run: conda list
- name: Checkout wakis
uses: actions/checkout@v4
with:
path: wakis
- name: pip install
run: |
cd wakis
pip install .[notebook,tests]
pip uninstall vtk -y
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
- name: Run pytest
run: |
cd wakis
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_CPU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install wakis
run: |
cd wakis
pip install .['notebook']
pip install .[notebook,tests]
pip uninstall vtk -y
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa

Expand Down
45 changes: 22 additions & 23 deletions .github/workflows/pull_request_MPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,25 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: wakis
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
python-version: "3.11"
- name: mpi install
run: |
conda install -c conda-forge openmpi
conda install -c conda-forge mpi4py
- name: pip install
run: |
cd wakis
pip install .['notebook']
- name: Print versions
run: conda list
- name: Run pytest
run: |
cd wakis
mpiexec -n 2 python -m pytest --color=yes -v -s tests/test_007_mpi_lossy_cavity.py
- name: Checkout repository
uses: actions/checkout@v4
with:
path: wakis
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
python-version: "3.11"
- name: mpi install
run: |
conda install -c conda-forge openmpi mpi4py
- name: pip install
run: |
cd wakis
pip install .[notebook,tests]
- name: Print versions
run: conda list
- name: Run pytest
run: |
cd wakis
mpiexec -n 2 python -m pytest --color=yes -v -s tests/test_007_mpi_lossy_cavity.py
14 changes: 13 additions & 1 deletion .gitignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this uv.lock used for?

Copy link
Author

Choose a reason for hiding this comment

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

uv is a Python package manager https://docs.astral.sh/uv/.
I was using it to develop locally but since it is not used in wakis I just added the lockfile to .gitignore (not sure if this should be version controlled generally speaking though)

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,16 @@ ECT_*
*.PNG
_build/
dist/
wakis.egg-info/
wakis.egg-info/
.venv
.coverage
coverage.xml
*.pyc
*.pyo
*.pyd
*.so
.Python
*.ipynb_checkpoints
htmlcov/
uv.lock
build
5 changes: 1 addition & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ include pyproject.toml
include *.md

# Include the license file
include LICENSE.txt

# Include requirements
include requirements.txt
include LICENSE
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# wakis Makefile


# Colors for output
RED := \033[0;31m
GREEN := \033[0;32m
YELLOW := \033[1;33m
NC := \033[0m # No Color

.PHONY: help install install-gpu clean docs

# Based on https://gist.github.com/prwhite/8168133?permalink_comment_id=4718682#gistcomment-4718682

## (Default) Print listing of key targets with their descriptions
help:
@printf "\n\033[1;33mwakis Makefile\033[0m\n"
@printf "\n\033[1;34mUsage:\033[0m \033[1;33mmake <target>\033[0m\n\n"
@awk '\
/^## / { \
desc = substr($$0, 4); \
getline nextline; \
if (match(nextline, /^([a-zA-Z0-9._-]+):/)) { \
target = substr(nextline, RSTART, RLENGTH-1); \
printf " \033[34m%-20s\033[0m %s\n", target, desc; \
} \
} \
' $(MAKEFILE_LIST)

## Install Python dependencies
install:
@echo -e "Installing Python dependencies..."
@pip install -e .[full]

## Install Python dependencies
install-gpu:
@echo -e "Installing Python dependencies with GPU support..."
@pip install -e .[full-gpu]

## Remove temporary and generated files
clean:
@echo -e "Cleaning up directory..."
@rm -rf __pycache__ .ruff_cache .pytest_cache *.egg-info .html *.html coverage.xml .coverage .mypy_cache results
@ cd docs && make -s clean


## Run Python tests
test:
pytest -s

## Build documentation
docs:
cd docs && make html
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ Create a dedicated **conda environment** and install dependencies:
cd wakis/
conda create --name wakis-env python=3.11
conda activate wakis-env
pip install -r requirements.txt
pip install -e . # install wakis in editable mode
pip install -e .[notebook, tests, docs] # install wakis in editable mode
pip install neffint iddefix bihc # Optional tools
```
πŸ› οΈ **Want to contribute?** To merge your changes into `main`, create a **Pull Request (PR)** following our [PR template](https://github.com/ImpedanCEI/wakis/blob/main/.github/pull_request_template.md).
Expand Down
Loading