Skip to content

Conversation

@reint-fischer
Copy link
Contributor

I have added the delayed start and output tutorials, which was made possible by fixes in #2333

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notebook looks good! Just one minor suggestions to use actual dates in the animations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, including a few remaining time output edits since decode_times was fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a very nice notebooks! Some suggestions:

  1. "The user is ..." is a bit formal language. Change that to "Users are". More fundamentally, we could discuss whether to use second-person ("you") throughout the tutorials? What do other tutorials/documentation use?
  2. Make clear that adding the custom metadata needs to be done before the pset.execute()?
  3. A small type in "Note when when ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this, I had left it from the v3 version. I like omitting “user”, many packages seem to be using “we”, which we also do a lot already. I like it as an inclusive way of writing, as we the writers are also users explaining Parcels to ourselves and each other.

Some other packages use the second-person (“we guide you how to ...”), which I think also reads nicely, but has a bit more of a top-down tone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like the "we" form, especially if other packages use it too. Would be good to keep that as a consistent style throughout our tutorials. Perhaps we should/could also create a short styleguide for our tutorials?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh really? I didn't realise that. Then no need to mention it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm my comment about pset.execute()..

I was also considering a short styleguide for the tutorials, we can add it under the maintainer documentation section of development?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this tutorial be in examples (instead of examples_v3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I have not been able to implement adding particles to the particleset during the execution, so this is just a placeholder for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the last cell, I'm getting an error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[16], [line 132](vscode-notebook-cell:?execution_count=16&line=132)
    128         scatter.set_offsets(np.empty((0, 2)))
    131 # Create animation
--> [132](vscode-notebook-cell:?execution_count=16&line=132) anim = matplotlib.animation.FuncAnimation(fig, animate, frames=nframes, interval=100)
    133 anim

File ~/Codes/ParcelsCode/.pixi/envs/test-latest/lib/python3.11/site-packages/matplotlib/_api/__init__.py:218, in caching_module_getattr.<locals>.__getattr__(name)
    216 if name in props:
    217     return props[name].__get__(instance)
--> [218](https://file+.vscode-resource.vscode-cdn.net/Users/erik/Codes/ParcelsCode/docs/examples/~/Codes/ParcelsCode/.pixi/envs/test-latest/lib/python3.11/site-packages/matplotlib/_api/__init__.py:218) raise AttributeError(
    219     f"module {cls.__module__!r} has no attribute {name!r}")

AttributeError: module 'matplotlib' has no attribute 'animation'

@reint-fischer
Copy link
Contributor Author

The unit tests on mac are taking forever, is this common?

[Unit tests: mac | pixi run -e test-latest tests](https://github.com/Parcels-code/Parcels/pull/2357#logs)
Started 22h 9m 25s ago
Requested labels: mac-latest
Job defined at: Parcels-code/Parcels/.github/workflows/ci.yml@refs/pull/2357/merge
Waiting for a runner to pick up this job…

@erikvansebille
Copy link
Member

Yes, we've seen this before. I think @VeckoTheGecko is working on a fix. But in the meantime, you don't need to wait for CI success on macOS; you can merge as soon as you have green ticks on the ubuntu platforms

@reint-fischer reint-fischer merged commit 2a0eb26 into Parcels-code:v4-dev Nov 5, 2025
10 of 11 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Parcels development Nov 5, 2025
@VeckoTheGecko
Copy link
Contributor

Yes, we've seen this before. I think @VeckoTheGecko is working on a fix.

Have we seen this before?

I don't think there is a fix to this - its just the availability of Mac runners from github. If this becomes persistent then I can ask around if others are encountering the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants