Description
Building Sphinx docs fails because docs/scripts/generate_cookiecutter_cli.py calls shutil.copytree() with a directory that does not exist. The failure happens when conf.py runs generate_cookiecutter_cli() on import.
|
from generate_cookiecutter_cli import main as generate_cookiecutter_cli # noqa: E402 |
Behaviour
The script assumes that the generated project folder is always named example-repository.
|
self.repo_name = "example-repository" |
In reality, Jinja generates <repo_name> in cookiecutter.json from project_name.
For example, the project name mia_test generates a folder mia_test - not example-repository, and this mismatch is what shutil.copytree() doesn't like.
|
source_repo = os.path.join(tmpdir, self.repo_name) |
|
destination_repo = str(self.example_repo_path.resolve()) |
|
shutil.rmtree(destination_repo, ignore_errors=True) |
|
shutil.copytree(source_repo, destination_repo) |
Description
Building Sphinx docs fails because docs/scripts/generate_cookiecutter_cli.py calls
shutil.copytree()with a directory that does not exist. The failure happens when conf.py runs generate_cookiecutter_cli() on import.cookiecutter-mdakit/docs/source/conf.py
Line 23 in 2856a05
Behaviour
The script assumes that the generated project folder is always named
example-repository.cookiecutter-mdakit/docs/scripts/generate_cookiecutter_cli.py
Line 81 in 2856a05
In reality, Jinja generates
<repo_name>incookiecutter.jsonfromproject_name.For example, the project name
mia_testgenerates a foldermia_test- notexample-repository, and this mismatch is whatshutil.copytree()doesn't like.cookiecutter-mdakit/docs/scripts/generate_cookiecutter_cli.py
Lines 114 to 117 in 2856a05