MetOffice / MetOffice/fab

Ensure all working directory changes are Paths

Open
#517 0 comments 0 reactions 0 assignees View on GitHub
technical debt
Dominant language
Python
Stars
9
Forks
9
Avg merge
12d 12h
Merged PRs (30d)
2

Description

The `Tool.run()` method has the following signature:

```py
def run(self,
additional_parameters: Optional[
Union[str, Sequence[Union[Path, str]]]] = None,
profile: Optional[str] = None,
env: Optional[Dict[str, str]] = None,
cwd: Optional[Union[Path, str]] = None,
capture_output=True) -> str:
```

It would be cleaner if the caller was required to ensure `cwd` was a `Path` instance. This would also allow the `FabCommandError` exception constructor to be cleaned up.

Contributor guide

Open the contributing guide

Research direction

Start by locating Tool.run() and the FabCommandError constructor, then inspect their callers to see how cwd is currently supplied. Update the working-directory interfaces so callers use Path values and confirm that FabCommandError no longer needs its existing path-handling cleanup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.