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

updated path in 05-loop.md to be relative to home directory #1414

Merged
merged 2 commits into from
Jul 23, 2023

Conversation

theabro
Copy link
Contributor

@theabro theabro commented Jul 16, 2023

Currently, in the "Nelle's Pipeline: Processing Files" section of episodes/05-loop.md (line 597), the text reads

Starting from her home directory, Nelle types:

however, the code snippet just below this (line 600) then reads:

cd north-pacific-gyre

This path is incorrect, as if starting from the users home directory this line should read

cd Desktop/shell-lesson-data/north-pacific-gyre

@github-actions
Copy link

github-actions bot commented Jul 16, 2023

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/swcarpentry/shell-novice/compare/md-outputs..md-outputs-PR-1414

The following changes were observed in the rendered markdown documents:

 05-loop.md | 5 +++--
 md5sum.txt | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2023-07-23 08:00:48 +0000

@bkmgit
Copy link
Contributor

bkmgit commented Jul 17, 2023

Thanks for the contribution. The home directory may not be Desktop, so probably something further is needed. Typically in bash one can check the output of echo $HOME to see what this is set to.

@theabro
Copy link
Contributor Author

theabro commented Jul 17, 2023

In the rest of the lesson, Desktop is explicitly stated as being within the users home directory, e.g. in episodes/02-filedir.md (line 801):

$ cd ~/Desktop/shell-lesson-data

and in episodes/07-find.md (lines 44-45):

$ cd
$ cd Desktop/shell-lesson-data/exercise-data/writing

This is also consistent from episodes/02-filedir.md with the use of a Mac for the examples, where Desktop is inside a users home directory:

In future examples, we’ve used Mac output as the default - Linux and Windows output may differ slightly but should be generally similar.

In any case, the north-pacific-gyre directory is not within the users home directory, as stated from the current text, but is within the shell-lesson-data directory (which the learner has been asked to install in their Desktop), so the descriptive text as it currently stands needs updating in some way if this change to the path is not made.

github-actions bot pushed a commit that referenced this pull request Jul 23, 2023
@bkmgit
Copy link
Contributor

bkmgit commented Jul 23, 2023

Not sure why, it uses starting from her home directory. The section before that begins "
We would like to modify each of the files in shell-lesson-data/exercise-data/creatures,"
so maybe one could use relative paths

cd ../../north-pacific-gyre

and change the text "starting from her home directory" to "moving to the north-pacific-gyre directory" or something similar.

Alternatively, use

cd
cd Desktop/shell-lesson-data/north-pacific-gyre

Since this will then move to the home directory

@bkmgit
Copy link
Contributor

bkmgit commented Jul 23, 2023

Can look at other changes for consistent paths in a further change since the home directory maybe different, and changes will be needed through the entire lesson.

@theabro
Copy link
Contributor Author

theabro commented Jul 23, 2023

In 0b441e9 I have amended the descriptive text to reference the directory moving to, and put in a cd to the home directory prior to the other cd command. Personally I preferred this over a relative path, in case the learner/instructor has somehow moved out of the previous directory. I have also tried to be consistent in how the target directory is formatted.

I agree that consistent paths could be an issue throughout the whole lesson. Currently it seems consistent on a Mac (except for this section), but any system where Desktop is not in the home directory will have problems. There may not be an ideal solution to this.

github-actions bot pushed a commit that referenced this pull request Jul 23, 2023
@bkmgit
Copy link
Contributor

bkmgit commented Jul 23, 2023

@theabro Thanks. Created another issue to update paths #1419.

@bkmgit bkmgit merged commit 506e621 into swcarpentry:main Jul 23, 2023
3 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 23, 2023
Auto-generated via {sandpaper}
Source  : 506e621
Branch  : main
Author  : Benson Muite <bkmgit@users.noreply.github.com>
Time    : 2023-07-23 08:38:52 +0000
Message : Merge pull request #1414 from theabro/05-path-update

updated path in 05-loop.md to be relative to home directory
github-actions bot pushed a commit that referenced this pull request Jul 23, 2023
Auto-generated via {sandpaper}
Source  : 57c51cc
Branch  : md-outputs
Author  : GitHub Actions <actions@github.com>
Time    : 2023-07-23 08:40:08 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 506e621
Branch  : main
Author  : Benson Muite <bkmgit@users.noreply.github.com>
Time    : 2023-07-23 08:38:52 +0000
Message : Merge pull request #1414 from theabro/05-path-update

updated path in 05-loop.md to be relative to home directory
github-actions bot pushed a commit that referenced this pull request Jul 25, 2023
Auto-generated via {sandpaper}
Source  : 57c51cc
Branch  : md-outputs
Author  : GitHub Actions <actions@github.com>
Time    : 2023-07-23 08:40:08 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 506e621
Branch  : main
Author  : Benson Muite <bkmgit@users.noreply.github.com>
Time    : 2023-07-23 08:38:52 +0000
Message : Merge pull request #1414 from theabro/05-path-update

updated path in 05-loop.md to be relative to home directory
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

Successfully merging this pull request may close these issues.

2 participants