Skip to content
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

Rename snippet library sub-directories #226

Closed
tkphd opened this issue Aug 20, 2020 · 8 comments
Closed

Rename snippet library sub-directories #226

tkphd opened this issue Aug 20, 2020 · 8 comments

Comments

@tkphd
Copy link
Contributor

tkphd commented Aug 20, 2020

At present, each of the sub-directories of each site's snippet catalog (to extend the library metaphor) is named with the numerical value of the lesson it goes with. However, as we see in #225, when new material is inserted, these numbers go out of sync. This is nightmarish to maintain, especially given the number of forks and pull requests that would need updating any time the lesson order changed.

Recommend finding a content-based naming scheme, with some verbosity, to improve maintainability & legibility. Related to #9.

Current

File Name Title Snippet Folder Name
11-hpc-intro.md Why use a Cluster? 11
12-cluster.md Working on a remote HPC system 12
13-scheduler.md Scheduling jobs 13
14-modules.md Accessing software 14
15-transferring-files.md Transferring files 15
16-resources.md Using resources effectively 16
17-responsiblity.md Using shared resources responsibly 17

PR #225

File Name Title Snippet Folder Name
11-hpc-intro.md Why use a Cluster? 11
12-cluster.md Working on a remote HPC system 12
13-scheduler.md Scheduling jobs 13
14-modules.md Accessing software 14
15-transferring-files.md Transferring files 15
16-parallel.md Running a parallel job pll
17-resources.md Using resources effectively 16
18-responsiblity.md Using shared resources responsibly 17

Proposed

File Name Title Snippet Folder Name
10-hpc-intro.md Why use a Cluster? intro
15-cluster.md Working on a remote HPC system cluster
20-scheduler.md Scheduling jobs scheduler
25-modules.md Accessing software modules
30-transfers.md Transferring files transfers
35-parallel.md Running a parallel job parallel
40-resources.md Using resources effectively resources
45-responsiblity.md Using shared resources responsibly responsibility

We would need to modify the lesson-check script to let increasing
numbering sequences to pass, otherwise tests will break.

@Sabryr
Copy link
Contributor

Sabryr commented Sep 4, 2020

It will be convenient if the snippet and lesson have the same name. For example:

File Name Title Snippet Folder Name
10-hpc-intro.md Why use a Cluster? intro

I would say

File Name Title Snippet Folder Name
10-hpc-intro.md Why use a Cluster? 10-hpc-intro

Edited for table formatting

@reid-a
Copy link
Contributor

reid-a commented Sep 8, 2020

@Sabryr I'm afraid that including the number defeats part of the purpose of the change. I'm on-board with:

File Name Title Snippet Folder Name
10-hpc-intro.md Why use a Cluster? hpc-intro

i.e. the snippet directory name could exactly match the text part of the base of the lesson file name.

@tkphd What are the modifications required to the lesson-check script?

Edited for table formatting

@tkphd
Copy link
Contributor Author

tkphd commented Sep 11, 2020

Thanks for the feedback, @Sabryr and @reida. I tend to prefer @reida's suggestion for the first lesson, producing

File Name Title Snippet Folder Name
10-hpc-intro.md Why use a Cluster? hpc-intro
15-cluster.md Working on a remote HPC system cluster
20-scheduler.md Scheduling jobs scheduler
25-modules.md Accessing software modules
30-transfers.md Transferring files transfers
35-parallel.md Running a parallel job parallel
40-resources.md Using resources effectively resources
45-responsiblity.md Using shared resources responsibly responsibility

I think the easiest "fix" for lesson-check is to drop lines 299 to 307. This would retain checks for duplicate lesson numbers, but would not check whether the numbering increments by 1.

@tkphd
Copy link
Contributor Author

tkphd commented Sep 11, 2020

Issue opened upstream.

@jevbelikov
Copy link

+1 for content-based naming; perhaps we could drop the number from file names too? this would also make reordering easier.

@tkphd
Copy link
Contributor Author

tkphd commented Sep 22, 2020

Good prompt, @jevbelikov. If we want to, we can migrate to manual episode order, and name the Markdown files anything we like. This introduces a small maintenance & training overhead, since the existence and significance of the new episode_order array in _config.yml must be clearly explained. This would improve flexibility, though I'm sure there will be vigorous discussion of a new naming scheme were we to go this route.

reid-a added a commit that referenced this issue Sep 23, 2020
This commit does the directory-renaming part of issue #226, but
retains the sequential integer prefix for the episode file names.

Modifying or removing the numerical prefix involves changes to
the style code (so tests will still work), and possibly interacting
with the upstream Carpentries repo, which I feel should be
separated from the directory issue.
@reid-a
Copy link
Contributor

reid-a commented Sep 23, 2020

For what it's worth, notwithstanding the limited ambition of my PR, I am not opposed to nonsequential numbering, or to removing the numbers and doing manual sequencing. I left that out mostly based on uncertainty about how to coordinate with upstream on those issues.

@reid-a
Copy link
Contributor

reid-a commented Sep 24, 2020

Closed in favor of #230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants