prepare-assignment 0.4.3__tar.gz → 0.4.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/PKG-INFO +1 -1
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/preparer.py +12 -14
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/task_handler.py +2 -2
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/task_properties.py +22 -13
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/tasks.py +2 -2
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/pyproject.toml +1 -1
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_preparer.py +34 -1
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_task_handler.py +11 -0
- prepare_assignment-0.4.5/tests/data/test_task_properties.py +45 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/dependabot.yml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/workflows/pr-title.yml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/workflows/pypi-publish.yml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/workflows/release.yml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/workflows/semantic-release.yml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/workflows/test.yml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.gitignore +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.releaserc.json +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/LICENSE +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/README.md +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/__main__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/cli/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/cli/main.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/cli/task.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/cli/tasks.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/check.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/command.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/expression.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/main.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/runner.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/shell.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/subsituter.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/validator.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/versions.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/config.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/constants.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/errors.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/job_environment.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/prepare.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/task_definition.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/types.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/schemas/config.schema.json +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/schemas/prepare.schema.json +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/schemas/task.schema.json +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/config.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/default_validator.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/dependency.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/files.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/logger.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/paths.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/resources.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/virtual_env.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/yml_loader.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/conftest.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_check.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_command.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_expression.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_resolve_version.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_runner.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_runner_process.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_shell.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_substituter.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/core/test_validator.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/data/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/data/test_prepare.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/data/test_types.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/test_dependencies.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/test_main.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/testproject/prepare.yml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/testproject/solution/pom.xml +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/testproject/solution/src/main/java/gradelist/AssessmentResult.java +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/testproject/solution/src/main/java/gradelist/GradeList.java +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/testproject/solution/src/main/java/gradelist/Test.java +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/testproject/solution/src/test/java/gradelist/AssessmentResultTest.java +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/testproject/solution/src/test/java/gradelist/GradeListTest.java +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/utils/__init__.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/utils/test_config.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/utils/test_default_validator.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/utils/test_files.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/utils/test_logger.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/utils/test_paths.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/tests/utils/test_resources.py +0 -0
- {prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/uv.lock +0 -0
|
@@ -77,18 +77,18 @@ def __build_json_schema(props: TaskProperties, task: TaskDefinition) -> Dict[str
|
|
|
77
77
|
},
|
|
78
78
|
"required": ["uses"],
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
# A task without inputs still accepts an empty 'with'
|
|
81
|
+
properties: Dict[str, Any] = {}
|
|
82
|
+
required: List[str] = []
|
|
83
|
+
for inp in task.inputs:
|
|
84
|
+
properties[inp.name] = inp.to_schema_definition()
|
|
85
|
+
if inp.required:
|
|
86
|
+
required.append(inp.name)
|
|
87
|
+
with_schema: Dict[str, Any] = {"type": "object", "additionalProperties": False, "properties": properties}
|
|
88
|
+
if len(required) > 0:
|
|
89
|
+
with_schema["required"] = required
|
|
90
|
+
schema["required"].append("with")
|
|
91
|
+
schema["properties"]["with"] = with_schema
|
|
92
92
|
return schema
|
|
93
93
|
|
|
94
94
|
|
|
@@ -273,8 +273,6 @@ def __prepare_tasks(tasks: List[Any], parsed: Optional[Dict[str, ValidableTask]]
|
|
|
273
273
|
else:
|
|
274
274
|
logger.debug(f"Task '{props}' has already been loaded in this run")
|
|
275
275
|
if check_inputs and file is not None:
|
|
276
|
-
if task_def.get("with", None) is None:
|
|
277
|
-
task_def["with"] = {}
|
|
278
276
|
validate_tasks(file, task_def, parsed[str(props)]["schema"])
|
|
279
277
|
logger.debug("All (sub-)tasks prepared")
|
|
280
278
|
return parsed
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/core/task_handler.py
RENAMED
|
@@ -9,7 +9,7 @@ from treelib import Tree
|
|
|
9
9
|
from prepare_assignment.core.preparer import __prepare_tasks
|
|
10
10
|
from prepare_assignment.core.versions import get_git_url, is_fixed_version
|
|
11
11
|
from prepare_assignment.data.task_definition import TaskDefinition
|
|
12
|
-
from prepare_assignment.data.task_properties import TaskProperties
|
|
12
|
+
from prepare_assignment.data.task_properties import TaskProperties, directory_to_version
|
|
13
13
|
from prepare_assignment.utils.files import remove_tree
|
|
14
14
|
from prepare_assignment.utils.dependency import get_dependencies
|
|
15
15
|
from prepare_assignment.utils.paths import get_tasks_path
|
|
@@ -88,7 +88,7 @@ def ls() -> None:
|
|
|
88
88
|
version_path = os.path.join(org_path, task)
|
|
89
89
|
versions = sorted(os.listdir(version_path))
|
|
90
90
|
for version in versions:
|
|
91
|
-
tree.create_node(version, parent=task)
|
|
91
|
+
tree.create_node(directory_to_version(version), parent=task)
|
|
92
92
|
t = tree.show(stdout=False)
|
|
93
93
|
print(t)
|
|
94
94
|
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/task_properties.py
RENAMED
|
@@ -18,7 +18,14 @@ class TaskProperties:
|
|
|
18
18
|
|
|
19
19
|
@cached_property
|
|
20
20
|
def task_path(self) -> Path:
|
|
21
|
-
return Path(os.path.join(tasks_path, self.organization, self.name, self.
|
|
21
|
+
return Path(os.path.join(tasks_path, self.organization, self.name, self.version_directory))
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def version_directory(self) -> str:
|
|
25
|
+
"""
|
|
26
|
+
The version as a single directory name, a branch can contain a slash (e.g. fix/something)
|
|
27
|
+
"""
|
|
28
|
+
return version_to_directory(self.version)
|
|
22
29
|
|
|
23
30
|
@cached_property
|
|
24
31
|
def repo_path(self) -> Path:
|
|
@@ -38,19 +45,21 @@ class TaskProperties:
|
|
|
38
45
|
|
|
39
46
|
@classmethod
|
|
40
47
|
def of(cls, task: str) -> TaskProperties:
|
|
41
|
-
|
|
48
|
+
# Everything after the first '@' is the version, a branch can contain a slash
|
|
49
|
+
name, separator, version = task.partition("@")
|
|
50
|
+
if not separator:
|
|
51
|
+
version = "latest"
|
|
52
|
+
parts = name.split("/")
|
|
42
53
|
if len(parts) > 2:
|
|
43
54
|
raise ValueError("Tasks cannot have more than one slash")
|
|
44
55
|
elif len(parts) == 1:
|
|
45
56
|
parts.insert(0, "prepare-assignment")
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
version = split[1]
|
|
56
|
-
return cls(organization, task_name, version)
|
|
57
|
+
return cls(parts[0], parts[1], version)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def version_to_directory(version: str) -> str:
|
|
61
|
+
return version.replace("%", "%25").replace("/", "%2F")
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def directory_to_version(directory: str) -> str:
|
|
65
|
+
return directory.replace("%2F", "/").replace("%25", "%")
|
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
4
|
from prepare_assignment.data.task_definition import TaskDefinition
|
|
5
|
-
from prepare_assignment.data.task_properties import TaskProperties
|
|
5
|
+
from prepare_assignment.data.task_properties import TaskProperties, directory_to_version
|
|
6
6
|
from prepare_assignment.utils.paths import get_tasks_path
|
|
7
7
|
from prepare_assignment.utils.yml_loader import YAML_LOADER
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@ def get_all_tasks() -> List[TaskProperties]:
|
|
|
20
20
|
version_path = os.path.join(org_path, task)
|
|
21
21
|
versions = os.listdir(version_path)
|
|
22
22
|
for version in versions:
|
|
23
|
-
tasks.append(TaskProperties
|
|
23
|
+
tasks.append(TaskProperties(org, task, directory_to_version(version)))
|
|
24
24
|
return tasks
|
|
25
25
|
|
|
26
26
|
|
|
@@ -8,7 +8,7 @@ import pytest
|
|
|
8
8
|
from pytest_mock import MockerFixture
|
|
9
9
|
|
|
10
10
|
from prepare_assignment.core.preparer import prepare_tasks, __task_install_dependencies
|
|
11
|
-
from prepare_assignment.data.errors import DependencyError, PrepareTaskError
|
|
11
|
+
from prepare_assignment.data.errors import DependencyError, PrepareTaskError, ValidationError
|
|
12
12
|
from virtualenv import cli_run # type: ignore
|
|
13
13
|
|
|
14
14
|
from prepare_assignment.utils.files import remove_tree
|
|
@@ -317,3 +317,36 @@ def test_cached_composite_duplicate_id_is_rejected(mocker: MockerFixture) -> Non
|
|
|
317
317
|
with pytest.raises(PrepareTaskError) as exc:
|
|
318
318
|
prepare_tasks("prepare.yml", prepare)
|
|
319
319
|
assert "multiple steps with id 'same'" in str(exc.value.cause)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
NO_INPUTS_TASK: Final[Dict[str, Any]] = {
|
|
323
|
+
'id': 'noinputs',
|
|
324
|
+
'name': 'No inputs',
|
|
325
|
+
'description': 'Task without inputs',
|
|
326
|
+
'runs': {'using': 'composite', 'tasks': [{'name': 'say', 'run': 'echo hello'}]}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@pytest.mark.parametrize("step", [
|
|
331
|
+
{'name': 'no with', 'uses': 'noinputs'},
|
|
332
|
+
{'name': 'empty with', 'uses': 'noinputs', 'with': {}},
|
|
333
|
+
{'name': 'null with', 'uses': 'noinputs', 'with': None},
|
|
334
|
+
])
|
|
335
|
+
def test_task_without_inputs(mocker: MockerFixture, step: Dict[str, Any]) -> None:
|
|
336
|
+
__clean_cache()
|
|
337
|
+
mocker.patch("prepare_assignment.core.preparer.__download_task",
|
|
338
|
+
side_effect=lambda props: props.repo_path.mkdir(parents=True, exist_ok=True))
|
|
339
|
+
mocker.patch("prepare_assignment.core.preparer.validate_task_definition", return_value=NO_INPUTS_TASK)
|
|
340
|
+
mapping = prepare_tasks("prepare.yml", {'prepare': [step]})
|
|
341
|
+
assert list(mapping) == ["prepare-assignment/noinputs@latest"]
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def test_task_without_inputs_rejects_unknown_input(mocker: MockerFixture) -> None:
|
|
345
|
+
__clean_cache()
|
|
346
|
+
mocker.patch("prepare_assignment.core.preparer.__download_task",
|
|
347
|
+
side_effect=lambda props: props.repo_path.mkdir(parents=True, exist_ok=True))
|
|
348
|
+
mocker.patch("prepare_assignment.core.preparer.validate_task_definition", return_value=NO_INPUTS_TASK)
|
|
349
|
+
step = {'name': 'typo', 'uses': 'noinputs', 'with': {'inptu': 'x'}}
|
|
350
|
+
with pytest.raises(ValidationError) as exc:
|
|
351
|
+
prepare_tasks("prepare.yml", {'prepare': [step]})
|
|
352
|
+
assert "'inptu' was unexpected" in exc.value.message
|
|
@@ -93,3 +93,14 @@ def test_load_task_uses_task_path(tasks_dir: Path) -> None:
|
|
|
93
93
|
props = TaskProperties.of("remove")
|
|
94
94
|
_install_fake(props, "x")
|
|
95
95
|
assert load_task(props).path == props.task_path
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def test_version_with_slash(tasks_dir: Path, mocker: MockerFixture, capsys: pytest.CaptureFixture) -> None:
|
|
99
|
+
from prepare_assignment.utils.tasks import get_all_tasks
|
|
100
|
+
mocker.patch("prepare_assignment.utils.tasks.get_tasks_path", return_value=tasks_dir)
|
|
101
|
+
mocker.patch("prepare_assignment.core.task_handler.tasks_path", tasks_dir)
|
|
102
|
+
props = TaskProperties.of("remove@fix/something")
|
|
103
|
+
_install_fake(props, "branch")
|
|
104
|
+
assert get_all_tasks() == [props]
|
|
105
|
+
task_handler.ls()
|
|
106
|
+
assert "fix/something" in capsys.readouterr().out
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from prepare_assignment.data.task_properties import TaskProperties, directory_to_version, version_to_directory
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@pytest.mark.parametrize("task, expected", [
|
|
9
|
+
("remove", TaskProperties("prepare-assignment", "remove", "latest")),
|
|
10
|
+
("remove@v1", TaskProperties("prepare-assignment", "remove", "v1")),
|
|
11
|
+
("prepare-assignment/remove", TaskProperties("prepare-assignment", "remove", "latest")),
|
|
12
|
+
("org/remove@v1.0.0", TaskProperties("org", "remove", "v1.0.0")),
|
|
13
|
+
("prc2-assignment@fix/tasks-and-shell", TaskProperties("prepare-assignment", "prc2-assignment",
|
|
14
|
+
"fix/tasks-and-shell")),
|
|
15
|
+
("prepare-assignment/remove@fix/something", TaskProperties("prepare-assignment", "remove", "fix/something")),
|
|
16
|
+
("remove@feat/a@b", TaskProperties("prepare-assignment", "remove", "feat/a@b")),
|
|
17
|
+
])
|
|
18
|
+
def test_of(task: str, expected: TaskProperties) -> None:
|
|
19
|
+
assert TaskProperties.of(task) == expected
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def test_of_more_than_one_slash_in_name() -> None:
|
|
23
|
+
with pytest.raises(ValueError):
|
|
24
|
+
TaskProperties.of("a/b/c@v1")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_str_keeps_slash_in_version() -> None:
|
|
28
|
+
assert str(TaskProperties.of("remove@fix/something")) == "prepare-assignment/remove@fix/something"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_task_path_is_single_directory_for_version() -> None:
|
|
32
|
+
props = TaskProperties.of("remove@fix/something")
|
|
33
|
+
assert props.task_path.name == "fix%2Fsomething"
|
|
34
|
+
assert props.task_path.parent.name == "remove"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_task_path_unchanged_for_plain_version() -> None:
|
|
38
|
+
assert TaskProperties.of("remove@v1.0.0").task_path.name == "v1.0.0"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@pytest.mark.parametrize("version", ["v1", "fix/something", "a/b/c", "100%", "%2F", "a%2F/b%25"])
|
|
42
|
+
def test_version_directory_round_trip(version: str) -> None:
|
|
43
|
+
directory = version_to_directory(version)
|
|
44
|
+
assert os.sep not in directory
|
|
45
|
+
assert directory_to_version(directory) == version
|
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/ISSUE_TEMPLATE/feature_request.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/.github/workflows/semantic-release.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/job_environment.py
RENAMED
|
File without changes
|
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/data/task_definition.py
RENAMED
|
File without changes
|
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/schemas/config.schema.json
RENAMED
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/schemas/prepare.schema.json
RENAMED
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/schemas/task.schema.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/default_validator.py
RENAMED
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/dependency.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/virtual_env.py
RENAMED
|
File without changes
|
{prepare_assignment-0.4.3 → prepare_assignment-0.4.5}/prepare_assignment/utils/yml_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|