@@ -266,26 +266,16 @@ oc apply -R -f ansible/roles/operator-pipeline/templates/openshift
266266
267267# # Making Changes to the Pipeline Image
268268
269- # ## Dependency manager
270- Operator pipelines project is configured to automatically manage Python dependencies using [PDM][1] tool.
271- The pdm automates definition, installation, upgrades and the whole lifecycle of
272- dependency in a project. All dependencies are stored in `pyproject.toml` file in a groups
273- that corresponds to individual applications within the Operator pipelines project.
269+ # ## Setup
270+ To install the python package in a development environment, run :
274271
275- Adding, removing and updating of dependency needs to be always done using `pdm` cli.
276272` ` ` bash
277- pdm add -G operator-pipelines gunicorn==20.1.0
273+ pip install ".[dev]"
278274` ` `
279- After a dependency is installed it is added to pdm.lock file. The lock file
280- is always part of git repository.
281275
282- If you want to install specific group set of dependencies use following command :
283- ` ` ` bash
284- pdm install -G operator-pipelines
285- ` ` `
286- Dependencies are stored into virtual environment (.venv) which is automatically created after `pdm install`
287- If .venv wasn't created, configure pdm to automatically create it during installation with `pdm config python.use_venv true`.
276+ # ## Tips
288277
278+ - If adding a new script in the pipeline image - don't forget to add the entrypoint to setup.py
289279
290280# ## Run Unit Tests, Code Style Checkers, etc.
291281
@@ -295,26 +285,17 @@ To run unit tests and code style checkers:
295285tox
296286` ` `
297287
298- # ## Local development
299-
300- Setup python virtual environment using pdm.
301- ` ` ` shell
302- $ pdm venv create 3.10
303- $ pdm install
304- $ source .venv/bin/activate
305- ` ` `
306-
307288# ## Build & Push
308289
3092901. Ensure you have [buildah](https://github.com/containers/buildah/blob/main/install.md) installed
310291
311- 2 . Build the image
292+ 1 . Build the image
312293
313294 ` ` ` bash
314295 buildah bud
315296 ` ` `
316297
317- 3 . Push the image to a remote registry, eg. Quay.io.
298+ 1 . Push the image to a remote registry, eg. Quay.io.
318299
319300 ` ` ` bash
320301 buildah push <image-digest-from-build-step> <remote-repository>
@@ -325,5 +306,3 @@ $ source .venv/bin/activate
325306 ` ` ` bash
326307 buildah login quay.io
327308 ` ` `
328-
329- [1] : https://pdm.fming.dev/latest/
0 commit comments