Skip to content

Commit

Permalink
Merge branch 'main' into deepnote-button
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 authored Oct 2, 2024
2 parents 674cd87 + 405373f commit fefd80f
Show file tree
Hide file tree
Showing 145 changed files with 3,588 additions and 2,826 deletions.
18 changes: 17 additions & 1 deletion .binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
-r ../docs/requirements.txt
# Copied from 'sphinx' extra of pyproject.toml
altair
bokeh
folium
ipywidgets
jupytext
matplotlib
nbclient
numpy>=2
pandas
plotly
sphinx-click
sphinx-examples
sphinx_inline_tabs
sphinx-proof
sphinxext-rediraffe~=0.2.3
sympy
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Dependabot configuration
# ref: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
18 changes: 10 additions & 8 deletions .github/workflows/pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,7 +38,7 @@ jobs:
- name: Build PDF from HTML (Docs)
run: |
jb build docs --builder pdfhtml -n -W --keep-going
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: PDF_HTML
path: docs/_build/pdf/book.pdf
Expand All @@ -47,14 +48,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -75,7 +77,7 @@ jobs:
- name: Build PDF from LaTeX (Docs)
run: |
jb build docs --builder pdflatex -n -W --keep-going
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: PDF_LATEX
path: docs/_build/latex/book.pdf
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This will run every time a tag is created and pushed to the repository.
# It calls our tests workflow via a `workflow_call`, and if tests pass
# then it triggers our upload to PyPI for a new release.
name: Publish to PyPI
on:
release:
types: ["published"]

jobs:
tests:
uses: ./.github/workflows/tests.yml
publish:
name: publish
needs: [tests] # require tests to pass before deploy runs
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install flit
run: |
pip install flit~=3.6
- name: Build and publish
run: |
flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}
81 changes: 81 additions & 0 deletions .github/workflows/scheduled_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: scheduled-tests

on:
schedule:
# Run at the beginning of each day
- cron: '0 0 * * *'
workflow_dispatch:
jobs:

tests-windows:
name: Run tests and build docs on Windows
runs-on: windows-latest
strategy:
matrix:
# Using the default python in the Windows 2022 github actions runner
# ref: https://github.com/actions/virtual-environments/issues/4856
python-version: [3.10]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
- name: Run pytest
run: pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path

- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/
osx:
name: Run Tests on OS X
runs-on: macos-latest
strategy:
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
# Install libmagic to avoid a flaky Fonts error with matplotlib
# ref: https://stackoverflow.com/questions/62279920/python-macos-error-unable-to-revert-mtime-library-fonts
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
brew install libmagic
- name: Run Pytest
run: |
pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/
Loading

0 comments on commit fefd80f

Please sign in to comment.