Skip to content

Commit

Permalink
pre-commit run --all-files
Browse files Browse the repository at this point in the history
  • Loading branch information
maurosilber committed Jun 13, 2024
1 parent cd06207 commit bca5ca1
Show file tree
Hide file tree
Showing 40 changed files with 192 additions and 213 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[run]
omit = nbkode/testsuite/*

1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ jobs:

- name: Doc Tests
run: sphinx-build -a -j auto -b doctest -d build/doctrees docs build/doctest

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- name: Lint
uses: pre-commit/action@v2.0.0
with:
extra_args: --all-files --show-diff-on-failure
extra_args: --all-files --show-diff-on-failure
4 changes: 2 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ numbakit-ode Changelog
----------------

- Moved t_bound check to Solver class.
- Created ALIAS API to allow multiple names for solvers while keeping
- Created ALIAS API to allow multiple names for solvers while keeping
a preferred one.
- Changed import system in module..
- Changed import system in module..
- Reorganized solvers into multistep and rungekutta.


Expand Down
10 changes: 5 additions & 5 deletions benchmarks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
benchmarks
~~~~~~~~~~
benchmarks
~~~~~~~~~~
Measure, as much as you can.
Measure, as much as you can.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
10 changes: 5 additions & 5 deletions benchmarks/against_scipy.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
benchmarks.against_scipy
~~~~~~~~~~~~~~~~~~~~~~~~
benchmarks.against_scipy
~~~~~~~~~~~~~~~~~~~~~~~~
Comparisons using SciPy as a gold standard.
Comparisons using SciPy as a gold standard.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

import numpy as np
Expand Down
9 changes: 4 additions & 5 deletions benchmarks/common.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"""
benchmarks.common
~~~~~~~~~~~~~~~~~
benchmarks.common
~~~~~~~~~~~~~~~~~
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""


from enum import IntEnum, auto


Expand Down
9 changes: 4 additions & 5 deletions benchmarks/nbcompat.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
benchmarks.nbcompat
~~~~~~~~~~~~~~~~~~~
benchmarks.nbcompat
~~~~~~~~~~~~~~~~~~~
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from numba import njit
Expand Down Expand Up @@ -35,7 +35,6 @@ def njit_newton(func, x0, fprime):


class Suite:

param_names = "variant", "numba"
params = (["scipy", "simple", "nbkode"], [True, False])

Expand Down
10 changes: 5 additions & 5 deletions benchmarks/numba.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
benchmarks.against_scipy
~~~~~~~~~~~~~~~~~~~~~~~~
benchmarks.against_scipy
~~~~~~~~~~~~~~~~~~~~~~~~
Comparisons of the different methods with and without numba.
Comparisons of the different methods with and without numba.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

import os
Expand Down
2 changes: 0 additions & 2 deletions docs/_templates/sidebarintro.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ <h3>Useful Links</h3>
<li><a href="https://github.com/hgrecco/numbakit-ode">Code in GitHub</a></li>
<li><a href="https://github.com/hgrecco/numbakit-ode/issues">Issue Tracker</a></li>
</ul>


50 changes: 25 additions & 25 deletions docs/_themes/flask/static/flasky.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

{% set page_width = '940px' %}
{% set sidebar_width = '220px' %}

@import url("basic.css");

/* -- page layout ----------------------------------------------------------- */

body {
font-family: 'Georgia', serif;
font-size: 17px;
Expand Down Expand Up @@ -43,7 +43,7 @@ div.sphinxsidebar {
hr {
border: 1px solid #B1B4B6;
}

div.body {
background-color: #ffffff;
color: #3E4349;
Expand All @@ -54,7 +54,7 @@ img.floatingflask {
padding: 0 0 10px 10px;
float: right;
}

div.footer {
width: {{ page_width }};
margin: 20px auto 30px auto;
Expand All @@ -70,7 +70,7 @@ div.footer a {
div.related {
display: none;
}

div.sphinxsidebar a {
color: #444;
text-decoration: none;
Expand All @@ -80,7 +80,7 @@ div.sphinxsidebar a {
div.sphinxsidebar a:hover {
border-bottom: 1px solid #999;
}

div.sphinxsidebar {
font-size: 14px;
line-height: 1.5;
Expand All @@ -95,7 +95,7 @@ div.sphinxsidebarwrapper p.logo {
margin: 0;
text-align: center;
}

div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: 'Garamond', 'Georgia', serif;
Expand All @@ -109,7 +109,7 @@ div.sphinxsidebar h4 {
div.sphinxsidebar h4 {
font-size: 20px;
}

div.sphinxsidebar h3 a {
color: #444;
}
Expand All @@ -120,7 +120,7 @@ div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}

div.sphinxsidebar p {
color: #555;
margin: 10px 0;
Expand All @@ -131,25 +131,25 @@ div.sphinxsidebar ul {
padding: 0;
color: #000;
}

div.sphinxsidebar input {
border: 1px solid #ccc;
font-family: 'Georgia', serif;
font-size: 1em;
}

/* -- body styles ----------------------------------------------------------- */

a {
color: #004B6B;
text-decoration: underline;
}

a:hover {
color: #6D4100;
text-decoration: underline;
}

div.body h1,
div.body h2,
div.body h3,
Expand All @@ -169,25 +169,25 @@ div.indexwrapper h1 {
height: {{ theme_index_logo_height }};
}
{% endif %}

div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }

a.headerlink {
color: #ddd;
padding: 0 4px;
text-decoration: none;
}

a.headerlink:hover {
color: #444;
background: #eaeaea;
}

div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
Expand Down Expand Up @@ -234,20 +234,20 @@ div.note {
background-color: #eee;
border: 1px solid #ccc;
}

div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}

div.topic {
background-color: #eee;
}

p.admonition-title {
display: inline;
}

p.admonition-title:after {
content: ":";
}
Expand Down Expand Up @@ -341,7 +341,7 @@ ul, ol {
margin: 10px 0 10px 30px;
padding: 0;
}

pre {
background: #eee;
padding: 7px 30px;
Expand All @@ -358,7 +358,7 @@ dl dl pre {
margin-left: -90px;
padding-left: 90px;
}

tt {
background-color: #ecf0f3;
color: #222;
Expand Down
2 changes: 1 addition & 1 deletion docs/_themes/flask/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pygments_style = flask_theme_support.FlaskyStyle
[options]
index_logo = ''
index_logo_height = 120px
touch_icon =
touch_icon =
github_fork = hgrecco/numbakit-ode
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import datetime
import warnings

import numba

warnings.filterwarnings("ignore", category=numba.NumbaExperimentalFeatureWarning)

import datetime

try:
from importlib.metadata import version
Expand Down
1 change: 0 additions & 1 deletion docs/developers_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ Variable step
|
.. autoclass:: nbkode.RungeKutta45

4 changes: 2 additions & 2 deletions docs/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ are found.
>>> print(t_events[0]) # hit ground time # doctest: +SKIP
>>> print(t_events[1]) # apex time # doctest: +SKIP

.. note::
.. note::
**Important**

Event callables are compiled into the tight loop that runs the simulation
using Numba. Therefore, just like the ODE rhs, these callables **must**
compatible with Numba jit in nopython mode (`njit`)
compatible with Numba jit in nopython mode (`njit`)
2 changes: 0 additions & 2 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,3 @@ code.
.. _`SciPy Integrate`: https://docs.scipy.org/doc/scipy/reference/integrate.html
.. _`Numba`: https://numba.pydata.org/
.. _`benchmarks`: https://hgrecco.github.io/numbakit-ode/


6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
matplotlib
nbsphinx
numpy
numba
scipy
pytest
numpy
pygments>=2.4
pytest
scipy
3 changes: 1 addition & 2 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ the integrator.

.. doctest::

>>> y0 = 1.
>>> y0 = 1.
>>> p = -0.1
>>> t0 = 0
>>> solver = nbkode.RungeKutta45(rhs, t0, y0, params=p)
Expand Down Expand Up @@ -220,4 +220,3 @@ To get a list of the groups:

>>> nbkode.get_groups()
('Adams-Bashforth', 'Adams-Moulton', 'BDF', 'Euler', 'Runge-Kutta')

14 changes: 7 additions & 7 deletions nbkode/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
nbkode
~~~~~~
nbkode
~~~~~~
numbakit-ode (nbkode) is a Python package to solve
**ordinary differential equations (ODE)** that uses
numba to compile code and therefore speed up calculations.
numbakit-ode (nbkode) is a Python package to solve
**ordinary differential equations (ODE)** that uses
numba to compile code and therefore speed up calculations.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

# These imports are necessary as only when corresponding module is imported
Expand Down
Loading

0 comments on commit bca5ca1

Please sign in to comment.