Skip to content

A better error message when paths are ambiguous on case-insensitive file systems. #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ all releases are available on `PyPI <https://pypi.org/project/pytask>`_ and
- :gh:`194` updates the ``README.rst``.
- :gh:`196` references the two new cookiecutters for projects and plugins.
- :gh:`198` fixes the documentation of ``@pytask.mark.skipif``. (Closes :gh:`195`)
- :gh:`199` extends the error message when paths are ambiguous on case-insensitive file
systems.


0.1.5 - 2022-01-10
Expand Down
11 changes: 8 additions & 3 deletions src/_pytask/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,15 @@ def pytask_collect_task(


_TEMPLATE_ERROR: str = (
"The provided path of the dependency/product in the marker is {}, but the path of "
"the file on disk is {}. Case-sensitive file systems would raise an error.\n\n"
"The provided path of the dependency/product in the marker is\n\n{}\n\n, but the "
"path of the file on disk is\n\n{}\n\nCase-sensitive file systems would raise an "
"error because the upper and lower case format of the paths does not match.\n\n"
"Please, align the names to ensure reproducibility on case-sensitive file systems "
"(often Linux or macOS) or disable this error with 'check_casing_of_paths = false'."
"(often Linux or macOS) or disable this error with 'check_casing_of_paths = false' "
" in your pytask configuration file.\n\n"
"Hint: If parts of the path preceding your project directory are not properly "
"formatted, check whether you need to call `.resolve()` on `SRC`, `BLD` or other "
"paths created from the `__file__` attribute of a module."
)


Expand Down