optimagic-dev / optimagic

optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and other packages. optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get diagnostic tools, parallel numerical derivatives and more.
https://optimagic.readthedocs.io/
MIT License
270 stars 30 forks source link

Fix documentation #487

Closed timmens closed 9 months ago

timmens commented 9 months ago

In this PR, we fix the API section of the documentation.

What happened?

In our documentation, we use mock imports. From the sphinx docs:

This is useful when some external dependencies are not met at build time and break the building process. You may only specify the root package of the dependencies themselves and omit the sub-modules:

However, mocked modules cannot be used during build time. This was not a problem until a few weeks ago when plotly started checking pandas version numbers (mocked for our documentation), which requires the execution of pandas code --- namely pandas.__version__ --- during build time. My unawareness of what was actually happening led me to restrict the plotly version (see #480).

In #482, I added code to estimagic that also checked the pandas version numbers, leading to the same problem as before.

Fix

Remove pandas from the list of mock imports.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.98%. Comparing base (656319d) to head (f77fa22).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #487 +/- ## ======================================= Coverage 92.98% 92.98% ======================================= Files 194 194 Lines 14649 14649 ======================================= Hits 13621 13621 Misses 1028 1028 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.