-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example for serving Intake Catalogs #852
Comments
Here is also a minimal reproducible example with the same kinds of objects I would eventually like to use. Assuming requirements of:
import intake_esm
import tempfile
import pathlib
from tiled.client import Context, from_context
from tiled.examples.generated_minimal import tree
from tiled.server.app import build_app
# Create dummy catalog
url = intake_esm.tutorial.get_url('google_cmip6')
cat = intake.open_esm_datastore(url)
catalog_json_file = pathlib.Path(tempfile.NamedTemporaryFile(suffix=".json"))
cat.serialize(name=catalog_json_file.name, directory=catalog_json_file.stem)
# Create dummy client
app = build_app(tree)
context = Context.from_app(app)
client = from_context(context)
client.write(cat) # <-- This is the part I don't know how to write down |
Hello @pgierz! I'm happy to see someone pushing on this, and help if I can. I would suggest starting a tiled server in a separate process, from the CLI: tiled serve catalog --temp --api-key secret (If you don't specify an API key, a random token will be generated, just as Then, I think something like this: x = tiled_client.create_container(key="x")
for key, data in your_intake_catalog.items():
x.write_array(data, key=key) Or use |
Thanks, I'll try that out and report back. One question though: wouldn't that upload the data to the tiled server? Maybe that wasn't clear from my question, I here only want to share the actual catalogs via the server. I can image cases where the data itself would be too large to host in such a way, or that the server is running on infrastructure that isn't attached to the same storage. |
Hi @danielballan, I think I've experimented enough now to formulate some more concrete questions:
|
Hi there,
Looking through issues (#88) and pull requests (#122) only got me part of the way, so I thought I'd ask for some help as a new issue.
I'm trying to set up a tiled server that will allow users to upload completed
intake
catalogs via thetiled
client. On the producing side, I have an simulation pipeline system for an Earth System Model that produces intake catalogues of its output as part of the simulation pipeline. The main building block on the Python side is a giant dictionary,config
. Essentially, part of the model clean up is:I think as a consumer it is then really straightforward:
I hope I expressed what I am trying to do clearly enough. Could someone help me figure out how to serve such catalogs and have users actively upload them?
Thanks!
Paul
The text was updated successfully, but these errors were encountered: