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 contributing naming convention page #532

Open
mfisher87 opened this issue Apr 19, 2024 · 11 comments
Open

Add contributing naming convention page #532

mfisher87 opened this issue Apr 19, 2024 · 11 comments
Labels
impact: documentation Improvements or additions to documentation

Comments

@mfisher87
Copy link
Collaborator

For example, in our docs, do directories and file names use hyphens or underscores as separators?

@mfisher87 mfisher87 added the impact: documentation Improvements or additions to documentation label Apr 19, 2024
@Sherwin-14
Copy link
Contributor

@mfisher87 How can we approach this one?

@mfisher87
Copy link
Collaborator Author

Good question. I think we should add a new page in the contributing section and start documenting some of the unwritten rules we're following now. E.g.:

  • For Python code, we're following PEP8 for naming conventions.
  • For Jupyter Notebooks, let's pick whether we use underscores or hyphens in their names, and write one down. I don't think it matters what we pick, we can use the PR as a place to decide as a team. I think the PR should be created as a draft and marked for discussion, perhaps with the "Feedback requested" label, until we've made all those decisions, and then reviewed.
  • For docs, similarly, let's just pick one. We have a mix of hyphens and underscores in directory names as well as markdown filenames.
  • What other things can we think of that have unwritten naming rules? Or things that currently have no rules and needs standardization?

I think this is one of those things where the PR doesn't need to be complete or comprehensive, it just needs to get discussion started. We can even merge it when it's incomplete -- the documentation page serves to record the decisions we've made thus far, and we can always update it for future decisions!

@Sherwin-14
Copy link
Contributor

Should I make a PR for this one? I am thinking of adding some rules and making a PR and then we can discuss whether these rules are the ones we need going forward

@Sherwin-14
Copy link
Contributor

Sherwin-14 commented Aug 26, 2024

Good question. I think we should add a new page in the contributing section and start documenting some of the unwritten rules we're following now. E.g.:

* For Python code, we're following PEP8 for naming conventions.

* For Jupyter Notebooks, let's pick whether we use underscores or hyphens in their names, and write one down. I don't think it matters what we pick, we can use the PR as a place to decide as a team. I think the PR should be created as a draft and marked for discussion, perhaps with the "Feedback requested" label, until we've made all those decisions, and then reviewed.

* For docs, similarly, let's just pick one. We have a mix of hyphens and underscores in directory names as well as markdown filenames.

* What other things can we think of that have unwritten naming rules? Or things that currently have no rules and needs standardization?

I think this is one of those things where the PR doesn't need to be complete or comprehensive, it just needs to get discussion started. We can even merge it when it's incomplete -- the documentation page serves to record the decisions we've made thus far, and we can always update it for future decisions!

Tests might need some written rules for naming convention as well. Currently, all of them use underscores, so I think we should proceed forward with underscores as the naming convention for them(for the time being). Also, files (in earthaccess ) at this point in time doesn't need naming conventions, but in future we might need naming conventions for them as well.

@mfisher87
Copy link
Collaborator Author

Should I make a PR for this one? I am thinking of adding some rules and making a PR and then we can discuss whether these rules are the ones we need going forward

I think this sounds like a great approach! It's cool if this page is very short for now as well. Just having a place to put that information will make it more likely we'll record it :)

@Sherwin-14
Copy link
Contributor

Good question. I think we should add a new page in the contributing section and start documenting some of the unwritten rules we're following now. E.g.:

* For Python code, we're following PEP8 for naming conventions.

* For Jupyter Notebooks, let's pick whether we use underscores or hyphens in their names, and write one down. I don't think it matters what we pick, we can use the PR as a place to decide as a team. I think the PR should be created as a draft and marked for discussion, perhaps with the "Feedback requested" label, until we've made all those decisions, and then reviewed.

* For docs, similarly, let's just pick one. We have a mix of hyphens and underscores in directory names as well as markdown filenames.

* What other things can we think of that have unwritten naming rules? Or things that currently have no rules and needs standardization?

I think this is one of those things where the PR doesn't need to be complete or comprehensive, it just needs to get discussion started. We can even merge it when it's incomplete -- the documentation page serves to record the decisions we've made thus far, and we can always update it for future decisions!

Tests might need some written rules for naming convention as well. Currently, all of them use underscores, so I think we should proceed forward with underscores as the naming convention for them. Also, files (in earthaccess ) at this point in time doesn't need naming conventions, but in future we might need naming conventions for them as well.

@mfisher87 what do you think about this?

@mfisher87
Copy link
Collaborator Author

mfisher87 commented Aug 26, 2024

Tests might need some written rules for naming convention as well.

For tests, I think we could name some specifics, e.g. "our tests always start with test_", and link to pytest documentation (https://docs.pytest.org/en/stable/explanation/goodpractices.html#conventions-for-python-test-discovery) for the stuff that isn't unique to our project. For example, the pytest docs say tests can also end with _test.py, but we don't do that, so that's one of the things we want to document.

Currently, all of them use underscores, so I think we should proceed forward with underscores as the naming convention for them

This is actually one of the PEP8 conventions, so it's covered (https://peps.python.org/pep-0008/#package-and-module-names) :)

I'm not sure I gave you all the info you need here. Anything I might be missing?

@Sherwin-14
Copy link
Contributor

I think you have given me all that is required for raising a PR :)

@mfisher87
Copy link
Collaborator Author

Rad! Thanks, Sherwin :)

@Sherwin-14
Copy link
Contributor

Sherwin-14 commented Aug 26, 2024

Rad! Thanks, Sherwin :)

Rad? I had to google it literally. New word unlocked!

@mfisher87
Copy link
Collaborator Author

mfisher87 commented Aug 26, 2024

Haha, sorry, I definitely use a lot of outdated US slang! 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: documentation Improvements or additions to documentation
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants