Skip to content

Examples: download datasets into OS standard cache directory instead of relative to the python file #6054

@abey79

Description

@abey79

Using the OS standard cache directories has several advantages:

  • no __file__-relative paths, so doesn't break or download stuff in weird places when the example is pip installed
  • few less .gitignore in the repo
  • benefit from the OS-level cache garbage collecting / cleaning

It appears that this is a good package to obtain the current OS's cache directory: https://pypi.org/project/platformdirs/

Edit: dont forget to edit the dataset section in examples/python/README.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesIssues relating to the Rerun examples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions