Add manifest file managment and sync to backend#11
Merged
Conversation
WillEngler
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #7
Overview
This PR adds a system for creating and managing a
manifest.jsonfile that lives in theROOTSTOCK_ROOTwhere information about the environments is tracked, then automatically pushed to the backend.The
cli.pymodule was getting unwieldy, so I split out the actual command logic into separate modules, leavingcli.pywith the just arg parse setup.Details
A couple of additions were needed to make this a smoother user experience. There is now a
config.tomlthat lives in~/.config/roostock/config.tomlthat has this shape:The
api_keyandapi_secretvales are needed to push the manifest file to the API url and are Modal Proxy Auth Tokens.The CLI uses the
rootvalue from the config file by default, setting theROOSTOCK_ROOTenv var takes precedent over the config value, and passing--rooton the cli takes precedent over all.Init
To make setting up the config file easier there is a new
rootstock initcommand that collects the values interactively and writes the config file.Screen.Recording.2026-03-12.at.3.16.58.PM.mov
Manifest
Here is a sample of what the manifest file looks like:
{ "schema_version": "1", "cluster": "Test Cluster", "root": "/tmp/rootstock-test", "maintainer": { "name": "Hayden Holbrook", "email": "hholbrook9@uchicago.edu" }, "rootstock_version": "0.5.0", "python_version": "unknown", "last_updated": "2026-03-12T21:34:48.854245+00:00", "environments": { "chgnet_env": { "status": "ready", "built_at": "2026-03-12T15:32:14.864663+00:00", "source_hash": "sha256:ee3d3997682c2b5fd44e2e602a917080ad8e29d8e107990636b77af24ecbb871", "source": "# /// script\n# requires-python = \">=3.10\"\n# dependencies = [\n# \"chgnet>=0.3.0\",\n# \"ase>=3.22\",\n# \"torch>=2.0\",\n# ]\n# ///\n\"\"\"\nCHGNet environment for Rootstock.\n\nThis environment provides access to CHGNet, a pretrained universal neural\nnetwork potential for charge-informed atomistic modeling.\n\"\"\"\n\n\ndef setup(model: str | None = None, device: str = \"cuda\"):\n \"\"\"\n Load a CHGNet calculator.\n\n Args:\n model: Optional path to a fine-tuned model. If None, uses the\n default pre-trained CHGNet model.\n device: PyTorch device string (e.g., \"cuda\", \"cuda:0\", \"cpu\")\n\n Returns:\n ASE-compatible calculator\n \"\"\"\n from chgnet.model import CHGNetCalculator\n\n if model:\n return CHGNetCalculator(model_path=model, use_device=device)\n return CHGNetCalculator(use_device=device)\n", "python_requires": ">=3.10", "dependencies": { "ase": "3.27.0", "chgnet": "0.4.2", "rootstock": "0.6.1", "torch": "2.10.0" }, "checkpoints": [] } }As environments are created or updated, the manifest file is updated automatically and then uploaded to the backend.
Screen.Recording.2026-03-12.at.3.34.43.PM.mov
You can view the current manifest file with
rootstock manifest show:Screen.Recording.2026-03-12.at.3.36.07.PM.mov
If the pushing the manifest fails for some reason, you can manually push it with
rootstock manifest push:Screen.Recording.2026-03-12.at.3.37.29.PM.mov