jobflow.settings¶
Settings for jobflow.
- pydantic settings jobflow.settings.JobflowSettings[source]¶
Bases:
BaseSettingsSettings for jobflow.
The default way to modify these is to create a ~/.jobflow.yaml. Alternatively, the environment variable
JOBFLOW_CONFIG_FILEcan be set to point to a yaml file with jobflow settings.Lastly, the variables can be modified directly though environment variables by using the “JOBFLOW” prefix. E..g.,
JOBFLOW_JOB_STORE=path/to/jobstore.file.Allowed JOB_STORE formats
If the store is not supplied, a
MemoryStorewill be used. Can be specified in multiple formats.The simplest format is the yaml dumped version of the store, generated using:
>>> import yaml >>> yaml.dump(store.as_dict())
Alternatively, the store can be specified as the keys docs_store, additional_stores and any other keyword arguments supported by the
JobStoreconstructor. The docs_store and additional stores are specified by thetypekey which must match a MaggmaStoresubclass, and the remaining keys are passed to the store constructor. For example, the following file would create aJobStorewith aMongoStorefor docs and aGridFSStoreorS3Storeas an additional store for data.GridFSStore example:
docs_store: type: MongoStore database: jobflow_unittest collection_name: outputs host: localhost port: 27017 additional_stores: data: type: GridFSStore database: jobflow_unittest collection_name: outputs_blobs host: localhost port: 27017
S3Store example (Note: the
keyfield must be set toblob_uuid):docs_store: type: MongoStore database: jobflow_unittest collection_name: outputs host: localhost port: 27017 additional_stores: data: type: S3Store bucket: output_blobs key: blob_uuid index: type: MongoStore database: jobflow_unittest collection_name: output_blobs_index host: localhost port: 27017 key: blob_uuid
Lastly, the store can be specified as a file name that points to a file containing the credentials in any format supported by
JobStore.from_file.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Validators:
load_default_settings»all fields
- field JOB_STORE: JobStore [Optional]¶
Default JobStore to use when running locally or using FireWorks. See the
JobflowSettingsdocstring for more details on the accepted formats.
- field LOG_FORMAT: str = '%(asctime)s %(levelname)s %(message)s'¶
Logging format string. Common format codes: - %(message)s - The logged message - %(asctime)s - Human-readable time - %(levelname)s - DEBUG, INFO, WARNING, ERROR, or CRITICAL - %(name)s - Logger name See Python logging documentation for more format codes.