Skip to content
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

[DPE-6042] Make tox commands resilient to white-space paths #780

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

sinclert-canonical
Copy link
Contributor

This PR fixes tox.ini commands when the repository is cloned on a white-space containing path.

How to reproduce:

$ mkdir -p "Projects/Canonical/Data Platform/PostgreSQL"
$ cd "Projects/Canonical/Data Platform/PostgreSQL"
$ git clone https://github.com/canonical/postgresql-k8s-operator
$ cd postgresql-k8s-operator
$ tox run -e format
> ...
> /Users/<USERNAME>/Projects/Canonical/Data:1:1: E902 No such file or directory (os error 2)
> Platform/PostgreSQL/postgresql-k8s-operator/src:1:1: E902 No such file or directory (os error 2)
> Platform/PostgreSQL/postgresql-k8s-operator/tests:1:1: E902 No such file or directory (os error 2)

Additional considerations

Using the quoted paths to set up the PYTHONPATH does not work. This can be tested by running the unit tests.

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.46%. Comparing base (5852221) to head (eb6d40c).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #780      +/-   ##
==========================================
- Coverage   75.60%   75.46%   -0.15%     
==========================================
  Files          12       12              
  Lines        3116     3118       +2     
  Branches      475      476       +1     
==========================================
- Hits         2356     2353       -3     
- Misses        617      622       +5     
  Partials      143      143              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@sinclert-canonical sinclert-canonical merged commit 3bbd5f9 into main Nov 20, 2024
111 checks passed
@sinclert-canonical sinclert-canonical deleted the sinclert/quote-tox-paths branch November 20, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants