Added some todos and extended mypy ci-pipeline

merge-requests/6/merge
Clemens 1 year ago
parent 4667c58dbb
commit 1ba7f01b93

@ -22,6 +22,7 @@ mypy:
script:
- pip install -r dev_requirements.txt
- python -m mypy src/main/python/ddadevops/*.py --ignore-missing-imports
- python -m mypy src/main/python/ddadevops/*/*.py --ignore-missing-imports
pylint:
stage: lint&test

@ -22,7 +22,7 @@ class FileHandler(ABC):
case _:
raise Exception(
f'The file type "{config_file_type}" is not implemented')
# TODO: Attribute is only set in classmethod. Should this be initialized outside of this class?
file_handler.config_file_path = file_path
file_handler.config_file_type = config_file_type
return file_handler

@ -10,6 +10,7 @@ class PrepareReleaseService():
self.git_api = GitApi()
def __write_and_commit_version(self, version: Version, commit_message: str):
# TODO: isValid is missing
self.release.validate(self.release_repo.main_branch)
self.release_repo.version_repository.write_file(version.get_version_string())
@ -30,6 +31,7 @@ class TagAndPushReleaseService():
def tag_release(self, release: Release):
annotation = 'v' + release.version.get_version_string()
message = 'Release ' + annotation
# TODO: Why is the count a parameter? We always tag the second last commit in this process.
self.git_api.tag_annotated(annotation, message, 1)
def push_release(self):

@ -1,7 +1,7 @@
from pathlib import Path
import pytest as pt
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi, EnvironmentApi
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi, EnvironmentApi, JsonFileHandler
from src.main.python.ddadevops.release_mixin.infrastructure import VersionRepository
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
@ -100,4 +100,4 @@ def test_python(tmp_path):
repo.write_file(version.get_version_string())
# check
assert '3.1.3-SNAPSHOT' in th.TEST_FILE_PATH.read_text()
assert '3.1.3-SNAPSHOT' in th.TEST_FILE_PATH.read_text()

Loading…
Cancel
Save