Skip to content

Allow site-wide configuration via environment variables for data directory containing standard data.#1827

Merged
greglucas merged 2 commits into
SciTools:masterfrom
aerorahul:feature/system_provided_data_dir
Aug 12, 2021
Merged

Allow site-wide configuration via environment variables for data directory containing standard data.#1827
greglucas merged 2 commits into
SciTools:masterfrom
aerorahul:feature/system_provided_data_dir

Conversation

@aerorahul
Copy link
Copy Markdown
Contributor

@aerorahul aerorahul commented Aug 6, 2021

Rationale

Allow easier site-wide use of standard data (such as that from NaturalEarth).
Addresses Issue #1281

Cartopy allows for site-wide customizations via cartopy.config and siteconfig.py, but that requires system admins to place this file into the installation directory. Cartopy also allows for users to configuration via cartopy_userconfig, but most users are not savvy about such things.

Implications

This will allow site-wide use of system installed/provided standard data as well as users to provide their own path to this data via an environment variable CARTOPY_DATA_DIR.

Checklist

  • CLA -- Signed

  • Example:

export CARTOPY_DATA_DIR="absolute path to a directory where standard data can be found"
  • Ensure there is a suitable item in the cartopy test suite for the change you are proposing -- N/A

@aerorahul aerorahul changed the title allow the system to provide a path to data dir. respect defaults Allow site-wide configuration via environment variables for data directory containing standard data. Aug 6, 2021
Copy link
Copy Markdown
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me and the env variable seems like a sensible name.

@greglucas greglucas merged commit 73f7f9a into SciTools:master Aug 12, 2021
@greglucas
Copy link
Copy Markdown
Contributor

Thanks, @aerorahul!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants