codetour-cli 0.1.0__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.
- codetour_cli-0.1.0/LICENSE +21 -0
- codetour_cli-0.1.0/PKG-INFO +47 -0
- codetour_cli-0.1.0/README.md +10 -0
- codetour_cli-0.1.0/pyproject.toml +81 -0
- codetour_cli-0.1.0/setup.cfg +4 -0
- codetour_cli-0.1.0/src/codetour_cli/__init__.py +9 -0
- codetour_cli-0.1.0/src/codetour_cli/cli.py +2087 -0
- codetour_cli-0.1.0/src/codetour_cli/config.py +144 -0
- codetour_cli-0.1.0/src/codetour_cli/description_validator.py +197 -0
- codetour_cli-0.1.0/src/codetour_cli/detection.py +91 -0
- codetour_cli-0.1.0/src/codetour_cli/discovery.py +226 -0
- codetour_cli-0.1.0/src/codetour_cli/lint.py +334 -0
- codetour_cli-0.1.0/src/codetour_cli/logging/__init__.py +6 -0
- codetour_cli-0.1.0/src/codetour_cli/logging/setup.py +63 -0
- codetour_cli-0.1.0/src/codetour_cli/migration/__init__.py +6 -0
- codetour_cli-0.1.0/src/codetour_cli/migration/direct.py +385 -0
- codetour_cli-0.1.0/src/codetour_cli/migration/git_diff.py +418 -0
- codetour_cli-0.1.0/src/codetour_cli/migration/stepwise.py +400 -0
- codetour_cli-0.1.0/src/codetour_cli/review_parser.py +348 -0
- codetour_cli-0.1.0/src/codetour_cli/schema_models.py +203 -0
- codetour_cli-0.1.0/src/codetour_cli/tour/__init__.py +6 -0
- codetour_cli-0.1.0/src/codetour_cli/tour/schema.py +255 -0
- codetour_cli-0.1.0/src/codetour_cli/tour/updater.py +428 -0
- codetour_cli-0.1.0/src/codetour_cli.egg-info/PKG-INFO +47 -0
- codetour_cli-0.1.0/src/codetour_cli.egg-info/SOURCES.txt +49 -0
- codetour_cli-0.1.0/src/codetour_cli.egg-info/dependency_links.txt +1 -0
- codetour_cli-0.1.0/src/codetour_cli.egg-info/entry_points.txt +2 -0
- codetour_cli-0.1.0/src/codetour_cli.egg-info/requires.txt +16 -0
- codetour_cli-0.1.0/src/codetour_cli.egg-info/top_level.txt +1 -0
- codetour_cli-0.1.0/tests/test_advanced_scenarios.py +490 -0
- codetour_cli-0.1.0/tests/test_apply_review_surgical_integration.py +261 -0
- codetour_cli-0.1.0/tests/test_description_validation.py +297 -0
- codetour_cli-0.1.0/tests/test_detection.py +211 -0
- codetour_cli-0.1.0/tests/test_direct_migration.py +312 -0
- codetour_cli-0.1.0/tests/test_fuzzy_repo_calibration.py +187 -0
- codetour_cli-0.1.0/tests/test_git_diff_parser.py +342 -0
- codetour_cli-0.1.0/tests/test_harness.py +334 -0
- codetour_cli-0.1.0/tests/test_integration.py +499 -0
- codetour_cli-0.1.0/tests/test_lint.py +298 -0
- codetour_cli-0.1.0/tests/test_lint_cli.py +137 -0
- codetour_cli-0.1.0/tests/test_logging_setup.py +69 -0
- codetour_cli-0.1.0/tests/test_pattern_validation.py +349 -0
- codetour_cli-0.1.0/tests/test_post_migration_lint.py +83 -0
- codetour_cli-0.1.0/tests/test_review_roundtrip.py +439 -0
- codetour_cli-0.1.0/tests/test_scenarios.py +213 -0
- codetour_cli-0.1.0/tests/test_schema_validation.py +479 -0
- codetour_cli-0.1.0/tests/test_stepwise_migration.py +419 -0
- codetour_cli-0.1.0/tests/test_synthetic_repo_migration_engine.py +136 -0
- codetour_cli-0.1.0/tests/test_templates.py +200 -0
- codetour_cli-0.1.0/tests/test_tour_schema.py +545 -0
- codetour_cli-0.1.0/tests/test_tour_updater.py +439 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jérémie Lumbroso
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codetour-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Algorithmic maintenance of CodeTour files — an unofficial companion CLI for the CodeTour VS Code extension
|
|
5
|
+
Author: Jérémie Lumbroso
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/jlumbroso/codetour-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/jlumbroso/codetour-cli
|
|
9
|
+
Keywords: codetour,code-tour,vscode,git,cli
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: gitpython
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Requires-Dist: structlog
|
|
24
|
+
Requires-Dist: rich
|
|
25
|
+
Requires-Dist: python-dotenv
|
|
26
|
+
Requires-Dist: pyyaml
|
|
27
|
+
Requires-Dist: click>=8.0
|
|
28
|
+
Requires-Dist: jinja2>=3.0
|
|
29
|
+
Requires-Dist: json-source-edit<2,>=1.0
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
33
|
+
Requires-Dist: black; extra == "dev"
|
|
34
|
+
Requires-Dist: ruff; extra == "dev"
|
|
35
|
+
Requires-Dist: mypy; extra == "dev"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# CodeTour CLI
|
|
39
|
+
|
|
40
|
+
A CLI to reliably migrate CodeTours in the background, and prevent drift.
|
|
41
|
+
|
|
42
|
+
> **Unofficial companion tool.** `codetour-cli` is an independent,
|
|
43
|
+
> unofficial companion to [CodeTour](https://github.com/microsoft/codetour),
|
|
44
|
+
> the VS Code extension by Jonathan Carter (Microsoft). It is not
|
|
45
|
+
> affiliated with, endorsed by, or maintained by Microsoft or the CodeTour
|
|
46
|
+
> project. It exists to *serve* CodeTour and its users — keeping `.tour`
|
|
47
|
+
> files accurate as the code they walk through evolves.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CodeTour CLI
|
|
2
|
+
|
|
3
|
+
A CLI to reliably migrate CodeTours in the background, and prevent drift.
|
|
4
|
+
|
|
5
|
+
> **Unofficial companion tool.** `codetour-cli` is an independent,
|
|
6
|
+
> unofficial companion to [CodeTour](https://github.com/microsoft/codetour),
|
|
7
|
+
> the VS Code extension by Jonathan Carter (Microsoft). It is not
|
|
8
|
+
> affiliated with, endorsed by, or maintained by Microsoft or the CodeTour
|
|
9
|
+
> project. It exists to *serve* CodeTour and its users — keeping `.tour`
|
|
10
|
+
> files accurate as the code they walk through evolves.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "codetour-cli"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Algorithmic maintenance of CodeTour files — an unofficial companion CLI for the CodeTour VS Code extension"
|
|
9
|
+
authors = [{name = "Jérémie Lumbroso"}]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
requires-python = ">=3.10"
|
|
13
|
+
keywords = ["codetour", "code-tour", "vscode", "git", "cli"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Topic :: Software Development :: Version Control :: Git",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"gitpython",
|
|
26
|
+
"pydantic>=2.0",
|
|
27
|
+
"structlog",
|
|
28
|
+
"rich",
|
|
29
|
+
"python-dotenv",
|
|
30
|
+
"pyyaml",
|
|
31
|
+
"click>=8.0",
|
|
32
|
+
# Lazily imported by the template renderer (cli.py get_jinja_env) --
|
|
33
|
+
# was undeclared until 2026-08-17, which broke every no-extras install
|
|
34
|
+
# on its first `review` command (found in the v0.1.0 readiness pass;
|
|
35
|
+
# the cold-install CI job regresses this class).
|
|
36
|
+
"jinja2>=3.0",
|
|
37
|
+
# v1.0.0 verified transparent to this CLI: identical 221/221 suite
|
|
38
|
+
# results under 0.6.0 and 1.0.0 (the CLI catches only ValueError,
|
|
39
|
+
# whose base PathResolutionError deliberately preserved -- jse ADR-0015).
|
|
40
|
+
"json-source-edit>=1.0,<2",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.optional-dependencies]
|
|
44
|
+
dev = [
|
|
45
|
+
"pytest",
|
|
46
|
+
"pytest-cov",
|
|
47
|
+
"black",
|
|
48
|
+
"ruff",
|
|
49
|
+
"mypy",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[project.scripts]
|
|
53
|
+
codetour-cli = "codetour_cli.cli:main"
|
|
54
|
+
|
|
55
|
+
[project.urls]
|
|
56
|
+
Homepage = "https://github.com/jlumbroso/codetour-cli"
|
|
57
|
+
Repository = "https://github.com/jlumbroso/codetour-cli"
|
|
58
|
+
|
|
59
|
+
[tool.setuptools.packages.find]
|
|
60
|
+
where = ["src"]
|
|
61
|
+
|
|
62
|
+
[tool.pytest.ini_options]
|
|
63
|
+
# Bare `pytest` (what CI runs) must not collect _archive/ -- the archived
|
|
64
|
+
# pre-extraction vendored json-source-edit tests import a module layout
|
|
65
|
+
# that no longer exists and fail collection (first CI run, 2026-08-17).
|
|
66
|
+
# Same convention as json-source-edit's own pyproject.
|
|
67
|
+
testpaths = ["tests"]
|
|
68
|
+
|
|
69
|
+
[tool.black]
|
|
70
|
+
line-length = 100
|
|
71
|
+
target-version = ['py310', 'py311', 'py312']
|
|
72
|
+
|
|
73
|
+
[tool.ruff]
|
|
74
|
+
line-length = 100
|
|
75
|
+
target-version = "py310"
|
|
76
|
+
|
|
77
|
+
[tool.mypy]
|
|
78
|
+
python_version = "3.10"
|
|
79
|
+
warn_return_any = true
|
|
80
|
+
warn_unused_configs = true
|
|
81
|
+
disallow_untyped_defs = true
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
codetour-cli: Algorithmic maintenance of CodeTour files.
|
|
3
|
+
|
|
4
|
+
This package provides tools to automatically update CodeTour files when code changes,
|
|
5
|
+
solving the line-number drift problem through Git-aware migration algorithms.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
__author__ = "Jérémie Lumbroso"
|