Comments (9)
intake_esm
already supports building collections out of the box:
col = open_esm_metadatastore(collection_input_definition)
The advantage of this script is that you can build collections in the background; I have a SLURM batch script, for instance, that wraps build_collection.py
...and would like to check this in too.
I think I like having the capacity live here because I can update the repo and have a ready tool to update the collections I am using.
from intake-esm-datastore.
I'm thinking of something different..something along the lines of having setuptools copy the script to PATH and make it available for general use with:
build_collection collection-definitions/my-collection.yml --overwrite-existing
from intake-esm-datastore.
Ok, that works. Where on PATH?
from intake-esm-datastore.
Where on PATH?
In the same environment as intake-esm
. For instance for conda, it will put it in the bin
directory of the environment:
root@0a9165cd7ff7:/usr/local/envs/intake-esm-dev/bin# which intake-esm-builder
/usr/local/envs/intake-esm-dev/bin/intake-esm-builder
from intake-esm-datastore.
Is there any way to ensure that the script is executed in the right environment? We probably can't assume conda, but it would be great if the shebang string could actually set the conda environment.
from intake-esm-datastore.
Is there any way to ensure that the script is executed in the right environment?
setuptools takes care of everything: https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation
and because of #! /usr/bin/env python
shebang, the python used will correspond to whichever python environment is active when the script is invoked.
from intake-esm-datastore.
But I think that if a user runs the script from an environment that doesn't have intake_esm
installed, the script will fail.
from intake-esm-datastore.
The intake-esm-builder
command is exclusively available in an environment with intake-esm
installed.
abanihi@casper01: /glade/work/abanihi/devel/ncar $ which intake-esm-builder
/glade/work/abanihi/softwares/miniconda3/envs/dev/bin/intake-esm-builder
abanihi@casper01: /glade/work/abanihi/devel/ncar $ which python
/glade/work/abanihi/softwares/miniconda3/envs/dev/bin/python
abanihi@casper01: /glade/work/abanihi/devel/ncar $ conda activate base
abanihi@casper01: /glade/work/abanihi/devel/ncar $ intake-esm-builder
bash: intake-esm-builder: command not found
As a result, if a user tries running the script from an environment that doesn't have intake_esm installed, the script will fail and this is what we want, right?
from intake-esm-datastore.
I just wish there was a way to designate the right environment within the script itself; the shebang string tells the shell with program to use...it doesn't seem completely inconceivable that it also communicates the environment.
from intake-esm-datastore.
Related Issues (20)
- Can not open glade-cesm2-le.json HOT 1
- Add CESM2-CMIP6 (not CMORized) collection HOT 11
- Catalogue for observational datasets on glade? HOT 2
- Clean up the CESM non-CMORized file names and contents HOT 1
- Add a common utility for building catalogs HOT 1
- SubX catalog HOT 6
- Update large ensemble collection on glade HOT 2
- Parsing attributes for CESM2-CMIP6 collection assets HOT 1
- Add CESM1 RCP runs to glade-cesm1-cmip5-timeseries HOT 2
- Collection with monthly CESM output files (history files) HOT 6
- Error accessing GLADE CMIP5 catalog HOT 4
- Standard column naming convention for catalogs pointing to raw CESM output on glade / campaign HOT 4
- builder for zarr files in the same file structure HOT 8
- Picking the latest version fails for cmip.py builder HOT 5
- Update SSP runs for CESM2-CMIP6 datastores HOT 1
- Relative path in JSON files? HOT 1
- How to pick latest version when ingesting open_esm_datastore on .json url? HOT 2
- Change master branch to main? HOT 2
- Add data catalog for ERA5 Reanalysis
- Retirement of DKRZs Mistral
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intake-esm-datastore.