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

bin/lesson_check.py: allow comments and empty lines in links.md #582

Closed maxim-belkin closed 3 years ago

maxim-belkin commented 3 years ago

Fixes carpentries/styles#581

@jhlegarreta, this PR should allow empty lines and single-line HTML comments in links.md

maxim-belkin commented 3 years ago

it might be good if you could try, as time permit, editing the links.md in this repository and seeing if the issue is reproducible or whether it was a glitch.

Failing on (single-line) HTML comments: https://github.com/maxim-belkin/python-novice-inflammation/runs/2423552360?check_suite_focus=true#step:14:7

jhlegarreta commented 3 years ago

Thanks for the update and effort @maxim-belkin :100:.

Yesterday I run the checks on the https://github.com/carpentries-incubator/SDC-BIDS-dMRI carpentries incubator repository locally multiple times and no failures were reported concerning the links.md file across such runs. So now I am unable to reproduce the failure, as anticipated in https://github.com/carpentries/styles/issues/581#issuecomment-824143099. I am at a loss.

But please go ahead and merge if you are convinced that the issue I opened is still relevant and that this addresses it. Maybe you will want to consider other Markdown-allowed comment mark-ups.

maxim-belkin commented 3 years ago

Yesterday I run the checks on the https://github.com/carpentries-incubator/SDC-BIDS-dMRI carpentries incubator repository locally multiple times and no failures were reported concerning the links.md file across such runs.

This check is skipped for the lessons that use remote theme (and your lesson uses one) assuming that these lessons use the links.md file from the remote theme:

https://github.com/carpentries/styles/blob/2abba21ae1eff606d705d7c3d1fcbb74c7ca3aca/bin/lesson_check.py#L118-L119

Perhaps instead of skipping this check for such lessons, we should check if the lesson provides the file and test it.

I see assests folder in your repo. I don't know if you kept it on purpose, but the instructions I found for lessons that use remote theme say to delete it: https://github.com/carpentries/carpentries-theme/blob/main/USAGE.md

jhlegarreta commented 3 years ago

Perhaps instead of skipping this check for such lessons, we should check if the lesson provides the file and test it.

Sounds reasonable. However, following your advice we split the links.md file to use a separate one for the lesson-specific links, and the proposed solution should then try to identify lesson-specific links files (or propose a naming pattern to ease that identification) so that they can get tested (assuming links.md gets tested upstream).

I see assests folder in your repo. I don't know if you kept it on purpose, but the instructions I found for lessons that use remote theme say to delete it: https://github.com/carpentries/carpentries-theme/blob/main/USAGE.md

Thanks for letting us know. I have inspected the file, and it does not contain any lesson-specific changes, so I'd dare to say that it was downloaded when sync'ing with the upstream styles repository. So probably downloading the file should be skipped when sync'ing. Thus, note sure if following this the file is skipped: https://github.com/carpentries/maintainer-resources/blob/main/FLIGHT_RULES.md#update-styles.

Thanks for the effort.

maxim-belkin commented 3 years ago

@zkamvar @fmichonneau, do you have any questions or concerns?

maxim-belkin commented 3 years ago

Thanks for approving, @fmichonneau!