Skip to content

Commit 9f3f77d

Browse files
DOCS: Add guide on sharing dataset metadata (#2510)
Co-authored-by: Erik van Sebille <e.vansebille@uu.nl>
1 parent 9d500d0 commit 9f3f77d

7 files changed

Lines changed: 135 additions & 11 deletions

File tree

.github/ISSUE_TEMPLATE/01_feature.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: 🔼 Parcels feature requests, and other enhancements
2+
description: Suggest an improvement to the Parcels codebase
3+
labels: ["needs-triage"]
4+
body:
5+
- type: input
6+
id: version
7+
attributes:
8+
label: What version of Parcels are you running?
9+
description: |
10+
Please specify the version of Parcels you're currently using (e.g., v3.1.4, main branch, or commit hash). Put "N/A" if not applicable (e.g., for a documentation suggestion).
11+
placeholder: e.g., v3.1.4
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: problem
16+
attributes:
17+
label: Is your feature request related to a problem?
18+
description: |
19+
Please do a quick search of existing issues to make sure that this feature request has not been asked before.
20+
21+
Provide a clear and concise description of what the problem is. For example:
22+
- "I'm trying to simulate particle behavior with [specific physics], but Parcels doesn't support..."
23+
- "When working with [specific data format/kernel], I find it difficult to..."
24+
25+
If you would like to see Parcels work with a specific dataset, please also [follow our instructions on how to share dataset metadata](https://docs.parcels-code.org/en/v4-dev/development/posting-issues.html).
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: solution
30+
attributes:
31+
label: Describe the solution you'd like
32+
description: |
33+
A clear and concise description of what you want to happen. Include details about:
34+
- How you envision using this feature in your Parcels simulations
35+
- What the API or interface might look like
36+
- Any specific use cases or scientific applications this would enable
37+
validations:
38+
required: true
39+
- type: textarea
40+
id: alternatives
41+
attributes:
42+
label: Describe alternatives you've considered
43+
description: |
44+
A clear and concise description of any alternative solutions or features you've considered. For example:
45+
- Workarounds you're currently using
46+
- Other ocean/particle modeling tools that have this feature
47+
- Different approaches to solving the same problem
48+
validations:
49+
required: false
50+
- type: textarea
51+
id: additional-context
52+
attributes:
53+
label: Additional context
54+
description: |
55+
Add any other context about the feature request here. This might include:
56+
- Links to relevant scientific papers or methods
57+
- Example code snippets showing how you'd like to use this feature
58+
- Screenshots or diagrams illustrating the concept
59+
- Information about your use case or research domain
60+
validations:
61+
required: false

.github/ISSUE_TEMPLATE/02_bug.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body:
1717
- type: "textarea"
1818
attributes:
1919
label: "Code sample"
20-
description: "If relevant, please provide a code example where this bug is shown as well as any error message. A [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) is preffered as it makes it much easier for developers to identify the cause of the bug. This also allows them quickly determine whether the problem is with your code or with Parcels itself."
20+
description: "If relevant, please provide a code example where this bug is shown as well as any error message. A [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) is preffered as it makes it much easier for developers to identify the cause of the bug. This also allows them quickly determine whether the problem is with your code or with Parcels itself. If you want support on a specific dataset, please [follow our instructions on how to share dataset metadata](https://docs.parcels-code.org/en/v4-dev/development/posting-issues.html)"
2121
value: |
2222
```python
2323
# Paste your code within this block

docs/development/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Release Notes <https://github.com/Parcels-code/Parcels/releases>
1717
1818
maintainer
1919
docsguide
20+
posting-issues
2021
```
2122

2223
## Why contribute?
@@ -55,7 +56,7 @@ Exactly how to use Git and GitHub is beyond the scope of this documentation, and
5556

5657
There are many ways that you can contribute to Parcels. You can:
5758

58-
- Participate in discussion about Parcels, either through the [issues](https://github.com/Parcels-code/parcels/issues) or [discussions](https://github.com/Parcels-code/parcels/discussions) tab
59+
- Participate in discussion about Parcels, either through the [issues](https://github.com/Parcels-code/parcels/issues) or [discussions](https://github.com/Parcels-code/parcels/discussions) tab. See our guide on [posting-issues](./posting-issues.md).
5960
- Suggest improvements to [tutorials and how-to guides](../user_guide/index.md)
6061
- Suggest improvements to [documentation](../index.md)
6162
- Write code (fix bugs, implement features, codebase improvements, etc)

docs/development/maintainer.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@
2727
- Update parcels-code.org
2828
- Parcels development status
2929
- Check feature tiles
30-
- Check for broken links on oceanparcels using [this tracking issue](https://github.com/Parcels-code/parcels-code.org/issues/85)
3130
- (once package is available on conda) Re-build the Binder
3231
- Ask for the shared parcels environment on [Lorenz](https://github.com/IMAU-oceans/Lorenz) to be updated

docs/development/posting-issues.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
file_format: mystnb
3+
kernelspec:
4+
name: python3
5+
---
6+
7+
# Participating in the issue tracker
8+
9+
We love hearing from our community!
10+
We want to be able to support you in your workflows, and learn about how you use Parcels.
11+
In open source projects, getting feedback from users is hard - you posting
12+
issues and participating in the issue tracker is really useful for us and
13+
helps future development and squash bugs.
14+
15+
Parcels provides issue templates that you can use when posting issues.
16+
Following these templates provides structure and ensures that we have all the necessary information we need to help you.
17+
18+
## "Parcels doesn't work with my input dataset"
19+
20+
Parcels is designed to work with a large range of input datasets.
21+
22+
When extending support for various input datasets, or trying to debug problems
23+
that only occur with specific datasets, having the dataset metadata is very valuable.
24+
25+
This metadata could include information such as:
26+
27+
- the nature of the array variables (e.g., via CF compliant metadata)
28+
- descriptions about the origin of the dataset, or additional comments
29+
- the shapes and data types of the arrays
30+
31+
This also allows us to see if your metadata is broken/non-compliant with standards - where we can then suggest fixes for you (and maybe we can tell the data provider!).
32+
Since version 4 of Parcels we rely much more on metadata to discover information about your input data.
33+
34+
Sharing this metadata often provides enough debugging information to solve your problem, instead of having to share a whole dataset.
35+
36+
Sharing dataset metadata is made easy in Parcels.
37+
38+
### Step 1. Users
39+
40+
As a user with access to your dataset, you would do:
41+
42+
```{code-cell}
43+
import json
44+
45+
import xarray as xr
46+
47+
# defining an example dataset to illustrate
48+
# (you would use `xr.open_dataset(...)` instead)
49+
ds = xr.Dataset(attrs={"description": "my dataset"})
50+
51+
output_file = "my_dataset.json"
52+
with open(output_file, "w") as f:
53+
json.dump(ds.to_dict(data=False), f) # write your dataset to a JSON excluding array data
54+
```
55+
56+
Then attach the JSON file written above alongside your issue
57+
58+
### Step 2. Maintainers and developers
59+
60+
As developers looking to inspect the metadata, we would do:
61+
62+
```{code-cell}
63+
from parcels._datasets.utils import from_xarray_dataset_dict
64+
65+
with open(output_file) as f:
66+
d = json.load(f)
67+
ds = from_xarray_dataset_dict(d)
68+
```
69+
70+
From there we can take a look the metadata of your dataset!

docs/getting_started/tutorial_output.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@
560560
"metadata": {
561561
"celltoolbar": "Metagegevens bewerken",
562562
"kernelspec": {
563-
"display_name": "docs",
563+
"display_name": "test-notebooks",
564564
"language": "python",
565565
"name": "python3"
566566
},

0 commit comments

Comments
 (0)