diff options
author | Joey de l'Arago <joeydelarago@gmail.com> | 2022-09-06 12:26:17 +0300 |
---|---|---|
committer | Joey de l'Arago <joeydelarago@gmail.com> | 2022-09-06 12:26:17 +0300 |
commit | 3654b303c996bde48af8391e177f101a439a144b (patch) | |
tree | 7444c80f979767fc525a9f0dfa314aa967d63c94 | |
parent | 767f6e7e61ae24eb42c02e3ac17bd21a6f29fbb4 (diff) |
Remove unused filesCURA-9483_clean_up_CICD
CURA-9483
-rw-r--r-- | GitVersion.yml | 55 | ||||
-rw-r--r-- | pytest.ini | 4 | ||||
-rw-r--r-- | run_coverage.py | 22 | ||||
-rw-r--r-- | run_mypy.py | 85 |
4 files changed, 0 insertions, 166 deletions
diff --git a/GitVersion.yml b/GitVersion.yml deleted file mode 100644 index 6f94c14540..0000000000 --- a/GitVersion.yml +++ /dev/null @@ -1,55 +0,0 @@ -mode: ContinuousDelivery -next-version: 5.1 -branches: - main: - regex: ^main$ - mode: ContinuousDelivery - tag: alpha - increment: None - prevent-increment-of-merged-branch-version: true - track-merge-target: false - source-branches: [ ] - tracks-release-branches: false - is-release-branch: false - is-mainline: true - pre-release-weight: 55000 - develop: - regex: ^CURA-.*$ - mode: ContinuousDelivery - tag: alpha - increment: None - prevent-increment-of-merged-branch-version: false - track-merge-target: true - source-branches: [ 'main' ] - tracks-release-branches: true - is-release-branch: false - is-mainline: false - pre-release-weight: 0 - release: - regex: ^[\d]+\.[\d]+$ - mode: ContinuousDelivery - tag: beta - increment: None - prevent-increment-of-merged-branch-version: true - track-merge-target: false - source-branches: [ 'main' ] - tracks-release-branches: false - is-release-branch: true - is-mainline: false - pre-release-weight: 30000 - pull-request-main: - regex: ^(pull|pull\-requests|pr)[/-] - mode: ContinuousDelivery - tag: alpha+ - increment: Inherit - prevent-increment-of-merged-branch-version: true - tag-number-pattern: '[/-](?<number>\d+)[-/]' - track-merge-target: true - source-branches: [ 'main' ] - tracks-release-branches: false - is-release-branch: false - is-mainline: false - pre-release-weight: 30000 -ignore: - sha: [ ] -merge-message-formats: { } diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index de6e8797fb..0000000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -testpaths = tests -python_files = Test*.py -python_classes = Test diff --git a/run_coverage.py b/run_coverage.py deleted file mode 100644 index 2fd60f9342..0000000000 --- a/run_coverage.py +++ /dev/null @@ -1,22 +0,0 @@ -import pytest -from pathlib import Path - -# Small helper script to run the coverage of main code & all plugins - -path = Path("plugins") -args = ["--cov" ,"cura" , "--cov-report", "html"] -all_paths = [] -for p in path.glob('**/*'): - if p.is_dir(): - if p.name in ["__pycache__", "tests"]: - continue - args.append("--cov") - args.append(str(p)) - all_paths.append(str(p)) - -for path in all_paths: - args.append(path) -args.append(".") -args.append("-x") -pytest.main(args) - diff --git a/run_mypy.py b/run_mypy.py deleted file mode 100644 index 4486085064..0000000000 --- a/run_mypy.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python -import os -import sys -from multiprocessing.dummy import Pool -from functools import partial -from subprocess import call - -# A quick Python implementation of unix 'where' command. -def where(exe_name: str, search_path: str = os.getenv("PATH")) -> str: - if search_path is None: - search_path = "" - paths = search_path.split(os.pathsep) - result = "" - print(" -> sys.executable location: %s" % sys.executable) - sys_exec_dir = os.path.dirname(sys.executable) - root_dir = os.path.dirname(sys_exec_dir) - paths += [sys_exec_dir, - os.path.join(root_dir, "bin"), - os.path.join(root_dir, "scripts"), - ] - paths = set(paths) - - for path in sorted(paths): - print(" -> Searching %s" % path) - candidate_path = os.path.join(path, exe_name) - if os.path.exists(candidate_path): - result = candidate_path - break - return result - - -def findModules(path): - result = [] - for entry in os.scandir(path): - if entry.is_dir() and os.path.exists(os.path.join(path, entry.name, "__init__.py")): - result.append(entry.name) - return result - - -def main(): - # Find Uranium via the PYTHONPATH var - uraniumUMPath = where("UM", os.getenv("PYTHONPATH")) - if uraniumUMPath is None: - uraniumUMPath = os.path.join("..", "Uranium") - uraniumPath = os.path.dirname(uraniumUMPath) - - mypy_path_parts = [".", os.path.join(".", "plugins"), os.path.join(".", "plugins", "VersionUpgrade"), - uraniumPath, os.path.join(uraniumPath, "stubs")] - if sys.platform == "win32": - os.putenv("MYPYPATH", ";".join(mypy_path_parts)) - else: - os.putenv("MYPYPATH", ":".join(mypy_path_parts)) - - # Mypy really needs to be run via its Python script otherwise it can't find its data files. - mypy_exe_name = "mypy.exe" if sys.platform == "win32" else "mypy" - mypy_exe_dir = where(mypy_exe_name) - mypy_module = os.path.join(os.path.dirname(mypy_exe_dir), mypy_exe_name) - print("Found mypy exe path: %s" % mypy_exe_dir) - print("Found mypy module path: %s" % mypy_module) - - plugins = findModules("plugins") - plugins.sort() - - mods = ["cura"] + plugins + findModules("plugins/VersionUpgrade") - success_code = 0 - - pool = Pool(2) # Run two commands at once - - if sys.platform == "win32": - commands = ["%s -p %s --ignore-missing-imports" % (mypy_module, mod) for mod in mods] - else: - commands = ["%s %s -p %s --ignore-missing-imports" % (sys.executable, mypy_module, mod) for mod in mods] - - for i, returncode in enumerate(pool.imap(partial(call, shell=True), commands)): - if returncode != 0: - print("\nCommand {command} failed checking (code {errcode}). :(".format(command = commands[i], errcode = returncode)) - success_code = 1 - if success_code: - print("MYPY check was completed, but did not pass") - else: - print("MYPY check was completed and passed with flying colors") - return success_code - -if __name__ == "__main__": - sys.exit(main())
\ No newline at end of file |