Skip to content

Commit fbea5ba

Browse files
committed
Revert "[ISV-3309] Add dependency manager. (#454)"
This reverts commit a3582c9.
1 parent e157167 commit fbea5ba

File tree

10 files changed

+35
-1043
lines changed

10 files changed

+35
-1043
lines changed

.github/workflows/validation.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,8 @@ jobs:
1313
name: Run unit tests and linters
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@v3
18-
19-
- name: Set up PDM
20-
uses: pdm-project/setup-pdm@v3
16+
- uses: actions/checkout@v3
17+
- uses: fedora-python/[email protected]
2118
with:
22-
python-version: "3.10"
23-
24-
- name: Install dependencies
25-
run: |
26-
pdm sync -dG operator-pipelines-dev
27-
pdm sync -dG tox
28-
29-
- name: Run Tests
30-
run: |
31-
pdm run -v tox
19+
tox_env: black,test,yamllint
20+
dnf_install: krb5-devel krb5-workstation

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,3 @@ dmypy.json
146146
.*.sw?
147147
ansible/vault-password*
148148

149-
.pdm-python

docs/developer-guide.md

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
295285
tox
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

309290
1. 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/

operator-pipeline-images/Dockerfile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,6 @@ WORKDIR /home/user
6161

6262
COPY ./operator-pipeline-images ./
6363

64-
# install PDM
65-
RUN pip3 install --upgrade pip setuptools wheel && pip3 install pdm
66-
# install dependencies in virtual environment
67-
COPY ./pdm.lock ./pyproject.toml ./README.md ./
68-
RUN pdm install --no-lock --no-editable \
69-
--group operator-pipelines \
70-
--group operator-pipelines-dev
71-
72-
ENV VIRTUAL_ENV=./.venv
73-
RUN python3 -m venv $VIRTUAL_ENV
74-
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
75-
7664
RUN pip3 install .
7765

7866
# set dir ownership
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include requirements.txt
2+
include requirements-dev.txt
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
black
2+
pytest
3+
pytest-cov
4+
yamllint
5+
requests-mock
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
python-magic==0.4.24
2+
pyyaml==5.4.1
3+
requests==2.31.0
4+
yq==2.12.2
5+
giturlparse==0.10.0
6+
html2text==2020.1.16
7+
requests_kerberos==0.12.0
8+
python-dateutil==2.8.2
9+
humanize==3.12.0
10+
stomp.py==8.0.1

0 commit comments

Comments
 (0)