Skip to content

Commit bdbc84a

Browse files
authored
Merge pull request #175 from esa/develop
develop -> release for Release 0.4.0
2 parents 5777af1 + e3254a2 commit bdbc84a

36 files changed

+1781
-452
lines changed

.github/ISSUE_TEMPLATE/release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ _to be written during release process_
1515
## What Needs to Be Done (chronologically)
1616

1717
- [ ] Create PR from `main` -> `develop` to incorporate hotfixes / documentation changes.
18-
- [ ] In case of merge conflicts create PR to fix them which is then merged into main.
18+
- [ ] In case of merge conflicts create PR to fix them which is then merged into main / fix on GitHub but make sure to let it create a new branch for the changes.
1919
- [ ] Review the PR
2020
- [ ] Create PR to merge from current develop into release branch
2121
- [ ] Write Changelog in PR and request review
@@ -25,7 +25,7 @@ _to be written during release process_
2525
- [ ] Check documentation -> Check presence of documentation for all features by locally building the docs on the release
2626
- [ ] Change version number in setup.py and docs (under conf.py)
2727
- [ ] Trigger the Upload Python Package to testpypi GitHub Action (https://github.com/esa/torchquad/actions/workflows/deploy_to_test_pypi.yml) on the release branch (need to be logged in)
28-
- [ ] Test the build on testpypi
28+
- [ ] Test the build on testpypi (with `pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple torchquad`)
2929
- [ ] Finalize release on the release branch
3030
- [ ] Create PR: release → main , develop -> main
3131
- [ ] PR Reviews

.github/workflows/autoblack.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,3 @@ jobs:
1818
run: pip install black
1919
- name: Run black --check .
2020
run: black --check .
21-
- name: If needed, commit black changes to the pull request
22-
if: failure()
23-
run: |
24-
black .
25-
git config --global user.name 'htoftevaag'
26-
git config --global user.email '[email protected]'
27-
git remote set-url origin https://x-access-token:${{ secrets.Autoblack_access_token }}@github.com/$GITHUB_REPOSITORY
28-
git checkout $GITHUB_HEAD_REF
29-
git commit -am "WORKFLOW: Format Python code with black"
30-
git push

.github/workflows/run_tests.yml

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,69 @@ name: Running tests
66
on:
77
push:
88
branches:
9-
- main
10-
- develop
9+
- main
10+
- develop
1111
pull_request:
1212
workflow_dispatch:
1313
jobs:
1414
lint_flake8:
15-
1615
runs-on: ubuntu-latest
1716

1817
steps:
19-
- uses: actions/checkout@v2
20-
- name: Set up Python 3.9
21-
uses: actions/setup-python@v2
22-
with:
23-
python-version: 3.9
24-
- name: Lint with flake8
25-
run: |
26-
pip install flake8
27-
flake8 . --count --show-source --statistics
18+
- uses: actions/checkout@v2
19+
- name: Set up Python 3.9
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.9
23+
- name: Lint with flake8
24+
run: |
25+
pip install flake8
26+
flake8 . --count --show-source --statistics
2827
2928
build:
30-
3129
runs-on: ubuntu-latest
32-
30+
permissions:
31+
pull-requests: write
32+
contents: read
33+
id-token: write
3334
steps:
34-
- uses: actions/checkout@v2
35-
- name: Set up Python 3.9
36-
uses: actions/setup-python@v2
37-
with:
38-
python-version: 3.9
39-
- name: Search for severe code errors with flake8
40-
run: |
41-
# stop the build if there are Python syntax errors or undefined names
42-
pip install flake8
43-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
44-
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
45-
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
46-
- name: Install dependencies
47-
run: |
48-
$CONDA/bin/conda env update --file environment_all_backends.yml --name base
49-
- name: Test with pytest
50-
run: |
51-
cd torchquad/tests
52-
conda install pytest
53-
$CONDA/bin/pip3 install pytest-error-for-skips
54-
$CONDA/bin/pytest -ra --error-for-skips
35+
- uses: actions/checkout@v2
36+
- name: Set up Python 3.9
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: 3.9
40+
- name: Search for severe code errors with flake8
41+
run: |
42+
# stop the build if there are Python syntax errors or undefined names
43+
pip install flake8
44+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
45+
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
46+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
47+
- name: provision-with-micromamba
48+
uses: mamba-org/provision-with-micromamba@main
49+
with:
50+
environment-file: environment_all_backends.yml
51+
environment-name: torchquad
52+
cache-downloads: true
53+
- name: Test with pytest
54+
shell: bash -l {0}
55+
run: |
56+
micromamba activate torchquad
57+
cd torchquad/tests/
58+
pip install pytest
59+
pip install pytest-error-for-skips
60+
pip install pytest-cov
61+
pytest -ra --error-for-skips --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=../../torchquad . | tee pytest-coverage.txt
62+
- name: pytest coverage comment
63+
uses: MishaKav/pytest-coverage-comment@main
64+
if: github.event_name == 'pull_request'
65+
with:
66+
pytest-coverage-path: ./torchquad/tests/pytest-coverage.txt
67+
title: Coverage Report
68+
badge-title: Overall Coverage
69+
hide-badge: false
70+
hide-report: false
71+
create-new-comment: false
72+
hide-comment: false
73+
report-only-changed-files: false
74+
junitxml-path: ./torchquad/tests/pytest.xml

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,6 @@ dmypy.json
129129
.pyre/
130130

131131
my_notebooks
132-
.vscode
132+
.vscode
133+
pytest-coverage.txt
134+
pytest.xml

CITATION.cff

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
title: "torchquad: Numerical Integration in Arbitrary
4+
Dimensions with PyTorch, TensorFlow & JAX"
5+
authors:
6+
- given-names: Pablo
7+
family-names: Gómez
8+
9+
affiliation: >-
10+
Advanced Concepts Team, European Space Agency,
11+
Noordwijk, The Netherlands
12+
orcid: "https://orcid.org/0000-0002-5631-8240"
13+
- given-names: Håvard
14+
family-names: Hem Toftevaag
15+
affiliation: >-
16+
Advanced Concepts Team, European Space Agency,
17+
Noordwijk, The Netherlands
18+
orcid: "http://orcid.org/0000-0003-4692-5722"
19+
- given-names: Gabriele
20+
family-names: Meoni
21+
affiliation: >-
22+
Advanced Concepts Team, European Space Agency,
23+
Noordwijk, The Netherlands
24+
orcid: "http://orcid.org/0000-0001-9311-6392"
25+
repository-code: "https://github.com/esa/torchquad/"
26+
url: "https://www.esa.int/gsp/ACT/open_source/torchquad/"
27+
repository-artifact: "https://anaconda.org/conda-forge/torchquad"
28+
license: GPL-3.0
29+
preferred-citation:
30+
type: article
31+
authors:
32+
- given-names: Pablo
33+
family-names: Gómez
34+
35+
affiliation: >-
36+
Advanced Concepts Team, European Space Agency,
37+
Noordwijk, The Netherlands
38+
orcid: "https://orcid.org/0000-0002-5631-8240"
39+
- given-names: Håvard
40+
family-names: Hem Toftevaag
41+
affiliation: >-
42+
Advanced Concepts Team, European Space Agency,
43+
Noordwijk, The Netherlands
44+
orcid: "http://orcid.org/0000-0003-4692-5722"
45+
- given-names: Gabriele
46+
family-names: Meoni
47+
affiliation: >-
48+
Advanced Concepts Team, European Space Agency,
49+
Noordwijk, The Netherlands
50+
orcid: "http://orcid.org/0000-0001-9311-6392"
51+
doi: "10.21105/joss.03439"
52+
journal: "Journal of Open Source Software"
53+
title: "torchquad: Numerical Integration in Arbitrary
54+
Dimensions with PyTorch"
55+
issue: 6
56+
volume: 64
57+
year: 2021

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*** Based on https://github.com/othneildrew/Best-README-Template
44
-->
55

6-
![Read the Docs (version)](https://img.shields.io/readthedocs/torchquad/main?style=flat-square) ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/esa/torchquad/Running%20tests/main?style=flat-square) ![GitHub last commit](https://img.shields.io/github/last-commit/esa/torchquad?style=flat-square)
6+
![Read the Docs (version)](https://img.shields.io/readthedocs/torchquad/main?style=flat-square) [![Tests](https://github.com/esa/torchquad/actions/workflows/run_tests.yml/badge.svg)](https://github.com/esa/torchquad/actions/workflows/run_tests.yml) ![GitHub last commit](https://img.shields.io/github/last-commit/esa/torchquad?style=flat-square)
77
![GitHub](https://img.shields.io/github/license/esa/torchquad?style=flat-square) ![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/torchquad?style=flat-square) ![PyPI](https://img.shields.io/pypi/v/torchquad?style=flat-square) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/torchquad?style=flat-square)
88

99
![GitHub contributors](https://img.shields.io/github/contributors/esa/torchquad?style=flat-square)
@@ -23,8 +23,6 @@
2323
<a href="https://torchquad.readthedocs.io"><strong>Explore the docs »</strong></a>
2424
<br />
2525
<br />
26-
<a href="https://github.com/esa/torchquad/blob/master/notebooks/Torchquad%20-%20Example%20notebook.ipynb">View Example notebook</a>
27-
·
2826
<a href="https://github.com/esa/torchquad/issues">Report Bug</a>
2927
·
3028
<a href="https://github.com/esa/torchquad/issues">Request Feature</a>
@@ -127,7 +125,7 @@ Note also that installing PyTorch with *pip* may **not** set it up with CUDA sup
127125
Here are installation instructions for other numerical backends:
128126
```sh
129127
conda install "tensorflow>=2.6.0=cuda*" -c conda-forge
130-
pip install "jax[cuda]>=0.2.22" --find-links https://storage.googleapis.com/jax-releases/jax_releases.html # linux only
128+
pip install "jax[cuda]>=0.2.22" --find-links https://storage.googleapis.com/jax-releases/jax_cuda_releases.html # linux only
131129
conda install "numpy>=1.19.5" -c conda-forge
132130
```
133131

@@ -275,7 +273,7 @@ Created by ESA's [Advanced Concepts Team](https://www.esa.int/gsp/ACT/index.html
275273
276274
- Pablo Gómez - `pablo.gomez at esa.int`
277275
- Gabriele Meoni - `gabriele.meoni at esa.int`
278-
- Håvard Hem Toftevaag - `havard.hem.toftevaag at esa.int`
276+
- Håvard Hem Toftevaag
279277
280278
Project Link: [https://github.com/esa/torchquad](https://github.com/esa/torchquad)
281279

docs/source/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Here are installation instructions for other numerical backends:
5757
.. code-block:: bash
5858
5959
conda install "tensorflow>=2.6.0=cuda*" -c conda-forge
60-
pip install "jax[cuda]>=0.2.22" --find-links https://storage.googleapis.com/jax-releases/jax_releases.html # linux only
60+
pip install "jax[cuda]>=0.2.22" --find-links https://storage.googleapis.com/jax-releases/jax_cuda_releases.html # linux only
6161
conda install "numpy>=1.19.5" -c conda-forge
6262
6363
More installation instructions for numerical backends can be found in

docs/source/integration_methods.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,14 @@ Trapezoid Rule
5151
.. autoclass:: torchquad.Trapezoid
5252
:members: integrate
5353
:noindex:
54+
55+
Gaussian Quadrature
56+
^^^^^^^^^^^^^^^^^^^^^^
57+
58+
.. autoclass:: torchquad.Gaussian
59+
:members: integrate, _resize_roots
60+
:noindex:
61+
62+
.. autoclass:: torchquad.GaussLegendre
63+
:members: integrate
64+
:noindex:

0 commit comments

Comments
 (0)