-
-
Notifications
You must be signed in to change notification settings - Fork 934
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
Exemplify more Carpentries-relevant code style tools #698
Exemplify more Carpentries-relevant code style tools #698
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like updating the style suggestions to what we teach in other carpentries lessons. I've made a few suggestions about the content. Let me know what you think.
Thank you for updating these! I think the learners will find them more useful in practice.
_episodes/09-conflict.md
Outdated
`htmltidy`, `perltidy`, `rubocop`, etc.) to enforce, if necessary | ||
project convention that is governing, use code style tools (e.g. | ||
`styleR` or `Code > Reformat` in RStudio, | ||
or [`pep8` in Python](https://swcarpentry.github.io/python-novice-gapminder/18-style/index.html#follow-standard-python-style-in-your-code), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this particular section in the gapminder lesson mentions the google style guide for Python, it might be worth mentioning here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good point, because the Google style guide recommends to use the "yapf auto-formatter". So, I suggest we either add a link to it to python-novice-gapminder/18-style and don't mention the particular tools here. Duplicating content across lessons is not a good idea, IMHO. How about 2e0f8b3 ?
project convention that is governing, use code style tools (e.g. | ||
`styleR` or `Code > Reformat` in RStudio, | ||
or [`pep8` in Python](https://swcarpentry.github.io/python-novice-gapminder/18-style/index.html#follow-standard-python-style-in-your-code), | ||
[ShellCheck(.net)](http://swcarpentry.github.io/shell-novice/guide/#teaching-notes), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since ShellCheck doesn't appear to be a style guide, I think it is misleading to include it in this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but this section is about "code style tools", not "style guides" ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShellCheck appears to be a debugger, not a code formatter/code style tool.
Co-Authored-By: Madicken Munk <madicken.munk@gmail.com>
`htmltidy`, `perltidy`, `rubocop`, etc.) to enforce, if necessary | ||
project convention that is governing, use code style tools (e.g. | ||
`styleR` or `Code > Reformat` in RStudio, | ||
or [the tools listed in our Python lesson](https://swcarpentry.github.io/python-novice-gapminder/18-style/index.html#follow-standard-python-style-in-your-code), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or [the tools listed in our Python lesson](https://swcarpentry.github.io/python-novice-gapminder/18-style/index.html#follow-standard-python-style-in-your-code), | |
or `pep8` or `the google style guide`, which are mentioned [in our Python lesson](https://swcarpentry.github.io/python-novice-gapminder/18-style/index.html#follow-standard-python-style-in-your-code), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to explicitly list style guides like pep8 and the google style guide here. This change forces learners to click on the link to learn what Python style tools might be available to them, and I think that's not a good practice for the lesson.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's agree to disagree on this, again. I don't think avoiding-at-all-costs for learners or instructors to click on a link (only if they want to; not "forced"!), read elsewhere, then browse back to the lesson is worth:
- mixing tools and guides,
- duplicating names here that are less relevant than the link itself, and
- setting future maintainers up for needing to fix a mismatch of those names, if they ever update one side of this link.
I'll not invest any more time in this. Feel free to modify the PR as you find best. I'll focus on preparing to teach a workshop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this will add some maintainer burden regarding your point (3), which does concern me. However, I think it's worth ensuring that the learner experience is smooth rather than that the maintainer experience is easier. In this particular case, the r and shell tools are clear and obvious in the text while the python tools are now obfuscated. I don't think that's particularly helpful to any learners that may be curious about the Python style tools.
Good luck teaching the workshop!
I'd like to weigh in here. What I like about this PR
Where it could be improved
So, in summary, my suggestions are:
Great work y'all! |
Hi, @katrinleinweber. This PR is old, but not stale. Are you able to update your PR taking into account the last two comments? |
I'm going to close this PR in preparation of the new workbench lesson infrastructure, but with a comment that the content is generally approved, but needed to be updated. I will leave the labels in place so it's easier to find to update. |
Since no Carpentries lesson teaches Perl, Ruby or focusses on HTML, how about mentioning tools that are relevant for our curriculum? These are suggestions which have been mentioned in a lesson, or its repository.
Related to datacarpentry/R-ecology-lesson#359, swcarpentry/shell-novice#239 & swcarpentry/r-novice-gapminder#529, and to #432.