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

Long lines in lessons #498

Open
maxim-belkin opened this Issue Apr 13, 2018 · 14 comments

Comments

Projects
6 participants
@maxim-belkin
Collaborator

maxim-belkin commented Apr 13, 2018

We need to shorten the following long lines in lessons (based on make lesson-check-all).
Please feel free to submit PRs and reference this issue (use #498).

- [ ] ./CONTRIBUTING.md:
(Out of scope: has to be fixed in carpentries/style)

  • ./_episodes/06-func.md:
    Line(s) are too long: 425, 547, 637
  • ./_episodes/07-errors.md:
    Line(s) are too long: 68, 498

Updated: October 12, 2018

@maxim-belkin maxim-belkin added this to In progress in Codename "Py" Apr 13, 2018

maxim-belkin added a commit that referenced this issue May 1, 2018

04-files.md: fix long lines
Fix long lines 36 and 46 reported by 'make lesson-check-all'

See #498
Closes #515

Signed-off-by: Maxim Belkin <maxim.belkin@gmail.com>

KerensaMcElroy added a commit to KerensaMcElroy/python-novice-inflammation that referenced this issue May 2, 2018

setup.md: fix long lines
Shorten lines 8 and 24.

See swcarpentry#498
@doctornerdis

This comment has been minimized.

Contributor

doctornerdis commented May 2, 2018

Just for my own learning, why is it important to limit the lines to 100 characters? Is it about readability of the code? Are there other formatting conventions I should keep in mind?

@doctornerdis

This comment has been minimized.

Contributor

doctornerdis commented May 2, 2018

Also, please ignore #519. I forgot to delete my old fork before I started work on the new file.

@maxim-belkin

This comment has been minimized.

Collaborator

maxim-belkin commented May 2, 2018

Just for my own learning, why is it important to limit the lines to 100 characters?

git tracks changes on a line-by-line basis, so if you change a single character in a 5000 character-long paragraph written as a single line, it will highlight the entire line. Moreover, it will show it twice (original and changed version). And single line breaks are not a problem for Markdown... so, there is really no benefit in using long lines as shorter ones make life much easier.

Why exactly 100? This number is more-or-less arbitrary. People usually choose the number of characters that fit in their text editor without wrapping to the next (virtual) line. "100" is hard-coded into lesson-check and, honestly, I don't care about its exact value as long as it is reasonable: not too small, not too large... it could be 78, 83, 94, etc.

Also, please ignore #519. I forgot to delete my old fork before I started work on the new file.

Um... ok, but we need to talk :) You should use branches for pull requests:

git checkout -f gh-pages
git pull origin gh-pages

git branch mybranch
git checkout mybranch
# make changes
git add -u
git commit
git push <your-fork>

git checkout gh-pages
# submit pull-request on GitHub
@doctornerdis

This comment has been minimized.

Contributor

doctornerdis commented May 2, 2018

Thanks for the explanation @maxim-belkin!

Don't I need permission to access this repository in order to make branches? I'm working from the GitHub desktop client, so do I need to work in git directly?

@maxim-belkin

This comment has been minimized.

Collaborator

maxim-belkin commented May 2, 2018

Um, to create branches in this repository one has to have proper permissions, but you don't need these.
The way it works is as follows:

  1. you fork this repository. Your fork will be here https://github.com/doctornerdis/python-novice-inflammation
  2. You clone your fork to your computer git clone https://github.com/doctornerdis/python-novice-inflammation
  3. You create a new branch for your changes: git checkout -b my-changes
  4. You make changes to files, then git add -u, git commit
  5. You push your branch to your fork git push
  6. You submit a PR on GitHub using this branch

To keep your fork up-to-date, you do:

git checkout gh-pages
git add swcarpentry https://github.com/swcarpentry/python-novice-inflammation  ## only once per repository
git fetch swcarpentry
git merge --ff-only
git push

Oh, and I now see that you've already deleted your fork that you used to submit #520. There is a better way! :)

doctornerdis added a commit to doctornerdis/python-novice-inflammation that referenced this issue May 2, 2018

_episodes/02-loop.md: Fixed long lines
Shortened lines 115, 148, 149, 154, 160, 161, 180

See swcarpentry#498
@doctornerdis

This comment has been minimized.

Contributor

doctornerdis commented May 2, 2018

OK, I think I'm getting the hang of it now. I just did another PR (#521). Is that the right workflow?

@maxim-belkin

This comment has been minimized.

Collaborator

maxim-belkin commented May 2, 2018

Yep! Just don't forget to switch back to gh-pages before creating a branch for your next PR

git checkout gh-pages
git pull swcarpentry ## just in case
git checkout -b my-next-pr
@MikeAllawayBham

This comment has been minimized.

Contributor

MikeAllawayBham commented May 23, 2018

Hi @maxim-belkin , may be worth ticking off the lessons that have been done from the issue description at the top of this page, to make it clearer to newcomers which are left to do

@maxim-belkin

This comment has been minimized.

Collaborator

maxim-belkin commented May 23, 2018

Thank you for the reminder, @MikeAllawayBham!

@emdupre

This comment has been minimized.

Contributor

emdupre commented Jul 17, 2018

I just opened #565 to help address this ! I did have one question, though -- is the Code of Conduct still in need of definitions ? It seems to be rendering correctly, but I might have misunderstood the concern !

@maxim-belkin

This comment has been minimized.

Collaborator

maxim-belkin commented Jul 17, 2018

Thank you for the PR, @emdupre! I've updated the original post with the current list of issues. Regarding Code of Conduct - I think the issue was solved in 51293be...

maxim-belkin added a commit that referenced this issue Jul 17, 2018

README: fix long lines
Fixes lines 13, 15, 19

Pull Request: #565
Related Issue: #498

maxim-belkin added a commit that referenced this issue Jul 17, 2018

03-lists.md: fix long lines, grammar, define new link
 - Fixes (long) lines: 176
 - Changes "in place" to "in-place" as in  `Be careful when modifying data in-place`
 - Define new link "hadleywickham-tweet" (DRY)

Pull Request: #566
Related Issue: #498

katkoler added a commit to katkoler/python-novice-inflammation that referenced this issue Oct 12, 2018

@katkoler

This comment has been minimized.

Contributor

katkoler commented Oct 12, 2018

Hi, I'd like to help with this.
Is there a good way of testing it renders correctly?

@maxim-belkin

This comment has been minimized.

Collaborator

maxim-belkin commented Oct 12, 2018

Hi, @katkoler. If you've got macOS or Linux, make serve (or jekyll serve or bundle exec jekyll serve) will render the site for you and you will be able to check it out at http://127.0.0.1:4000.
If you're on a Windows machine make docker-serve.

@katkoler

This comment has been minimized.

Contributor

katkoler commented Oct 12, 2018

@maxim-belkin thanks! I'll just check that everything looks okay and open a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment