Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into spherical_vol_rende…
Browse files Browse the repository at this point in the history
…ring
  • Loading branch information
chrishavlin committed Nov 25, 2024
2 parents 66a552b + d554a33 commit 4da617e
Show file tree
Hide file tree
Showing 46 changed files with 673 additions and 333 deletions.
4 changes: 4 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
exclude:
authors:
- pre-commit-ci
51 changes: 51 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Create new release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build_and_publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build source tarball
run: >-
python -m
build
--sdist
--outdir dist/
.
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

create_gh_release:
name: Create Github release
needs: [build_and_publish]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
# https://github.com/ncipollo/release-action
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
tag: ${{ github.ref }}
prerelease: false
name: Release ${{ github.ref }}
23 changes: 10 additions & 13 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: [3.9, '3.10', '3.11']

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Install dependencies
- uses: actions/checkout@v4
- name: Install osmesa
run: |
sudo apt-get update && sudo apt-get upgrade
sudo apt install libgl1-mesa-dri libegl1-mesa libgbm1 libosmesa6 libosmesa6-dev
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f tests/test_requirements.txt ]; then python -m pip install -r tests/test_requirements.txt; fi
python -m pip install --upgrade numpy PyOpenGL_accelerate
sudo apt-get install libosmesa6-dev
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Setup yt_idv
run: |
python -m pip install -e .
run: python -m pip install -e .[test]
- name: Run Tests
env:
PYOPENGL_PLATFORM: osmesa
run: pytest --html=report.html --self-contained-html
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload pytest report
with:
name: pytest-report
name: pytest-report-py-${{ matrix.python-version }}
path: report.html
6 changes: 3 additions & 3 deletions .github/workflows/check-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'
- name: Install check-build dependencies
run: |
python -m pip install --upgrade pip
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/check-min-numpy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run min numpy tests

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- name: Install osmesa
run: |
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libosmesa6-dev
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Setup yt_idv
run: python -m pip install -e .[test,minimal]
- name: Run Tests
env:
PYOPENGL_PLATFORM: osmesa
run: pytest --html=report.html --self-contained-html
- uses: actions/upload-artifact@v4
name: Upload pytest report
with:
name: pytest-report
path: report.html
30 changes: 0 additions & 30 deletions .github/workflows/create-release.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@ ENV/

# Screenshots
snap_*.png

# pytest outputs
report.html
19 changes: 10 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
repos:
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.3.0
rev: v2.7.0
hooks:
- id: setup-cfg-fmt
args: [
--include-version-classifiers,
--max-py-version=3.10,
--max-py-version=3.11,
--min-py-version=3.9,
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -17,25 +18,25 @@ repos:
- id: check-executables-have-shebangs
- id: check-yaml
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.10.0
hooks:
- id: black-jupyter

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [
Expand All @@ -44,7 +45,7 @@ repos:
flake8-2020==1.6.1,
]
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black==22.6.0]
Expand All @@ -53,7 +54,7 @@ repos:
hooks:
- id: rst-backticks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.9.1
hooks:
- id: nbqa-pyupgrade
args: [--py37-plus]
Expand Down
12 changes: 9 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ version: 2
sphinx:
configuration: docs/conf.py

# Specify the build os and python version
build:
os: ubuntu-22.04
tools:
python: "3.9"

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF
formats: []

# Optionally set the version of Python and requirements required to build your docs

# Optionally set the Python requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
Loading

0 comments on commit 4da617e

Please sign in to comment.