Conversation
β¦files when releasing new version of Cratey-Validator
douglowe
left a comment
There was a problem hiding this comment.
I've added a couple of comments below. I'd like us to make this build specific to five-safes rocrates, so the naming should reflect this. Also we need to make sure to copy across a tagged release of our five-safes profile, so that we can in future say which exact version of the profile this will test against.
β¦file version is accessible through a label () or as an environment variable from inside the Docker image ().
douglowe
left a comment
There was a problem hiding this comment.
I've added a note regarding changing the location that the profile is extracted to.
On a broader compatibility note, I've tested building this container, and found that the five safes rocrate profile isn't compatible with the rocrate validator version in this container.
When I try to list the profiles I get the following error:
β /usr/local/lib/python3.11/site-packages/rocrate_validator/profiles/five-safes-crate/must/15_meta β
β data_file.py:17 in <module> β
β β
β 14 β
β 15 import re β
β 16 β
β β± 17 import rocrate_validator.log as logging β
β 18 from rocrate_validator.models import Severity, ValidationContext β
β 19 from rocrate_validator.requirements.python import PyFunctionCheck, check, requirement β
β 20 β
β°βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ―
ModuleNotFoundError: No module named 'rocrate_validator.log'
Do we need to import rocrate_validator.log in this file? Is this an error that has already been fixed? If so we should make a new release which includes the fix.
| mkdir -p /app/profiles | ||
| wget -O /tmp/rocrate-validator-profiles.tar.gz "$PROFILES_ARCHIVE_URL" | ||
| tar -xzf /tmp/rocrate-validator-profiles.tar.gz \ | ||
| -C /app/profiles \ |
There was a problem hiding this comment.
We need to put the profiles data into the default directory, otherwise they will not be found by the validator. In this case it is: /usr/local/lib/python3.11/site-packages/rocrate_validator/profiles/
I don't like the bare python version in this string, so I would add this line at the top of the build script:
ARG PY_VER=3.11
And then:
-C /usr/local/lib/python${PY_VER}/site-packages/rocrate_validator/profiles/ \
Closes #135
Added dockerfile and workflow to build Docker image with baked-in profiles when releasing new version of Cratey-Validator.