From 84d449dcc049c110357ad5d5059063ae75273f84 Mon Sep 17 00:00:00 2001 From: Inessa Pawson Date: Tue, 6 Oct 2026 23:50:26 -0400 Subject: [PATCH] docs: fix rendering issues on package-data.md --- tests/package-data.md | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/tests/package-data.md b/tests/package-data.md index 75b7d3f90..37a4ad3b2 100644 --- a/tests/package-data.md +++ b/tests/package-data.md @@ -8,6 +8,7 @@ Here, you will learn about working with data for your scientific Python package. * When and why you might need data, * Where you can store your package's data, * How you can access the data both from within your package and by downloading it as your package is used or as tests are run +::: :::{note} @@ -41,7 +42,7 @@ We will show you how to implement both, including data in your package or downlo * **movingpandas** is a pyOpenSci-accepted package that uses data to support some of its tutorials. [Here is an example of a tutorial that shows how to use MovingPandas to process bird migration data.](https://movingpandas.github.io/movingpandas-website/2-analysis-examples/bird-migration.html) -* [scikit-image](https://github.com/scikit-image/scikit-image/tree/main/skimage/data) +* [scikit-image](https://github.com/scikit-image/scikit-image/tree/main/src/skimage/data) * [scikit-learn:](https://github.com/scikit-learn/scikit-learn/tree/main/sklearn/datasets/data) ### Data for tests @@ -125,7 +126,6 @@ The cons include: You want to avoid adding these files to your version control history (git) and draining the resources of PyPI. - * examples: * pyOpenSci: * opengenomics: @@ -185,7 +185,6 @@ And also some cons: * **[Google Cloud Platform](https://cloud.google.com/storage)** - Cloud Storage with strong AI/ML tool integration * **[Linode](https://www.linode.com/products/object-storage/)** - Object Storage with straightforward pricing and developer-friendly tools - ```{admonition} Version control platforms for your data :class: tip @@ -193,8 +192,6 @@ Platforms exist that allow you to track changes to datasets in the same way as v Such tools are essential if your package primarily focuses on providing data access. - - Some tools provide distributed access to larger data. - **[DataLad](https://www.datalad.org/)** - Distributed data management for scientific datasets @@ -205,12 +202,6 @@ Some tools provide distributed access to larger data. - **[Pachyderm](https://www.pachyderm.com/)** - Data pipeline platform with version control ``` - - -:::{todo} - -::: - ```{admonition} Field specific standards + metadata :class: tip @@ -257,7 +248,7 @@ See the [importlib-resources documentation](https://importlib-resources.readthed * examples: * pyOpenSci packages: - * crowsetta: + * crowsetta: * core scientific Python packages: * scikit-learn: @@ -273,14 +264,16 @@ Pooch features include: * **Version management:** Pooch can handle different versions of the same dataset Here is an example of using Pooch to download and cache a remote data file: -:::{todo} -TODO: I copied some code online. THIS NEEDS TO BE TESTED // verified -::: + +```python +import pandas as pd +import pooch +import xarray as xr # Define your data registry data_registry = pooch.create( path=pooch.os_cache("my_package"), - base_url="https://github.com/my_org/my_data/raw/main/", + base_url="https://example.com/my_package/data/", registry={ "sample_data.csv": "sha256:abc123...", # File hash for verification "large_dataset.nc": "sha256:def456...",