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

add new get_cwd function to tools.filetools to retrieve current working directory #4525

Merged
merged 20 commits into from May 22, 2024

Conversation

lexming
Copy link
Contributor

@lexming lexming commented May 3, 2024

Simple addition of a wrapper around os.getcwd to be able to improve error reporting whenever it fails.

This PR includes unit tests for the new method and also adapts all current uses of os.getcwd to the new get_cwd.

Motivation is to improve error reporting on issues such as those described in #4390

@lexming lexming added the EasyBuild-5.0 EasyBuild 5.0 label May 3, 2024
@boegel boegel added this to the 5.0 milestone May 4, 2024
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor suggestions, looks good overall!

easybuild/tools/filetools.py Outdated Show resolved Hide resolved
easybuild/tools/filetools.py Show resolved Hide resolved
easybuild/tools/robot.py Outdated Show resolved Hide resolved
easybuild/tools/run.py Outdated Show resolved Hide resolved
test/framework/filetools.py Outdated Show resolved Hide resolved
@boegel boegel changed the title add new method tools.filetools.get_cwd to retrieve current working directory add new get_cwd function to tools.filetools to retrieve current working directory May 4, 2024
easybuild/tools/run.py Outdated Show resolved Hide resolved
move `CWD_NOTFOUND_ERROR` constant to `tools.build_log`
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel enabled auto-merge May 22, 2024 07:32
@boegel boegel merged commit 5bc4746 into easybuilders:5.0.x May 22, 2024
35 checks passed
@lexming lexming deleted the get_cwd branch May 22, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EasyBuild-5.0 EasyBuild 5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants