{"id":15904633,"url":"https://github.com/dmitryduev/ztf-variable-marshal","last_synced_at":"2025-09-11T20:33:26.897Z","repository":{"id":105070194,"uuid":"162482534","full_name":"dmitryduev/ztf-variable-marshal","owner":"dmitryduev","description":"Variable Marshal for ZTF","archived":false,"fork":false,"pushed_at":"2023-06-17T16:03:00.000Z","size":44603,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T02:35:09.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitryduev.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-19T19:36:22.000Z","updated_at":"2021-06-13T19:32:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c1baaa0-2632-4162-9ac6-7499e2006ad4","html_url":"https://github.com/dmitryduev/ztf-variable-marshal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitryduev%2Fztf-variable-marshal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitryduev%2Fztf-variable-marshal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitryduev%2Fztf-variable-marshal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitryduev%2Fztf-variable-marshal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitryduev","download_url":"https://codeload.github.com/dmitryduev/ztf-variable-marshal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232666175,"owners_count":18557991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T12:40:59.016Z","updated_at":"2025-01-06T02:57:16.451Z","avatar_url":"https://github.com/dmitryduev.png","language":"JavaScript","readme":"# ZTF Variable Marshal (ZVM)\n\nA dockerized Variable Marshal for [ZTF](https://ztf.caltech.edu) powered by `aiohttp` and `mongodb`.\n\n\u003ctable border=\"0\"\u003e\n\u003ctr\u003e\n\u003cth style=\"width:30%\"\u003eSearch Saved Sources GUI\u003c/th\u003e\n\u003cth style=\"width:35%\"\u003eSource page: Photometry\u003c/th\u003e\n\u003cth style=\"width:35%\"\u003eSource page: Spectroscopy and aux\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd style=\"width:30%\"\u003e\u003cimg src=\"ztf-variable-marshal/doc/zvm1.png\"\u003e\u003c/td\u003e\n\u003ctd style=\"width:35%\"\u003e\u003cimg src=\"ztf-variable-marshal/doc/zvm2b.png\"\u003e\u003c/td\u003e\n\u003ctd style=\"width:35%\"\u003e\u003cimg src=\"ztf-variable-marshal/doc/zvm3.png\"\u003e\u003cbr\u003e\u003cimg src=\"ztf-variable-marshal/doc/zvm4.png\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Python client library `zvm`\n\nInstall the client library [zvm.py](https://github.com/dmitryduev/ztf-variable-marshal/blob/master/zvm.py), \nwith `pip` into your environment:\n\n```bash\npip install git+https://github.com/dmitryduev/ztf-variable-marshal.git\n```\n\n`zvm` is very lightweight and only depends on `pymongo` and `requests`.\n\nA tutorial on how to programmatically interact with the ZVM:\n\nSee [this jupyter notebook](https://github.com/dmitryduev/ztf-variable-marshal/blob/master/nb/api.ipynb), or \n[![Open In Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/dmitryduev/ztf-variable-marshal/blob/master/nb/api.ipynb)\n\n---\n\n## Production service  \n\n### Set-up instructions\n\n#### Pre-requisites\n\nClone the repo and cd to the cloned directory:\n```bash\ngit clone https://github.com/dmitryduev/ztf-variable-marshal.git\ncd ztf-variable-marshal\n```\n\nCreate `secrets.json` with confidential/secret data:\n```json\n{\n  \"server\" : {\n    \"admin_username\": \"ADMIN\",\n    \"admin_password\": \"PASSWORD\"\n  },\n  \"database\": {\n    \"admin\": \"mongoadmin\",\n    \"admin_pwd\": \"mongoadminsecret\",\n    \"user\": \"user\",\n    \"pwd\": \"pwd\"\n  },\n  \"kowalski\": {\n    \"username\": \"USERNAME\",\n    \"password\": \"PASSWORD\"\n  }\n}\n```\n\n#### Using `docker-compose` (for production)\n\nChange `skipper.caltech.edu` in `docker-compose.yml` and in `traefik/traefik.toml` if necessary. \n\nRun `docker-compose` to build and start the service (may have to sudo if acme complains):\n```bash\nsudo docker-compose up --build -d\n```\n\nTo tear everything down (i.e. stop and remove the containers), run:\n```bash\ndocker-compose down\n```\n\n---\n\n#### Using plain `Docker` (for dev/testing)\n\nIf you want to use `docker run` instead:\n\nCreate a persistent Docker volume for MongoDB and to store data:\n```bash\ndocker volume create ztf_variable_marshal_mongodb\ndocker volume create ztf_variable_marshal_data\n```\n\nPull, build, and launch the MongoDB container. Feel free to change u/p for the admin, \nbut make sure to change `secrets.json` and `docker-compose.yml` correspondingly.\n```bash\ndocker run -d --restart always --name ztf_variable_marshal_mongo_1 -p 27025:27017 \\\n       -v ztf_variable_marshal_mongodb:/data/db \\\n       -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=mongoadminsecret \\\n       mongo:latest\n```\n\nTo connect to the db:\n```bash\ndocker exec -it ztf_variable_marshal_mongo_1 /bin/bash\nmongo -u mongoadmin -p mongoadminsecret --authenticationDatabase admin\n```\n\nBuild and launch the app container:\n```bash\ndocker build --rm -t ztf_variable_marshal:latest -f Dockerfile .\ndocker run --name ztf_variable_marshal -d --restart always -p 8000:4000 -v ztf_variable_marshal_data:/data --link ztf_variable_marshal_mongo_1:mongo ztf_variable_marshal:latest\n# test mode:\ndocker run -it --rm --name ztf_variable_marshal -p 8000:4000 -v ztf_variable_marshal_data:/data --link ztf_variable_marshal_mongo_1:mongo --entrypoint /bin/bash ztf_variable_marshal:latest\n\n```\n\n`ztf_variable_marshal` will be available on port 8000 of the `Docker` host machine. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitryduev%2Fztf-variable-marshal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitryduev%2Fztf-variable-marshal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitryduev%2Fztf-variable-marshal/lists"}