Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pmav99 committed Apr 9, 2024
1 parent 43325ab commit 4464668
Show file tree
Hide file tree
Showing 14 changed files with 5,897 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: test

on:
push:
branches:
- main
- master
paths:
- "**.py"
- ".github/workflows/*test*.yml"
- "pyproject.toml"
- "poetry.lock"
- "requirements/requirements*.txt"
pull_request:
paths:
- "**.py"
- ".github/workflows/*test*.yml"
- "pyproject.toml"
- "poetry.lock"
- "requirements/requirements*.txt"

jobs:
test:
name: test Python ${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
#python: ["3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11"]
# include:
# - os: "macos-latest"
# python: "3.10"
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@main
id: cache
with:
path: ${{ env.pythonLocation }}
key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements/*') }}
- run: sudo apt install -y libgdal-dev
- run: pip install -U pip
- run: pip install -r requirements/requirements-dev.txt
- run: pip install ./
- run: python --version
- run: python -m pip --version
- run: pytest --version
- run: python -m pip cache info
#- run: mypy searvey
#- run: make cov
- run: make test
# We only run on a single matrix case in order to speed up CI runtime
#- run: make exec_notebooks
# if: ${{ matrix.os == 'ubuntu-latest' && matrix.python == '3.10' }}
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.PHONY: list docs

list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'

init:
poetry install --with dev --sync
pre-commit install

style:
pre-commit run black -a

lint:
pre-commit run ruff -a

mypy:
dmypy run searvey

test:
python -m pytest -vlx

cov:
coverage erase
python -m pytest --cov=searvey --cov-report term-missing --durations=10 --record-mode=none

clean_notebooks:
pre-commit run nbstripout -a

exec_notebooks:
python -m nbconvert --to notebook --execute --ExecutePreprocessor.kernel_name=python3 --stdout examples/* >/dev/null

docs:
make -C docs html

deps:
pre-commit run poetry-lock -a
pre-commit run poetry-export -a
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# pyposeidon-viz
# pyposeidon-viz

Visualizations for pyposeidon
3,841 changes: 3,841 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

Empty file added pyposeidon_viz/__init__.py
Empty file.
Loading

0 comments on commit 4464668

Please sign in to comment.