Skip to content

Commit a1614e8

Browse files
authored
🎨 Minor: ooil prints warning when one subfolder (of potentially many) doesn't contain metadata.yml (#7128)
1 parent 15d54a6 commit a1614e8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

packages/service-integration/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ This is the o2sparc's service integration library or ``ooil`` in short
55

66

77
SEE how is it used in Makefiles in https://github.com/ITISFoundation/cookiecutter-osparc-service
8+
9+
10+
#### What is the .osparc folder and its content?
11+
'osparc config' is a set of stardard file forms (yaml) that the user fills provides in order to describe how her service works and integrates with osparc. It may contain:
12+
- config files are stored under '.osparc/' folder in the root repo folder (analogous to other configs like .github, .vscode, etc)
13+
- configs are parsed and validated into pydantic models
14+
- models can be serialized/deserialized into label annotations on images. This way, the config is attached to the service during it's entire lifetime.
15+
- config should provide enough information about that context to allow building an image and running a container on a single command call.

packages/service-integration/src/service_integration/cli/_compose_spec.py

+8
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ def create_compose(
192192
if file_path.exists():
193193
configs_kwargs_map[config_name][arg_name] = file_path
194194

195+
# warn about subfolders without metadata.yml
196+
for subdir in filter(lambda p: p.is_dir(), basedir.rglob("*")):
197+
if not (subdir / "metadata.yml").exists():
198+
relative_subdir = subdir.relative_to(basedir)
199+
rich.print(
200+
f"[warning] Subfolder '{relative_subdir}' does not contain a 'metadata.yml' file. Skipping."
201+
)
202+
195203
if not configs_kwargs_map:
196204
rich.print(f"[warning] No config files were found in '{config_path}'")
197205

0 commit comments

Comments
 (0)