Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment and MyPy updates #227

Merged
merged 10 commits into from
May 11, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/Docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.x

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7]
python-version: [3.12]
environment: ["min-deps"]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7]
environment: ["min-deps", "full", "min-ver"]
exclude:
- python-version: 3.6
environment: "full"
include:
- python-version: 3.9
environment: "min-deps"
- python-version: 3.12
environment: "min-deps"
- python-version: 3.9
environment: "min-ver"
- python-version: 3.11
environment: "full"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
Expand Down
15 changes: 8 additions & 7 deletions devtools/conda-envs/full-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ channels:
- conda-forge
dependencies:
# Base depends
- python
- numpy
- python >=3.9
- numpy >=1.23
- nomkl

# Backends
- tensorflow-base
- tensorflow-cpu
- dask
- sparse
- theano
- pytorch-cpu
- autograd
- jax

# Testing
- pytest
- autoflake
- black
- codecov
- pytest-cov
- isort
- mypy
- pytest
- pytest-cov
11 changes: 7 additions & 4 deletions devtools/conda-envs/min-deps-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ channels:
- conda-forge
dependencies:
# Base depends
- python
- numpy
- python >=3.9
- numpy >=1.23
- nomkl

# Testing
- pytest
- autoflake
- black
- codecov
- pytest-cov
- isort
- mypy
- pytest
- pytest-cov
15 changes: 9 additions & 6 deletions devtools/conda-envs/min-ver-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ channels:
- conda-forge
dependencies:
# Base depends
- python
- numpy
- python >=3.9
- numpy >=1.23
- nomkl

# Backends
- tensorflow ==1.14.*
- dask ==1.1.*
- tensorflow-cpu ==2.10.*
- dask ==2021.*

# Testing
- pytest
- autoflake
- black
- codecov
- pytest-cov
- isort
- mypy
- pytest
- pytest-cov
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

44 changes: 22 additions & 22 deletions docs/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,81 @@
### `opt_einsum.contract`

::: opt_einsum.contract
:docstring:
<!-- :docstring: -->

### `opt_einsum.contract_path`

::: opt_einsum.contract_path
:docstring:
<!-- :docstring: -->

### `opt_einsum.contract_expression`

::: opt_einsum.contract_expression
:docstring:
:members:
<!-- :docstring:
:members: -->

### `opt_einsum.contract.ContractExpression`

::: opt_einsum.contract.ContractExpression
:docstring:
:members:
<!-- :docstring:
:members: -->

### `opt_einsum.contract.PathInfo`

::: opt_einsum.contract.PathInfo
:docstring:
<!-- :docstring: -->

### `opt_einsum.get_symbol`

::: opt_einsum.get_symbol
:docstring:
<!-- :docstring: -->

### `opt_einsum.shared_intermediates`

::: opt_einsum.shared_intermediates
:docstring:
<!-- :docstring: -->

### `opt_einsum.paths.optimal`

::: opt_einsum.paths.optimal
:docstring:
<!-- :docstring: -->

### `opt_einsum.paths.greedy`

::: opt_einsum.paths.greedy
:docstring:
<!-- :docstring: -->

### `opt_einsum.paths.branch`

::: opt_einsum.paths.branch
:docstring:
<!-- :docstring: -->

### `opt_einsum.paths.PathOptimizer`

::: opt_einsum.paths.PathOptimizer
:docstring:
:members:
<!-- :docstring:
:members: -->

### `opt_einsum.paths.BranchBound`

::: opt_einsum.paths.BranchBound
:docstring:
:members:
<!-- :docstring:
:members: -->

### `opt_einsum.path_random.RandomOptimizer`

::: opt_einsum.path_random.RandomOptimizer
:docstring:
:members:
<!-- :docstring:
:members: -->

### `opt_einsum.path_random.RandomGreedy`

::: opt_einsum.path_random.RandomGreedy
:docstring:
:members:
<!-- :docstring:
:members: -->

### `opt_einsum.paths.DynamicProgramming`

::: opt_einsum.paths.DynamicProgramming
:docstring:
:members:
<!-- :docstring:
:members: -->
4 changes: 2 additions & 2 deletions docs/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ black
devtools
markdown==3.*
markdown-include==0.*
mkautodoc==0.1.*
mkdocstrings[python]==0.25.*
mkdocs==1.*
mkdocs-awesome-pages-plugin==2.*
mkdocs-exclude==1.*
mkdocs-material==5.*
mkdocs-material==9.*
pygments==2.*
14 changes: 10 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ theme:
name: material

plugins:
- search
- awesome-pages
- search
- awesome-pages
- mkdocstrings:
default_handler: python
handlers:
python:
# paths: [opt_einsum]
options:
docstring_style: google

extra_javascript:
- javascripts/config.js
- javascript/config.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

Expand All @@ -29,7 +36,6 @@ markdown_extensions:
- pymdownx.extra
- pymdownx.arithmatex:
generic: true
- mkautodoc

nav:
- Overview: index.md
Expand Down
2 changes: 1 addition & 1 deletion opt_einsum/blas.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def can_blas(
inputs: List[str],
result: str,
idx_removed: ArrayIndexType,
shapes: Sequence[Tuple[int]] = None,
shapes: Union[Sequence[Tuple[int]], None] = None,
) -> Union[str, bool]:
"""
Checks if we can use a BLAS call.
Expand Down
Loading
Loading