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

refactor: conform to snake_case filenames #225

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

jorgenengelsen
Copy link
Contributor

Why is this pull request needed?

Discovered by mypy failing.

PEP8: https://peps.python.org/pep-0008/#package-and-module-names

Mixing uppercase and lowercase in filenames can cause cross-platform issues

What does this pull request change?

  • Renames data_provider files to conform with snake case convetion

@sebastianvitterso
Copy link
Contributor

Ah, I don't like this. If I'm looking for the MongoClient class, which I know to be located in its own file, I would assume it to be found in a file called MongoClient.py. Not mongo_client.py, which is what I'd call an instance of the class.

Hm, PEP is PEP tho..

@jorgenengelsen
Copy link
Contributor Author

Ah, I don't like this. If I'm looking for the MongoClient class, which I know to be located in its own file, I would assume it to be found in a file called MongoClient.py. Not mongo_client.py, which is what I'd call an instance of the class.

Hm, PEP is PEP tho..

I agree, but the reasoning makes sense:

Since Python works cross platform (and it is common to use it in that manner), but file systems vary in the use of casing, it is better to just eliminate alternate cases. In Linux, for instance, it is possible to have MyClass.py and myclass.py in the same directory. That is not so in Windows!

On a related note, if you have MyClass.py and myclass.py in a git repo, or even just change the casing on the same file, git can act funky when you push/pull across from Linux and Windows.

Copy link
Contributor

@sebastianvitterso sebastianvitterso left a comment

Choose a reason for hiding this comment

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

Pipeline fails

PEP8: https://peps.python.org/pep-0008/#package-and-module-names

Mixing uppercase and lowercase in filenames can cause cross-platform issues
Copy link
Contributor

@sebastianvitterso sebastianvitterso left a comment

Choose a reason for hiding this comment

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

Pipeline succeeds. I still don't personally approve, but professionally, I'll let it pass.

@jorgenengelsen jorgenengelsen merged commit 018918e into main Aug 29, 2023
7 checks passed
@jorgenengelsen jorgenengelsen deleted the refactor/snake_case_file_names branch August 29, 2023 09:48
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.

2 participants