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

Updates for latest heyoka changes #183

Merged
merged 25 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c5046ac
Bump to 5.1.0 for development.
bluescarni Jun 22, 2024
9140502
Expose and test relational/logical operators and select().
bluescarni Jul 5, 2024
35529b3
Merge remote-tracking branch 'origin/main' into pr/updates
bluescarni Jul 5, 2024
9d40e54
Update changelog.
bluescarni Jul 5, 2024
12563aa
Disable a tutorial execution due to a pykep failure.
bluescarni Jul 5, 2024
f28ac73
Another changelog update.
bluescarni Jul 5, 2024
a50adfb
Expose the sgp4 model function.
bluescarni Jul 5, 2024
343bd82
Attempt to work around pykep failures.
bluescarni Jul 5, 2024
1e17b70
Try switching to newer manylinux.
bluescarni Jul 5, 2024
22737d6
Reduce repetition in keyword arguments.
bluescarni Jul 5, 2024
812c1b5
Add workaround to ensure the '__call__' method shows up in autosmmary.
bluescarni Jul 8, 2024
1b3ca0a
Fix typo.
bluescarni Jul 11, 2024
013902b
Small docs additions/fixes.
bluescarni Jul 11, 2024
52b98ec
Again small tweaks.
bluescarni Jul 11, 2024
9d46539
Expose, test and document the SGP4 propagator.
bluescarni Jul 16, 2024
af4ed4e
Pin fmt<11, add skyfield to the CI.
bluescarni Jul 16, 2024
862456d
Fix test, update sympy conversion code for latest sympy changes.
bluescarni Jul 16, 2024
1dbfa97
Update changelog.
bluescarni Jul 16, 2024
e8a9d9f
Small notebook update.
bluescarni Jul 16, 2024
c4bc18e
Ensure the sgp4 propagator is tested when building the wheels.
bluescarni Jul 16, 2024
0c9de72
Ping for testing CI with the latest heyoka.
bluescarni Jul 16, 2024
20a887e
Fix missing shape check, improve logic in the implementation of the s…
bluescarni Jul 18, 2024
3384e75
Test addition.
bluescarni Jul 18, 2024
47c65f2
Expose replace_sat_data().
bluescarni Jul 19, 2024
742a9e5
Adapt sgp4 docs/tutorial for bstar diff, tutorial additions.
bluescarni Jul 19, 2024
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
22 changes: 11 additions & 11 deletions .github/workflows/gh_actions_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha_osx_heyoka_head_static.sh
manylinux2014-py312:
manylinux228_x86_64-py312:
runs-on: ubuntu-latest
container:
image: pagmo2/manylinux2014_x86_64_with_deps:latest
image: pagmo2/manylinux228_x86_64_with_deps:latest
env:
HEYOKA_PY_BUILD_TYPE: "Python312"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand All @@ -51,10 +51,10 @@ jobs:
with:
name: wheel_312
path: build/wheel/dist2/*.whl
manylinux2014-py311:
manylinux228_x86_64-py311:
runs-on: ubuntu-latest
container:
image: pagmo2/manylinux2014_x86_64_with_deps:latest
image: pagmo2/manylinux228_x86_64_with_deps:latest
env:
HEYOKA_PY_BUILD_TYPE: "Python311"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand All @@ -66,10 +66,10 @@ jobs:
with:
name: wheel_311
path: build/wheel/dist2/*.whl
manylinux2014-py310:
manylinux228_x86_64-py310:
runs-on: ubuntu-latest
container:
image: pagmo2/manylinux2014_x86_64_with_deps:latest
image: pagmo2/manylinux228_x86_64_with_deps:latest
env:
HEYOKA_PY_BUILD_TYPE: "Python310"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand All @@ -81,10 +81,10 @@ jobs:
with:
name: wheel_310
path: build/wheel/dist2/*.whl
manylinux2014-py39:
manylinux228_x86_64-py39:
runs-on: ubuntu-latest
container:
image: pagmo2/manylinux2014_x86_64_with_deps:latest
image: pagmo2/manylinux228_x86_64_with_deps:latest
env:
HEYOKA_PY_BUILD_TYPE: "Python39"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand All @@ -96,10 +96,10 @@ jobs:
with:
name: wheel_39
path: build/wheel/dist2/*.whl
manylinux2014-py38:
manylinux228_x86_64-py38:
runs-on: ubuntu-latest
container:
image: pagmo2/manylinux2014_x86_64_with_deps:latest
image: pagmo2/manylinux228_x86_64_with_deps:latest
env:
HEYOKA_PY_BUILD_TYPE: "Python38"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand All @@ -125,7 +125,7 @@ jobs:
- name: Build
shell: pwsh
run: |
conda install -y python=3.10 git pybind11 numpy<2 cmake llvmdev tbb-devel tbb astroquery libboost-devel fmt spdlog sleef sympy cloudpickle zlib libzlib 'mppp=1.*' numba
conda install -y python=3.10 git pybind11 numpy<2 cmake llvmdev tbb-devel tbb astroquery libboost-devel fmt<11 skyfield spdlog sleef sympy cloudpickle zlib libzlib 'mppp=1.*' numba
git clone --depth 1 https://github.com/bluescarni/heyoka.git heyoka_cpp
cd heyoka_cpp
mkdir build
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE)
endif()

project(heyoka.py VERSION 5.0.1 LANGUAGES CXX C)
project(heyoka.py VERSION 5.1.0 LANGUAGES CXX C)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/yacma")

Expand Down Expand Up @@ -118,7 +118,7 @@ find_package(fmt REQUIRED CONFIG)
message(STATUS "fmt version: ${fmt_VERSION}")

# heyoka.
find_package(heyoka 5.0.0 REQUIRED CONFIG)
find_package(heyoka 5.1.0 REQUIRED CONFIG)

# Python.

Expand Down
14 changes: 10 additions & 4 deletions doc/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@

.. autoclass:: {{ objname }}
:members:
:special-members: __init__
:special-members: __init__, __call__

{% block methods %}
{% if methods %}
{# We go through this circumlocution because __call__ for some reason #}
{# does not show up in the list of methods, only in the list of members. #}
{# If we do not do this, the full documentation of __call__ will show up, #}
{# but its entry in autosummary will not. #}
{% if methods or '__call__' in members %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
{% for item in methods %}
~{{ name }}.{{ item }}
{% for item in members %}
{% if item in methods or item == '__call__' %}
~{{ name }}.{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}
Expand Down
48 changes: 48 additions & 0 deletions doc/api_common_kwargs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.. _api_common_kwargs:

Common keyword arguments
========================

Several sets of keyword arguments appear multiple times in the API docs for heyoka.py's
classes and functions. This page documents these common sets.

.. _api_common_kwargs_fp_type:

The ``fp_type`` kwarg
---------------------

Several classes and functions in heyoka.py allow to select the floating-point type to be used in
the computations (as seen, for instance, in the :ref:`extended precision tutorial<ext_precision_tutorial>`).

The floating-point type is selected via the ``fp_type`` keyword argument, which must
be one of the floating-point types supported by heyoka.py. The types :py:class:`float`
(double precision) and :py:class:`numpy.single` (single precision) are always available,
while support for other floating-point types varies depending on the platform and on
the installed optional dependencies.

By default, ``fp_type`` is always
:py:class:`float` - that is, heyoka.py operates by default in double precision.

.. _api_common_kwargs_llvm:

LLVM kwargs
-----------

These are keyword arguments influencing just-in-time (JIT) compilation via LLVM.

- ``opt_level``: an integer in the [0, 3] range, representing the optimisation
level to be employed during JIT compilation. Lower optimisation levels
result in slower code and faster compilation times, and viceversa, higher optimisation
levels result in faster code and slower compilation time. The default value is 3.
- ``slp_vectorize``: a boolean flag indicating whether or not to enable the LLVM
`SLP vectorizer <https://llvm.org/docs/Vectorizers.html#the-slp-vectorizer>`__.
The SLP vectorizer can improve performance in some situations, but it results
in longer compilation times. The default value is ``False``.
- ``fast_math``: a boolean flag indicating whether or not to enable optimisations
which may improve floating-point performance at the expense of accuracy and/or strict conformance
to the IEEE 754 standard. The default value is ``False``.

.. _api_common_kwargs_cfunc:

``cfunc`` kwargs
----------------
12 changes: 12 additions & 0 deletions doc/api_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ Models

.. currentmodule:: heyoka.model

Classes
-------

.. autosummary::
:toctree: autosummary_generated
:template: custom-class-template.rst

sgp4_propagator_dbl
sgp4_propagator_flt

Functions
---------

Expand All @@ -16,3 +26,5 @@ Functions
jb08_tn
fixed_centres
pendulum
sgp4
sgp4_propagator
30 changes: 30 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
Changelog
=========

5.1.0 (unreleased)
------------------

New
~~~

- Add a fully differentiable implementation of the SGP4 analytical propagator
(`#183 <https://github.com/bluescarni/heyoka.py/pull/183>`__).
- Add the ``select()`` primitive to the expression system
(`#183 <https://github.com/bluescarni/heyoka.py/pull/183>`__).
- Add relational and logical operators to the expression system
(`#183 <https://github.com/bluescarni/heyoka.py/pull/183>`__).
- Add tutorial on Taylor map inversion
(`#182 <https://github.com/bluescarni/heyoka.py/pull/182>`__).
- Add tutorial on solving inversion problems with the variational equations
(`#181 <https://github.com/bluescarni/heyoka.py/pull/181>`__).

Changes
~~~~~~~

- heyoka.py now requires version 5.1.0 of the
heyoka C++ library
(`#183 <https://github.com/bluescarni/heyoka.py/pull/183>`__).

Fix
~~~

- Fix test failures when using recent SymPy versions
(`#183 <https://github.com/bluescarni/heyoka.py/pull/183>`__).

5.0.1 (2024-06-14)
------------------

Expand Down
5 changes: 4 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@
"Pseudo arc-length continuation*",
"torch_and_heyoka*",
"differentiable_atm*",
"thermoNETs*"
"thermoNETs*",
# NOTE: the sgp4 notebook runs
# some benchmarks.
"sgp4_propagator*",
]

# Force printing traceback to stderr on execution error.
Expand Down
1 change: 1 addition & 0 deletions doc/examples_astro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ Celestial mechanics and astrodynamics
notebooks/tides_spokes
notebooks/lagrangian_propagator
notebooks/gg_stab
notebooks/sgp4_propagator
1 change: 1 addition & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ examples_others
:maxdepth: 2
:caption: API reference

api_common_kwargs
api_exsys
api_integrators
api_var_ode_sys
Expand Down
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Dependencies
heyoka.py has several Python and C++ dependencies. On the C++ side, heyoka.py depends on:

* the `heyoka C++ library <https://github.com/bluescarni/heyoka>`__,
version 5.0.x (**mandatory**),
version 5.1.x (**mandatory**),
* the `Boost <https://www.boost.org/>`__ C++ libraries (**mandatory**),
* the `{fmt} <https://fmt.dev/latest/index.html>`__ library (**mandatory**),
* the `TBB <https://github.com/oneapi-src/oneTBB>`__ library (**mandatory**),
Expand Down
4 changes: 3 additions & 1 deletion doc/notebooks/ext_precision.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"id": "0df37c9b-35ed-4cff-8c17-bfecbebdfc47",
"metadata": {},
"source": [
"(ext_precision_tutorial)=\n",
"\n",
"Computations in extended precision\n",
"==================================\n",
"\n",
Expand Down Expand Up @@ -413,7 +415,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
Loading
Loading