-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-formatters
- Loading branch information
Showing
11 changed files
with
48 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"author_full_name": "scverse community", | ||
"author_email": "[email protected]", | ||
"github_user": "scverse", | ||
"project_repo": "https://github.com/scverse/cookiecutter-scverse-instance", | ||
"github_repo": "cookiecutter-scverse-instance", | ||
"license": "BSD 3-Clause License", | ||
"_copy_without_render": [ | ||
".github/workflows/**.yaml", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"author_full_name": "Your Name", | ||
"author_email": "[email protected]", | ||
"github_user": "your_github_username", | ||
"project_repo": "https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.project_name }}", | ||
"github_repo": "{{ cookiecutter.project_name }}", | ||
"license": [ | ||
"MIT License", | ||
"BSD 2-Clause License", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from __future__ import annotations | ||
|
||
import re | ||
from pathlib import Path | ||
from typing import TYPE_CHECKING | ||
|
||
import pytest | ||
from cookiecutter.main import cookiecutter | ||
|
||
if TYPE_CHECKING: | ||
from collections.abc import Mapping | ||
from typing import Any | ||
|
||
|
||
HERE = Path(__file__).parent | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("params", "path", "pattern"), | ||
[ | ||
({}, "docs/conf.py", r'"github_repo": project_name,'), | ||
({"github_repo": "floob"}, "docs/conf.py", r'"github_repo": "floob",'), | ||
], | ||
) | ||
def test_build(tmp_path: Path, params: Mapping[str, Any], path: Path | str, pattern: re.Pattern | str): | ||
cookiecutter(str(HERE.parent.parent), output_dir=tmp_path, no_input=True, extra_context=params) | ||
proj_dir = tmp_path / "project-name" | ||
assert proj_dir.is_dir() | ||
path = proj_dir / path | ||
pattern = re.compile(pattern, re.MULTILINE) | ||
assert pattern.search(path.read_text()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters