Skip to content

Commit

Permalink
fix: moved to src folder (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankanno authored Oct 24, 2024
1 parent 5cf0a8a commit eec7e87
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/test_cookiecutter_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@

def get_expected_baked_files(package_name: str) -> typing.List[str]:
return EXPECTED_BASE_BAKED_FILES + [
f'/{package_name}/__init__.py',
f'/{package_name}/{package_name}.py',
f'/src/{package_name}/__init__.py',
f'/src/{package_name}/{package_name}.py',
'/tests/__init__.py',
f'/tests/test_{package_name}.py',
]
Expand Down
11 changes: 5 additions & 6 deletions {{cookiecutter.package_name}}/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'myst_parser',
{% if cookiecutter.sphinx_theme == 'sphinx-wagtail-theme' %}
'{{ cookiecutter.sphinx_theme|replace('-', '_') }}',
{% endif %}
{%- if cookiecutter.sphinx_theme == 'sphinx-wagtail-theme' -%}
'{{ cookiecutter.sphinx_theme|replace('-', '_') }}'
{%- endif %}
]

templates_path = ['_templates']
Expand Down Expand Up @@ -64,11 +64,10 @@
{% endif %}

html_static_path = ['_static']

{% if cookiecutter.sphinx_theme == 'sphinx-rtd-theme' %}
{% if cookiecutter.sphinx_theme == 'sphinx-rtd-theme' -%}
html_context = {
"display_github": True,
"github_user": "{{ cookiecutter.project_url.split('/')[-2] }}",
"github_repo": "{{ cookiecutter.project_url.split('/')[-1] }}"
}
{% endif %}
{% endif -%}
6 changes: 3 additions & 3 deletions {{cookiecutter.package_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ exclude = '''
| build
| dist
| __pypackages__
| {{cookiecutter.package_name}}\tests
| tests
)/
)
'''
Expand All @@ -118,7 +118,7 @@ testpaths = [
[tool.coverage.run]
parallel = true
branch = true
source = ["{{ cookiecutter.package_name }}"]
source = ["src/{{ cookiecutter.package_name }}"]
omit = [
"*/python?.?/*",
"*/tests/*"
Expand Down Expand Up @@ -149,7 +149,7 @@ sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
[tool.vulture]
make_whitelist = true
min_confidence = 80
paths = ["{{ cookiecutter.package_name }}/", "tests/"]
paths = ["./src/{{ cookiecutter.package_name }}/", "./tests/"]
sort_by_size = true

[tool.ruff]
Expand Down

0 comments on commit eec7e87

Please sign in to comment.