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
41 changes: 21 additions & 20 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# Run the aframe test suite on pushes and pull requests to main.

name: Tests

# Whenever there is a pull request (PR) or push to the "main" branch, the jobs specified below will run.
on:
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Here, we specify the automatic cloud based testing that will be ran on pushes/PRs to "main"
jobs:
build:

# The tests will run on ubuntu with python versions 3.8, 3.9, and 3.10.
# Add other OSes like windows and macOS if needed as well as other Python versions
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
# the Python versions CSDL_alpha is tested on
python-version: ["3.9", "3.10"]

steps:
# The steps here are essentially command-line arguments that will be ran on the cloud with the above configurations
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

# virtual display for the off-screen PyVista plotting test
- name: Set up headless display
uses: pyvista/setup-headless-display-action@v3

# Here we install the package of this repositories as well as other required packages
- name: Install dependencies
run: |
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
# CSDL_alpha is not on PyPI
pip install git+https://github.com/LSDOlab/CSDL_alpha.git
# optional: runs the JAX backend test (tests/test_jax.py)
pip install jax
pip install -e ".[dev,plot]"

# Finally, we run the package unit-tests on the specified OS and python versions.
- name: Test with pytest
run: |
pytest
run: pytest
62 changes: 62 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Build the pdoc API documentation on every push and pull request, and publish
# it to GitHub Pages on pushes to main (https://lsdolab.github.io/aframe/).

name: Docs

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

# one Pages deployment at a time; don't cancel a deployment in progress
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml

# PyVista is imported to document the plotting helpers
- name: Set up headless display
uses: pyvista/setup-headless-display-action@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# CSDL_alpha is not on PyPI
pip install git+https://github.com/LSDOlab/CSDL_alpha.git
pip install -e ".[plot,docs]"

- name: Build documentation
run: python docs/make_docs.py -o site

- uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
# only the main branch is published
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
150 changes: 29 additions & 121 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,144 +1,52 @@
# Byte-compiled / optimized / DLL files
# Python bytecode
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
# Packaging / build artifacts
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
.eggs/
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
pip-wheel-metadata/

# Environments
# Virtual environments
.env
.venv
.venv/
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
# Test, coverage and type-checker caches
.pytest_cache/
.coverage
.coverage.*
htmlcov/
.tox/
.nox/
.hypothesis/
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
.ruff_cache/

.DS_Store

# Directory with files generated before building documentation
_temp

# Sphinx
top_level_req.in
top_level_req.txt
_autosummary
_conf_master.py
# Jupyter
.ipynb_checkpoints/

# Documentation builds
docs/_build/
/site

# Solver / optimizer output (e.g. csdl JaxSimulator saves, modopt records)
*.hdf5
*.h5

.vscode/
# Editors and OS files
.vscode/
.idea/
*.swp
.DS_Store
Thumbs.db
42 changes: 0 additions & 42 deletions .readthedocs.yaml

This file was deleted.

Loading
Loading