merely-useful / py-rse

Research Software Engineering with Python course material
http://third-bit.com/py-rse/
Other
246 stars 63 forks source link

More work on long code blocks #541

Closed DamienIrving closed 3 years ago

DamienIrving commented 3 years ago

Following on from #531, this PR makes sure our scripts are PEP-8 compliant and fixes some more code blocks that are too long.

DamienIrving commented 3 years ago

@gvwilson Do you think it would be possible to get a hard character limit from the publisher for lines in code blocks? Without a hard limit it's difficult to be confident that we won't have to come back do more line shortening later, which is a problem because changes to our scripts can have flow on effects on git diff output (for example) in subsequent chapters.

gvwilson commented 3 years ago

@DamienIrving I believe the krantz.cls style file we're using is the one we will use in production, so if the lines wrap correctly when we build, we're good. I will double check w/ Randi Cohen.

gvwilson commented 3 years ago
Hi Greg,

Yes, we can definitely use the Krantz style for the book. It is one of our common styles, so it is fine. No need to re-wrap anything!

Randi
DamienIrving commented 3 years ago

Ok. This one is ready for review.

It makes sure that:

The reason I'm ok with the output blocks occasionally going a little over 66 characters is that those blocks don't have a grey shaded background, which means it's not so obvious that they've gone over (and changing them to be < 66 would look very weird in many cases).

gvwilson commented 3 years ago

Heroic work - :+1:.