Changes from review comments.

This commit is contained in:
RD 2024-11-24 19:08:34 -08:00
parent 705dcbabad
commit ff294c4ebb
3 changed files with 24 additions and 20 deletions

View file

@ -188,11 +188,15 @@ class Optimizer:
function_to_optimize.function_name, function_to_optimize.parents, original_module_ast
)
):
logger.warning(
logger.info(
f"Function {function_to_optimize.qualified_name} not found in {original_module_path}.\n"
f"Skipping optimization."
)
continue
if function_to_optimize_code := ast.get_source_segment(
original_module_code, function_to_optimize_ast, padded=True
):
code_print(function_to_optimize_code)
concolic_test_suite_dir: Path | None = None
function_to_concolic_tests: dict[str, list[FunctionCalledInTest]] = {}
@ -230,7 +234,7 @@ class Optimizer:
concolic_test_suite_path = concolic_test_suite_dir / "test_concolic_coverage.py"
concolic_test_suite_path.write_text(concolic_test_suite_code, encoding="utf8")
logger.info(f"Discovering concolic unit tests in {concolic_test_suite_path}")
logger.debug(f"Discovering concolic unit tests in {concolic_test_suite_path}")
concolic_test_cfg = TestConfig(
tests_root=concolic_test_suite_dir,
tests_project_rootdir=concolic_test_suite_dir_root,
@ -242,7 +246,7 @@ class Optimizer:
num_discovered_concolic_tests: int = sum(
[len(value) for value in function_to_concolic_tests.values()]
)
logger.info(
logger.warning(
f"Discovered {num_discovered_concolic_tests} "
f"concolic unit test{'s' if num_discovered_concolic_tests != 1 else ''} "
f"in {concolic_test_suite_path}"

View file

@ -22,7 +22,7 @@ class TestType(Enum):
def to_name(self) -> str:
names = {
TestType.EXISTING_UNIT_TEST: " Existing Unit Tests",
TestType.EXISTING_UNIT_TEST: "Existing Unit Tests",
TestType.INSPIRED_REGRESSION: "🎨 Inspired Regression Tests",
TestType.GENERATED_REGRESSION: "🌀 Generated Regression Tests",
TestType.REPLAY_TEST: "⏪ Replay Tests",

View file

@ -67,7 +67,7 @@ exclude = [
# Versions here the minimum required versions for the project. These should be as loose as possible.
[tool.poetry.dependencies]
python = "^3.9"
python = ">=3.9"
unidiff = ">=0.7.4"
pytest = ">=7.0.0"
gitpython = ">=3.1.31"
@ -89,9 +89,9 @@ sentry-sdk = ">=1.40.6,<3.0.0"
parameterized = ">=0.9.0"
returns = ">=0.23"
isort = ">=5.11.0"
dill = "^0.3.8"
rich = "^13.8.1"
lxml = "^5.3.0"
dill = ">=0.3.8"
rich = ">=13.8.1"
lxml = ">=5.3.0"
crosshair-tool = ">=0.0.78"
coverage = ">=7.6.4"
@ -103,21 +103,21 @@ optional = true
# poetry self add poetry-dynamic-versioning
[tool.poetry.group.dev.dependencies]
ipython = "^8.12.0"
ipython = ">=8.12.0"
mypy = ">=1.13"
ruff = ">=0.7.0"
lxml-stubs = "^0.5.1"
lxml-stubs = ">=0.5.1"
pandas-stubs = ">=2.2.2.240807, <2.2.3.241009"
types-Pygments = "^2.18.0.20240506"
types-colorama = "^0.4.15.20240311"
types-decorator = "^5.1.8.20240310"
types-jsonschema = "^4.23.0.20240813"
types-requests = "^2.32.0.20241016"
types-six = "^1.16.21.20241009"
types-cffi = "^1.16.0.20240331"
types-openpyxl = "^3.1.5.20241020"
types-regex = "^2024.9.11.20240912"
types-python-dateutil = "^2.9.0.20241003"
types-Pygments = ">=2.18.0.20240506"
types-colorama = ">=0.4.15.20240311"
types-decorator = ">=5.1.8.20240310"
types-jsonschema = ">=4.23.0.20240813"
types-requests = ">=2.32.0.20241016"
types-six = ">=1.16.21.20241009"
types-cffi = ">=1.16.0.20240331"
types-openpyxl = ">=3.1.5.20241020"
types-regex = ">=2024.9.11.20240912"
types-python-dateutil = ">=2.9.0.20241003"
[tool.poetry.build]
script = "codeflash/update_license_version.py"