From fd5d355cdb8d38da5df797cfddbd220c3f75d3a2 Mon Sep 17 00:00:00 2001 From: Daniel D'Avella Date: Tue, 24 Oct 2023 14:30:52 -0400 Subject: [PATCH] Move scripts module; update test case --- .coveragerc | 2 ++ pyproject.toml | 2 +- src/{ => codemodder}/scripts/__init__.py | 0 src/{ => codemodder}/scripts/generate_docs.py | 0 tests/test_codemod_docs.py | 2 ++ 5 files changed, 5 insertions(+), 1 deletion(-) rename src/{ => codemodder}/scripts/__init__.py (100%) rename src/{ => codemodder}/scripts/generate_docs.py (100%) diff --git a/.coveragerc b/.coveragerc index 1f512de80..fa4bcb5b5 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,5 +1,7 @@ [run] source = codemodder +omit = + src/codemodder/scripts/* [paths] codemodder = diff --git a/pyproject.toml b/pyproject.toml index cc9073715..bc7e490cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ [project.scripts] codemodder = "codemodder.codemodder:main" -generate-docs = 'scripts.generate_docs:main' +generate-docs = 'codemodder.scripts.generate_docs:main' [project.entry-points.codemods] diff --git a/src/scripts/__init__.py b/src/codemodder/scripts/__init__.py similarity index 100% rename from src/scripts/__init__.py rename to src/codemodder/scripts/__init__.py diff --git a/src/scripts/generate_docs.py b/src/codemodder/scripts/generate_docs.py similarity index 100% rename from src/scripts/generate_docs.py rename to src/codemodder/scripts/generate_docs.py diff --git a/tests/test_codemod_docs.py b/tests/test_codemod_docs.py index 2c7174167..2329a620a 100644 --- a/tests/test_codemod_docs.py +++ b/tests/test_codemod_docs.py @@ -1,6 +1,7 @@ import pytest from codemodder.registry import load_registered_codemods +from codemodder.scripts.generate_docs import METADATA def pytest_generate_tests(metafunc): @@ -18,3 +19,4 @@ def test_load_codemod_docs_info(codemod): "Merge After Cursory Review", "Merge Without Review", ) + assert codemod.name in METADATA