Scripts related to convert2rhel to be run via rhc-worker-script on Red Hat Insights.
Scripts themselves shouldn't have any additional requirements = they are relying on python standard library.
Structure of repository is following:
├── requirements # DEV requirements - tests & lint
│ └── ...
├── schemas # All expected json outputs in the scripts stdouts
| | ...
│ └── preconversion_assessment_schema_1.1.json
├── convert2rhel_insights_tasks # All available scripts
│ └── main.py
└── tests
| ...
Currently there is given format of the scripts stdout that is expected to be parsed by the Red Hat Insights Task UI. This stdout is JSON structure wrapped between agreed on separators. Schemas of the JSONs for each script can be found in schemas folder.
- separators (common to all scripts):
### JSON START ###
### JSON END ###
Script itself and tests are written for python 2.7
. Goal of script is to print to stdout in specified format, the script itself is executed by rhc-worker-script as part of pre-conversion task, stdout is collected and send back to Insights Tasks UI.
virtualenv
- to run tests locallypre-commit
- to run checks before each commit, see hook in .pre-commit-config.ymlmake
- to use handy commands
make install # install pre-commit hooks and python virtualenv
make tests # run pytest