-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/336/cp2k-protocol-yamls
- Loading branch information
Showing
29 changed files
with
572 additions
and
262 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 |
---|---|---|
|
@@ -12,6 +12,7 @@ python: | |
- method: pip | ||
path: . | ||
extra_requirements: | ||
- all_plugins | ||
- docs | ||
|
||
sphinx: | ||
|
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,47 @@ | ||
#!/usr/bin/env python | ||
"""Script to validate the optional dependencies in the `pyproject.toml`.""" | ||
|
||
|
||
def main(): | ||
"""Validate the optional dependencies.""" | ||
import pathlib | ||
import sys | ||
|
||
import tomllib | ||
|
||
filepath_pyproject_toml = pathlib.Path(__file__).parent.parent / 'pyproject.toml' | ||
|
||
with filepath_pyproject_toml.open('rb') as handle: | ||
pyproject = tomllib.load(handle) | ||
|
||
exclude = ['all_plugins', 'docs', 'pre-commit', 'tests'] | ||
dependencies_all_plugins = pyproject['project']['optional-dependencies']['all_plugins'] | ||
dependencies_separate = [] | ||
|
||
for key, dependencies in pyproject['project']['optional-dependencies'].items(): | ||
if key in exclude: | ||
continue | ||
dependencies_separate.extend(dependencies) | ||
|
||
missing_all_plugins = set(dependencies_separate).difference(set(dependencies_all_plugins)) | ||
excess_all_plugins = set(dependencies_all_plugins).difference(set(dependencies_separate)) | ||
|
||
if missing_all_plugins: | ||
print( | ||
'ERROR: the `all_plugins` extras are inconsistent. The following plugin dependencies are missing: ' | ||
f'{", ".join(missing_all_plugins)}', | ||
file=sys.stderr, | ||
) | ||
sys.exit(1) | ||
|
||
if excess_all_plugins: | ||
print( | ||
'ERROR: the `all_plugins` extras are inconsistent. The following dependencies are not declared by any ' | ||
f'plugin extras: {", ".join(excess_all_plugins)}', | ||
file=sys.stderr, | ||
) | ||
sys.exit(1) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
"""Module with utilities for working with the plugins provided by this plugin package.""" | ||
from .entry_point import get_entry_point_name_from_class, get_workflow_entry_point_names, load_workflow_entry_point | ||
from .factories import WorkflowFactory | ||
|
||
__all__ = ('get_workflow_entry_point_names', 'get_entry_point_name_from_class', 'load_workflow_entry_point') | ||
__all__ = ( | ||
'WorkflowFactory', | ||
'get_workflow_entry_point_names', | ||
'get_entry_point_name_from_class', | ||
'load_workflow_entry_point', | ||
) |
Oops, something went wrong.