Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rsokl/MyGrad
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.0
Choose a base ref
...
head repository: rsokl/MyGrad
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 10 commits
  • 6 files changed
  • 1 contributor

Commits on Sep 8, 2024

  1. docs

    rsokl committed Sep 8, 2024
    Copy the full SHA
    0e648a0 View commit details
  2. docs

    rsokl committed Sep 8, 2024
    Copy the full SHA
    679bc3c View commit details
  3. docs ping

    rsokl committed Sep 8, 2024
    Copy the full SHA
    1bf776e View commit details
  4. move

    rsokl committed Sep 8, 2024
    Copy the full SHA
    24a83c9 View commit details
  5. docs

    rsokl committed Sep 8, 2024
    Copy the full SHA
    4489394 View commit details
  6. downgrade

    rsokl committed Sep 8, 2024
    Copy the full SHA
    227279f View commit details
  7. docs style

    rsokl committed Sep 8, 2024
    Copy the full SHA
    8efd1d5 View commit details

Commits on Sep 11, 2024

  1. Update nightly.yml

    rsokl authored Sep 11, 2024
    Copy the full SHA
    4507fa7 View commit details

Commits on Dec 31, 2024

  1. Loosen test requirements

    rsokl committed Dec 31, 2024
    Copy the full SHA
    8eafea6 View commit details

Commits on Jan 1, 2025

  1. Merge pull request #444 from rsokl/fix-test

    Loosen test requirements
    rsokl authored Jan 1, 2025
    Copy the full SHA
    3a09abb View commit details
Showing with 73 additions and 35 deletions.
  1. +1 −1 .github/workflows/nightly.yml
  2. +50 −0 .github/workflows/publish_docs.yml
  3. +2 −2 docs/requirements.txt
  4. +14 −0 docs/source/conf.py
  5. +0 −28 readthedocs.yml
  6. +6 −4 tests/math/unary/test_scipy_mirror.py
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
50 changes: 50 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: github pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install package
run: python3 -m pip install .

- name: Install docs dependencies
run: pip install -r ./docs/requirements.txt

- name: Run sphinx
run: (cd ./docs/ && make html)

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: ./docs
publish_dir: ./docs/build/html
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-e .
numpy==1.24.3
numba==0.56.4
numpy==1.26.4
numba==0.60.0
sphinx==7.0.1
numpydoc==1.5.0
pydata-sphinx-theme==0.13.3
14 changes: 14 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -99,6 +99,20 @@
#
html_theme = "pydata_sphinx_theme"

html_theme_options = {
"collapse_navigation": True,
"navigation_depth": 4,
"pygment_light_style": "default",
"pygment_dark_style": "zenburn",
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/rsokl/MyGrad",
"icon": "fab fa-github-square",
},
],
}


def setup(app):
app.add_css_file("my_theme.css")
28 changes: 0 additions & 28 deletions readthedocs.yml

This file was deleted.

10 changes: 6 additions & 4 deletions tests/math/unary/test_scipy_mirror.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
import numpy as np
import pytest
from hypothesis import given, settings
from numpy.testing import assert_array_equal
from numpy.testing import assert_allclose
from scipy import special

from mygrad.math._special import logsumexp
@@ -26,9 +26,11 @@ def test_logsumexp(data: st.SearchStrategy, x: np.ndarray, keepdims: bool):
axes = data.draw(valid_axes(ndim=x.ndim), label="axes")
mygrad_result = logsumexp(x, axis=axes, keepdims=keepdims)
scipy_result = special.logsumexp(x, axis=axes, keepdims=keepdims)
assert_array_equal(
mygrad_result,
scipy_result,
assert_allclose(
actual=mygrad_result,
desired=scipy_result,
err_msg="mygrad's implementation of logsumexp does "
"not match that of scipy's",
atol=1e-8,
rtol=1e-8,
)