Skip to content
This repository has been archived by the owner. It is now read-only.

Replace os.path with pathlib #214

Merged
merged 1 commit into from Jan 29, 2019
Merged

Replace os.path with pathlib #214

merged 1 commit into from Jan 29, 2019

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented Jan 29, 2019

This pull request refactors all references to os.path to use the new pathlib module.

This makes the code a lot more natural to read. See PEP 428 for more information on why pathlib is a desirable improvement over the more low-level os.path.

All Submissions:

  • Have you followed the guidelines in our Contributing document?

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

  • Does your PR follow our Code of Conduct?

  • Have you added an explanation of what your changes do and why you'd like us to include them?

  • Does each method or function "do one thing well"? Reviewers may recommend methods be split up for maintainability and testability. Not applicable: pure refactor

  • Is this code designed to be testable? Not applicable: pure refactor

  • Is the code documented well? Not applicable: pure refactor

  • Does your submission pass existing tests (or update existing tests with documentation regarding the change)? Docker build passes

  • Have you added tests to cover your changes? Not applicable: pure refactor

  • Have you linted your code prior to submission? Docker build passes

  • Have you updated the documentation and README? Not applicable: pure refactor

  • Is PII treated correctly? In particular, make sure the code is not logging objects or strings that might contain PII (e.g. request headers). Not applicable: none included

  • Have secrets been stripped before committing? Not applicable: none included

This makes the code a lot more natural to read. See
[PEP 428](https://www.python.org/dev/peps/pep-0428/#why-an-object-oriented-api)
for more information on why pathlib is a desirable improvement over the
more low-level os.path.
@c-w
Copy link
Contributor Author

@c-w c-w commented Jan 29, 2019

@sayar There seems to be something wrong with the CI definition for the cli and app.

The build here fails, but running the Dockerfile locally succeeds with docker build -t agogosml/cli -f agogosml_cli/Dockerfile agogosml_cli (see screenshot below). So the CI fail here should not be considered a blocker.

image

@c-w c-w mentioned this pull request Jan 29, 2019
13 tasks
sayar
sayar approved these changes Jan 29, 2019
Copy link
Collaborator

@sayar sayar left a comment

LOVE IT!

@sayar sayar merged commit 0a910cd into master Jan 29, 2019
4 checks passed
@sayar sayar deleted the pathlib branch Jan 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants