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

Moving onedrive solution inline #1480

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sstevens2
Copy link
Contributor

This should solve issue #1398. I moved this to a callout as I think it is useful for many learners as well and then put part in an instructor note since it seemed more specific for helpers/instructors. Feedback appreciated!

@jas58 brought this up in the Midwest Carpentries Community call so I was motivated to get this issue worked on.

Copy link

github-actions bot commented Feb 5, 2025

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-1480

The following changes were observed in the rendered markdown documents:

 02-filedir.md       | 36 ++++++++++++++++++++++++++++++++++++
 instructor-notes.md | 17 -----------------
 md5sum.txt          |  4 ++--
 3 files changed, 38 insertions(+), 19 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 2025-02-10 15:27:41 +0000

github-actions bot pushed a commit that referenced this pull request Feb 5, 2025
github-actions bot pushed a commit that referenced this pull request Feb 5, 2025
@jas58
Copy link

jas58 commented Feb 6, 2025

I might change the language for a learner to view (review) on their own, and me as a novice instructor.

"rendered"

What would I look for in "files" to help the learner identify what is happening inside their computer/institutional access?

Maybe an example of weird institutional names instead of ideal text?

At which level will the 'ls' command show me what you expect? I have tried to go up with '../' or is it '..' to go up and can't make sense of where I am.

Thanks again for starting this! maybe it can cascade across LC and DC, too?

github-actions bot pushed a commit that referenced this pull request Feb 6, 2025
@sstevens2
Copy link
Contributor Author

@jas58 I rewrote the text a bit to try to address the issues you noted above. Please let me know if you see additional changes that should be made.

github-actions bot pushed a commit that referenced this pull request Feb 6, 2025
@bkmgit
Copy link
Contributor

bkmgit commented Feb 8, 2025

Thanks for adding this. What has this been tested on?

@bkmgit
Copy link
Contributor

bkmgit commented Feb 8, 2025

Maybe it would be helpful not to work in the Desktop directory, but instead create a directory under $HOME wherever that is.

This is a larger change and could follow up this one.

@jas58
Copy link

jas58 commented Feb 8, 2025 via email

@bkmgit
Copy link
Contributor

bkmgit commented Feb 9, 2025

The text is ok. Am wondering if it is possible to avoid the problem by putting the files somewhere else on the local machine rather than in cloud storage. Do not use One Drive, so am not able to test it out.

Maybe something like rclone is better?

@jas58
Copy link

jas58 commented Feb 9, 2025 via email

@Adamtaranto
Copy link

I agree with @bkmgit , best to suggest a solution that sidesteps the whole Onedrive issue.

@jas58 can you please test echo $HOME/Desktop or echo ~/Desktop from the GitBash shell on a machine with this Onedrive backup issue?

If that works, maybe just add an instructor note and avoid a tangent that won't apply to most students.

Thanks, Benson, We are trying to guide newer instructors (like me) or novices reviewing the lesson on how to find home under Microsoft's new OneDrive problem. How might you address that or write it out in case you lost your voice during that part of the lesson?

On Sat, Feb 8, 2025, 7:48 AM Benson Muite @.***> wrote: Maybe it would be helpful not to work in the Desktop directory, but instead create a directory under $HOME wherever that is. This is a larger change and could follow up this one. — Reply to this email directly, view it on GitHub

@bkmgit
Copy link
Contributor

bkmgit commented Feb 10, 2025

Does the problem also occur on Windows Subsystem for Linux? It would be helpful to have this fixed upstream as well.

Ideally, the problem is avoidable, but if not a discussion on remote storage is probably needed. Many people doing research would benefit from cloud backups of their data. Can test out other solutions, using a buggy implementation is not a long term solution, though temporary fixes ate useful to ensure the lesson can be used.

@jas58
Copy link

jas58 commented Feb 10, 2025 via email

@sstevens2
Copy link
Contributor Author

Putting the lesson data files in a different folder could be a long term solution. However, we might want to think carefully about it. In my experience, being able to navigate to your desktop (a location most users are very familiar with) is very useful and an important learning opportunity for learners that helps them connect that the locations they are seeing in the unix shell are the same locations they see in file explorer/finder.

Perhaps this is related to my institution's adoption of one drive, but in the workshop I taught in Jan, more than half of the windows users had this One drive issue. It is possible to work around it by talking through it with learners as I described in this PR, and it helps learners know that onedrive is changing their file structure. I could move it to an inline instructor note as mentioned in the original issue if you prefer. Given @jas58 and my experience teaching with it I felt a callout could be useful for instructors. As a callout, it could still be skipped by instructors who don't feel it is needed but will be available for all instructors and for folks working through this lesson outside a workshop.

Switching to WSL2 is a big change that I don't think we are ready for at the moment. When I've tried to use it instead of gitBash in past workshops, there were various installation issues that learners ran into, some of which required updating bios settings. gitbash has worked much better for us.

@ndporter
Copy link
Contributor

I may come back to try and improve the language, but for now I'll leave a couple of comments based on my experience teaching this 3-4 times a year:

  1. This is a common issue for Windows users. In my setting (a University with most faculty using managed computers where they are not admin, with Microsoft services campuswide), typically around 50% of Windows users find that the files they save on their desktop end up in OneDrive
  2. I think it's useful to leave this in (e.g. not just move to a directory under Home/~ for the reasons stated above - that the learners will likely need to know about this quirk if they're going to successfully navigate the command line on their computers.
  3. (this is the one that would lead to updating language) - It is possible to have at least 4 different Desktop folders without realizing it: a local user Desktop, a local public Desktop (e.g. "all users"), a OneDrive/Desktop folder, and a managed OneDrive - [institution]/Desktop folder. In order to effectively help learners find their data, it would be valuable to explicitly have all the options or at least examples of what they look like in a callout and explain that you may have any or all of them on your computer.

As an aside, I didn't realize about the syncing marks, which I'll remember for myself in the future.

@sstevens2
Copy link
Contributor Author

Thanks @ndporter! I'd really appreciate your review of the language and suggestions on how to address point number 3 in your list.

@jas58
Copy link

jas58 commented Feb 11, 2025

Thanks, @ndporter @sstevens2 for the suggested language.
I'm unaware of this "icon" referenced. Can it be described? Or its location in Explorer or the terminal?
Is it the 3-hue blue cloud on the left of the word OneDrive?
Otherwise, the language as an instructor callout box will be an improvement.
If an image helps to explain the process or visual to copy a filepath, feel free to add the image from my comment in #1398

@bkmgit @Adamtaranto I'm sorry I was short-tempered this past weekend. I hadn't realized the different experiences/histories between maintainers and instructors. Thank you for your work to keep the lessons clean and clear.

@bkmgit
Copy link
Contributor

bkmgit commented Feb 13, 2025

Are there similar problems with msys2 or cygwin? Msys2 has an option to install Konsole as a terminal emulator, but as many people will likely also use git, being able to install git and use git from the terminal is useful.

It would be good to figure out where the OneDrive problem comes from so it can be fixed.

Do many people use the portable version of Git for Windows, or is this something most institutions will install for all learners? If WSL setup is problematic, can leave it as an option, but suggest something else as default.

@bkmgit
Copy link
Contributor

bkmgit commented Feb 13, 2025

It appears Cygwin was used around 2013, then a switch to msysgit/gitbash occurred. Mysys2 probably has better path management, git and other linux tools can also be installed in it. Cygwin has more tools, but is bigger, not sure about differences in user experience at present.

If there are multiple Desktop folders, and remote syncing probably adding an exercise/discussion on remote storage is needed. If we want most people to have a similar experience, may need to use something other than/in addition to OneDrive.

Typically advise people not to use Desktop when using this lesson, a users home directory is better. Navigating to the Desktop is a useful skill.

@bkmgit
Copy link
Contributor

bkmgit commented Feb 16, 2025

To clarify, am ok merging this, though would much prefer to use $HOME for the majority of the lesson and have an exercise discussing desktop and remote storage. Can do migration to using $HOME and merge this as a stop gap measure for the time being.

If there are opinions based on recent experiences using other options for using linux tools on windows, it would be helpful to have these. Maintenance of gitforwindows is also a volunteer project, but if many users have trouble with how OneDrive is handled, it would be good to raise an issue upstream

@Adamtaranto
Copy link

Adamtaranto commented Feb 16, 2025

@sstevens2 @jas58 Can one of you please test echo $HOME and echo ~/ from on a machine with this Onedrive desktop issue?

If possible please test from GitBash shell and from a WSL session.

We are reviewing the general lesson setup instructions and it will be useful to know how Onedrive affects the different options.

@sstevens2
Copy link
Contributor Author

sstevens2 commented Feb 17, 2025

Let me know if I'm missing replying to something. I'll try to cover a couple of things I noted from the convo above.

I don't think this is related to gitbash/cygwin/etc. It is that in the windows file system One Drive moves the desktop folder into a subfolder of itself, instead of it being directly in the home folder. I suspect in WSL2 it won't be an issue since they are separate partitions with their own home folders (at least last I checked).

I'm a bit hesitant to use the $HOME option at this point because it brings up system variables when learners are concentrating on learning how to use commands for the first time and how to navigate their file system.

I can't test it as I don't have or want to have onedrive set up on my personal computer, and my primary work computer is a mac. I know the solution I proposed from helping many people through this issue in workshops.

@jas58 I think the icon mentioned is in the file explorer but I can't check either. We can update the language to say the "icon in the file explorer" if that helps? I didn't write that text (I took it from the instructor notes) and it was a bit harder for me to evaluate as I've not looked at one drive in the file explorer much.

@ndporter
Copy link
Contributor

ndporter commented Feb 17, 2025

@sstevens2 @jas58 Can one of you please test echo $HOME and echo ~/ from on a machine with this Onedrive desktop issue?

If possible please test from GitBash shell and from a WSL session.

We are reviewing the general lesson setup instructions and it will be useful to know how Onedrive affects the different options.

In Git Bash, both commands just return the user home directory (/c/Users/ndporter for me).

That directory contains both Desktop and OneDrive/Desktop (and would contain a third desktop in One Drive - Virginia Tech - ndporter or something like that if I had triggered the creation of that version.

In WSL, both commands return /home/ndporter (my username), though the system loads to my user directory /mnt/c/Users/ndporter. There is no OneDrive folder of either sort that appears in home (only the ones already in my Windows user directory).

Practically, it appears that WSL runs in //wsl$ (which can only be found in Windows by knowing the address or looking in "Network" (not "This PC").

So if we use WSL's home directory to solve the OneDrive issue, we basically have to teach people to treat WSL like a separate computer (and also get them to download the data into WSL, which Windows may not readily expose, especially if network neighborhood is turned off - as it is for my work computer).

@bkmgit
Copy link
Contributor

bkmgit commented Feb 18, 2025

@ndporter Thanks for checking what WSL returns for $HOME.

@jas58
Copy link

jas58 commented Feb 18, 2025

I'm adding two screenshots. Maybe I didn't type in the right thing.
StubbsCommandTest
StubbsWSLtest
One might have the little cloud icon Sarah mentioned.

It looks like my enterprise managed laptop (which I'm due to trade in) is still blissfully OneDrive free, and hence why I as an instructor was confused and unable to help leaners in workshops.

@bkmgit
Copy link
Contributor

bkmgit commented Feb 19, 2025

@jas58 Thanks. In gitbash may need to check $HOME rather than $home. It is possible that the variable is not set.

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.

5 participants