Closed sea-bass closed 1 year ago
Thank you for your feedback! I have worked on all the points:
Looks great -- thanks for doing this!
On the readthedocs page, when you are using simulate()
there is no animation that appears. But I'm fine with that if there is a limitation in the Jupyter notebooks render.
Good! To manage that I have included an argument in simulate()
, so, now they are able to appear on the readthedocs page 😃
Thank you for submitting
pyswarming
to JOSS! As one of your reviewers, I'll collect a few issues here with the "getting started" code examples.Gentler Introduction to
simulate()
vs. custom animationThe first few examples are super simple, and that is fantastic! But then it very quickly turns into a more complicated setup that requires custom animation functions, starting poses, etc. and I felt like I missed some explanation.
Based on my understanding (and maybe I am missing something): It might be worth saying that there is a "simple" method where you create a swarm and then call
simulate()
which handles a lot the work for simple behaviors. However, there is also a more custom workflow of defining your own animation function along with your behaviors, and then calling the matplotlibanimation.FuncAnimation()
.So my feedback here is to maybe document the general approaches a little better and give users some direction on when to use which approach.
Using named arguments
All the doc examples use this format:
However, you are already using named arguments, and I could argue that this could be made clearer using something like this
I also have a question here... where does this +- 5.0 meters in the
deployment_point
come in? Might be good to explicitly define that in the examples as well, and say that the orientation distribution is similarly between 0 to 2*pi. See https://github.com/mrsonandrade/pyswarming/issues/1 for more details.No globals
Instead of defining
global r
and then using a function calledanimate()
, consider maybe passingr
in as an input argument? Also, using single letter variables is often not very descriptive, you could call thisrobot_poses
or something.So, for example:
Provide More Variety of Examples
Right now, there is just one Jupyter notebook in the repo's
Examples
directory, but it might be better if you split out multiple examples into different files so people can run just the parts they care about.Also, it would be great if you could offer the examples in plain text (
.py
) files as well. For example, I wasn't able to get the matplotlib animations working in the Jupyter notebooks running directly in VSCode, and I'm too lazy as a user to go figure this out just to run some quick examples.Small issues
import numpy as np
but instead they directly start usingnp
in the code. Just add a quick line at the beginning where needed.import pyswarming.behaviors as ps
is a bit confusing to me... instead ofps
, should this bepb
or something? It also is not consistent withimport pyswarming as sw
. Consider making this a little more consistent.https://github.com/openjournals/joss-reviews/issues/5647