Submission

class emmet.cli.submission.Submission(**data)

Bases: BaseModel

Parameters:
save(path)

Save this submission to a JSON file.

Return type:

None

Parameters:

path (Path)

classmethod load(path)

Load a submission from a JSON file.

Return type:

Submission

Parameters:

path (Path)

classmethod from_paths(paths)

Create Submission from all calculations in the provided paths

Return type:

Submission

Parameters:

paths (Iterable[Path])

add_to(paths)

Add all files in the paths to the submission. Performs de-duping

Return type:

list[FileMetadata]

Parameters:

paths (Iterable[Path])

remove_from(paths)

Remove all files in the submission that match one of the provided paths.

Return type:

list[FileMetadata]

Parameters:

paths (Iterable[Path])

stage_for_push()

Stages submission for push. Returns the list of files that will need to be (re)pushed.

Return type:

list[FileMetadata]

push()

Performs the push. Returns info about the push

Return type:

None

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self (BaseModel)

  • context (Any)

Args:

self: The BaseModel instance. context: The context.