- All python code must be python 2.6/2.7/3.6 compatible
- The code should follow linting from pylint
Required dependencies:
- virtualenv
- pre-commit
The commands below create a python3 virtual environment with all the necessary dependencies installed, build needed images, create .env file, and setup pre-commit hooks
make install
and you're ready to run tests with:
make tests-locally
You can run unit tests also within containers.
$ make tests
make lint # inside the centos8 container
Or locally
make lint-locally
# installs pre-commit hooks into the repo (included into make install)
pre-commit install --install-hooks
# run pre-commit hooks for staged files
pre-commit run
# run pre-commit hooks for all files in repo
pre-commit run --all-files
# bump versions of the pre-commit hooks automatically
pre-commit autoupdate
# bypass pre-commit check
git commit --no-verify
You need podman or docker installed
make rpms
You need:
- podman or docker installed
- have an account at https://copr.fedorainfracloud.org/api/, copy copr config and paste it to the repo root as .copr.conf
- request build permissions at https://copr.fedorainfracloud.org/coprs/g/oamg/convert2rhel/permissions/
make copr-build
Warning: Do not bump the Release in packaging/convert2rhel.spec. Otherwise, this version will be automatically installed during yum install