{"id":21364187,"url":"https://github.com/ml-evs/necroptimade","last_synced_at":"2025-03-16T07:20:17.089Z","repository":{"id":38207339,"uuid":"370651165","full_name":"ml-evs/necroptimade","owner":"ml-evs","description":"Spawn and revive OPTIMADE APIs from static data.","archived":false,"fork":false,"pushed_at":"2023-01-13T06:04:47.000Z","size":63,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T19:45:06.288Z","etag":null,"topics":["optimade"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ml-evs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-05-25T10:19:50.000Z","updated_at":"2022-10-01T14:54:54.000Z","dependencies_parsed_at":"2023-02-09T14:46:07.169Z","dependency_job_id":null,"html_url":"https://github.com/ml-evs/necroptimade","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/ml-evs%2Fnecroptimade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-evs%2Fnecroptimade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-evs%2Fnecroptimade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-evs%2Fnecroptimade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ml-evs","download_url":"https://codeload.github.com/ml-evs/necroptimade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243836826,"owners_count":20355779,"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":["optimade"],"created_at":"2024-11-22T06:23:35.034Z","updated_at":"2025-03-16T07:20:17.058Z","avatar_url":"https://github.com/ml-evs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"10%\" align=\"left\" src=\"docs/static/necroptimade_logo_180x180.svg\"\u003e\n\n# necroptimade\n\nSpawn and revive OPTIMADE APIs from static data, e.g., JSON files on disk, or a Zenodo archive.\n\nExtremely WIP.\n\n## Current functionality\n\nAfter starting your server (with `run.sh` or otherwise), you will have a valid OPTIMADE index meta-database implementation that does not serve anything.\nThis server has an extensions endpoint `/extensions/spawn` that can be passed a `loc` of a remote or local resource, e.g. `localhost:8000/extensions/spawn?loc=./necroptimade/static/test_structures.json`.\nThis will then construct a database and the appropriate routes to serve this data at a URL generated from the passed `loc`, with the URL returned as a links resource in the call to `/spawn`.\nIn the case of a local file (as above), the base URL of the new OPTIMADE implementation will be e.g. `localhost:8000/\u003cabsolute_path_to_file\u003e/`, and for remote resources (e.g. `http://localhost:8000/static/test_structures.json`, which is available by default) it will be `localhost:8000/localhost:8000/static/test_structures.json`, i.e. the original minus the URL scheme is appended to the base URL of the app.\nCurrently, the location MUST refer to a JSON (well, BSON) file that contains structures in an OPTIMADE format.\n\nThe app is deployed to Heroku at https://necroptimade.herokuapp.com, so you can try e.g. https://necroptimade.herokuapp.com/extensions/spawn?loc=./necroptimade/static/test_structures.json and https://necroptimade.herokuapp.com/app/necroptimade/static/test_structures.json/v1/structures.\n\n### Caveats:\n\n- If spawn is called multiple times, only the most recent spawned implementation survives.\n- This app currently will not work with multiple workers as mongomock is being used as a per-process database\n\n### To-do\n\n- [ ] Allow multiple implementations to be served simultaneously, with an additional persistent database of implementations\n    - [ ] Active implementations can then be served by the index-meta database directly.\n    - [ ] Add a timeout for implementations (e.g. last request time + 10 minutes)\n    - [ ] Cache to disk after timeout, then re-up if the implementation is requested?\n    - [ ] Accept Keep-Alive requests to enable clients to work with necroptimade more easily\n- [ ] Lay out a scheme for providing non-structure and archived data (e.g. a folder hierarchy corresponding to the endpoint data).\n- [ ] Go beyond mongomock and enable persistence\n- [ ] Allow for optimade-python-tools config files to be provided to enable aliasing etc.\n- [ ] Add some automatic indexes to the data\n- [ ] Add data validation on ingestion, not just on response\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-evs%2Fnecroptimade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fml-evs%2Fnecroptimade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-evs%2Fnecroptimade/lists"}