-
Notifications
You must be signed in to change notification settings - Fork 3
scripts: Add the cid2civ script #562
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - thank you for building the bridge between QE testing and the CID :) I have only one question regarding the script-thing itself :D
@@ -74,3 +74,6 @@ repos: | |||
hooks: | |||
- id: interrogate | |||
args: [--fail-under=60, --verbose] | |||
# Unable to interrogate scripts without the .py extension: | |||
# https://github.com/econchick/interrogate/issues/104 | |||
files: \.(py)$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this? :) Can't we not add .py
to the file instead?
@@ -48,6 +48,7 @@ pre-commit = "^3.3.2" | |||
ipython = "^8.13.2" | |||
pytest-sugar = "^0.9.7" | |||
rich = "^13.3.5" | |||
docopt = "^0.6.2" | |||
|
|||
[tool.poetry.scripts] | |||
cloudimagedirectory-transformer = "cloudimagedirectory.transformer:run" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to register cid2civ
here, the same way we did it with the transformer (and the old cli in the past)? :)
Add a scripts that allows to download metadata about cloud images from Cloud Image Directory and prepare them for testing via Cloud Image Validation. * Print the supported arguments of the script: poetry run scripts/cid2civ --help * Download data about Azure images: poetry run scripts/cid2civ download azure > cid.json * Print a summary about the downloaded data: poetry run scripts/cid2civ analyze cid.json * Generate resources for the image validation: poetry run scripts/cid2civ convert cid.json > civ.json
Use local testdata using `--website file://$PWD/tests/scripts/testdata/website`.
Install docopt and requests-file as devel dependencies.
Update:
About Nina's suggestions, my idea was to keep the script (and any future scripts) separate from your source files and keep them language-agnostic, so you don't have to change the documentation and tests if necessary. Would it be fine to merge these changes as they are for now? You can always change it. |
For me that sounds good, @FKolwa what do you think? :) |
@miyunari Yes, I'm very fine with this! Feel free to merge ;) |
Add a scripts that allows to download metadata about cloud images from Cloud Image Directory and prepare them for testing via Cloud Image Validation.
Print the supported arguments of the script:
poetry run scripts/cid2civ --help
Download data about Azure images:
poetry run scripts/cid2civ download azure > cid.json
Print a summary about the downloaded data:
poetry run scripts/cid2civ analyze cid.json
Generate resources for the image validation:
poetry run scripts/cid2civ convert cid.json > civ.json
TODO