carpentries / styles

Styles for The Carpentries lessons. No README to avoid merge conflicts with lessons. Demo 👇
https://carpentries.github.io/lesson-example
Other
84 stars 94 forks source link

Allow for non-numbered episodes in checks #587

Open jhlegarreta opened 3 years ago

jhlegarreta commented 3 years ago

The episode filename pattern regex expects these to start with a number: https://github.com/carpentries/styles/blob/e3808e8060680c182578e3f40a8723057f290e52/bin/lesson_check.py#L45

However, in https://github.com/carpentries-incubator/SDC-BIDS-dMRI

We decided to remove the numbers and use the episode order feature (https://carpentries.github.io/lesson-example/03-organization/) because we wanted to avoid renaming all subsequent files in case a new episode is added and fits somewhere in the middle following the teaching logic.

Done in here: https://github.com/carpentries-incubator/SDC-BIDS-dMRI/pull/67

Partially related to the above is that we have nested episodes: https://github.com/carpentries-incubator/SDC-BIDS-dMRI/pull/47

And numbered file naming is somewhat limited when using a nested filename convention.

Hence, we now find ourselves with style warnings: https://github.com/carpentries-incubator/SDC-BIDS-dMRI/runs/2401702149?check_suite_focus=true#step:16:9

because we do not have numbered filenames.

I know this might not be easy, but could the filename check be skipped if the repository uses the episode order feature in the _config.yml file?

This might need to be accompanied by changes (or further explanations) in the Locations and Names section: https://carpentries.github.io/lesson-example/04-formatting/index.html

Note: I have checked locally that using underscores (vs. using dashes) in the filenames does not raise the warning (at least past the number of the filename). We opted for using underscores influenced by Python.

Thanks.