-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimade-launch accept config file to start the server (#29)
- Fix failed tests (the started container tests are still failing) - Update the README to conform with the current CLI interface - Allow to pass the optimade config file to set the profile and start the server with it. This allows provider information to be much clearer.
- Loading branch information
Showing
15 changed files
with
150 additions
and
110 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
# __future__ import needed for classmethod factory functions; should be dropped | ||
# with py 3.10. | ||
import os | ||
import logging | ||
import click | ||
from pathlib import Path | ||
|
||
APPLICATION_ID = "org.optimade.optimade_launch" | ||
|
||
LOGGER = logging.getLogger(APPLICATION_ID.split(".")[-1]) | ||
|
||
if os.environ.get("OPTIMADE_LAUNCH_CONFIG_FOLDER"): | ||
CONFIG_FOLDER = Path(os.environ["OPTIMADE_LAUNCH_CONFIG_FOLDER"]) | ||
else: | ||
CONFIG_FOLDER = Path(click.get_app_dir(APPLICATION_ID)) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"debug": false, | ||
"default_db": "test_server", | ||
"base_url": "http://localhost:5000", | ||
"implementation": { | ||
"name": "Example implementation", | ||
"source_url": "https://github.com/Materials-Consortia/optimade-python-tools", | ||
"issue_tracker": "https://github.com/Materials-Consortia/optimade-python-tools/issues", | ||
"maintainer": {"email": "[email protected]"} | ||
}, | ||
"provider": { | ||
"name": "Example provider", | ||
"description": "Provider used for examples, not to be assigned to a real database", | ||
"prefix": "exmpl", | ||
"homepage": "https://example.com" | ||
}, | ||
"index_base_url": "http://localhost:5001", | ||
"provider_fields": { | ||
"structures": [ | ||
"band_gap", | ||
{"name": "chemsys", "type": "string", "description": "A string representing the chemical system in an ordered fashion"} | ||
] | ||
}, | ||
"aliases": { | ||
"structures": { | ||
"id": "task_id", | ||
"immutable_id": "_id", | ||
"chemical_formula_descriptive": "pretty_formula", | ||
"chemical_formula_reduced": "pretty_formula", | ||
"chemical_formula_anonymous": "formula_anonymous" | ||
} | ||
}, | ||
"length_aliases": { | ||
"structures": { | ||
"chemsys": "nelements" | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.