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

path_utilities: Use pathlib #372

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

Javagedes
Copy link
Contributor

@Javagedes Javagedes commented Jul 20, 2023

Updates path_utilities to use pathlib rather than os.path functionality as it abstracts away posix vs windows path separators.

Continues to provides self.WorkspacePath and self.PackagePath as a string and list of strings respectively, but internally they are held as a pathlib.Path object and internal functionality uses it as such.

Resolves an issue where GetEdk2RelativePathFromAbsolutePath could return a Non-Posix path.

closes #207

Also making initial updates in preparation for deprecating mws (multiple_workspace.py in edk2-pytool-extensions) found in tianocore/edk2-pytool-extensions#446

@Javagedes Javagedes added bug Something isn't working enhancement New feature or request labels Jul 20, 2023
@Javagedes Javagedes added this to the v0.15.4 milestone Jul 20, 2023
@Javagedes Javagedes marked this pull request as draft July 20, 2023 22:09
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% ⚠️

Comparison is base (f521d59) 78.68% compared to head (190af7b) 78.68%.

❗ Current head 190af7b differs from pull request most recent head a364375. Consider uploading reports for the commit a364375 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #372      +/-   ##
==========================================
- Coverage   78.68%   78.68%   -0.01%     
==========================================
  Files          47       47              
  Lines        6729     6728       -1     
==========================================
- Hits         5295     5294       -1     
  Misses       1434     1434              
Files Changed Coverage Δ
edk2toollib/uefi/edk2/path_utilities.py 99.35% <100.00%> (-0.01%) ⬇️

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

@Javagedes Javagedes marked this pull request as ready for review August 2, 2023 17:05
@Javagedes Javagedes requested review from makubacki and spbrogan and removed request for makubacki August 2, 2023 17:06
edk2toollib/uefi/edk2/path_utilities.py Outdated Show resolved Hide resolved
@Javagedes Javagedes force-pushed the path_utilities branch 3 times, most recently from 9c4a916 to df48c67 Compare August 2, 2023 20:19
Updates path_utilities to use pathlib rather than os.path functionality
as it abstracts away posix vs windows path separators.

Continues to provides self.WorkspacePath and self.PackagePath as a
string and list of strings respectively, but internally they are held
as a pathlib.Path object and internal functionality uses it as such.

Resolves an issue where GetEdk2RelativePathFromAbsolutePath could
return a Non-Posix path.
@Javagedes Javagedes merged commit 85b899a into tianocore:master Aug 2, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: GetEdk2RelativePathFromAbsolutePath() Can Silently Return Non-POSIX Path
2 participants