ilikecubesnstuff / commensurability

Packages for calculating orbit commensurabilities.
https://commensurability.readthedocs.io/en/latest/
MIT License
2 stars 2 forks source link

🔥 docs error #18

Closed nstarman closed 2 weeks ago

nstarman commented 3 months ago

I'm trying to reproduce the example figure (which comes from https://commensurability.readthedocs.io/en/latest/tessellation/usage/analysis/rotating_bar/#adding-a-rotating-bar-to-a-potential) so I'm running that from the top.

I'm encountering the error:

tanal = TessellationAnalysis2D(
    initial_condition,
    values,
    potential_definition,
    dt,
    steps,
    pattern_speed=omega,
    chunksize=500,
    mpchunksize=20,
)

produces the error TypeError: MPAnalysisBase.__init__() got an unexpected keyword argument 'chunksize'

Please update the docs to fix this example.

— openjournals/joss-reviews#7009

ilikecubesnstuff commented 2 months ago

Changing chunksize and mpchunksize to pidgey_chunksize and mp_chunksize respectively should fix this error.

tanal = TessellationAnalysis2D(
    initial_condition,
    values,
    potential_definition,
    dt,
    steps,
    pattern_speed=omega,
    pidgey_chunksize=500,
    mp_chunksize=20,
)

The chunk size parameters were renamed in 110e3c92ffeb08bac08299454bcf30bd48f719fa to make the package they are being passed to (pidgey vs multiprocessing) clearer, but it appears that the corresponding pull request did not update the documentation to reflect these changes.

That being said, I am having issues installing Agama on my device (specifically, I updated my Agama version which broke the examples, but older versions throw errors during the installation process) so I cannot currently reproduce the figures either. I can look into updating the readthedocs code and figures with a more recent Agama version when I have time.