Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the pipeline configuration for GitLab by adjusting version retrieval in the Python package setup, updating the pre-commit JSON schema hook configuration, and modifying the CI job runner settings.
- Updated setup.py to derive the version dynamically from the package’s init.py
- Modified .pre-commit-config.yaml to point to an updated JSON schema hook repository and revision
- Removed Docker-specific tags in .gitlab-ci.yml to adjust runner selection
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| setup.py | Implements dynamic version retrieval and error handling |
| .pre-commit-config.yaml | Updates the JSON schema hook repository and revision for compliance |
| .gitlab-ci.yml | Removes Docker tags to potentially change runner selection |
Comments suppressed due to low confidence (1)
.gitlab-ci.yml:22
- Removing the 'tags' configuration may result in jobs running on unintended runners. Verify that the selected runners meet the requirements for these jobs.
- tags:
| match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content, re.M) | ||
| if match: |
There was a problem hiding this comment.
The regex pattern may fail to match the version string if there is leading whitespace before version. Consider updating the pattern to allow optional whitespace (e.g., '^\s*version = ...') to improve robustness.
| match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content, re.M) | |
| if match: | |
| match = re.search(r"^\s*__version__ = ['\"]([^'\"]*)['\"]", content, re.M) |
get version (fix ModuleNotFound error), remove tags Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de> add long description which got lost in last commit Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de> updated json schema checking Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de> added blank lines (flake8) Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de> add init.py for modules to be found in tests Signed-off-by: iripiri <ikoester@eonerc.rwth-aachen.de>
| import re | ||
|
|
||
|
|
||
| def get_version(): |
There was a problem hiding this comment.
I did not fully grasp why this is required. The import of the version variable seems a more elegant solution to me, and is also a common approach I've seen in other projects.
I will approve this PR, because we should migrate away from setup.py anyway, and adopt pyproject.toml instead.
No description provided.