You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -34,7 +34,7 @@ The _system software_ includes the _operating system_ (OS) of a computer and the
34
34
As far as this book is concerned, the _application software_ is where our true interest lies, as it is here where we will be writing programs to solve our problems of interest and collaborate with others. This is where our everyday software tools for scientific computing are categorized, for example, Python, VS Code, Matlab, our web browsers (e.g., Chrome) and much more software! As illustrated in the following figure, "we want to be" working at a relatively high level of application software (e.g., writing Python code to conduct analysis and make interesting visualizations) such that we don't have to worry about which OS we are working on. This is both to allow us to focus on our work, as well as collaborate others.
Copy file name to clipboardExpand all lines: book/environments.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ If the concept of an _environment_ facilitates the running of code, an _environm
13
13
14
14
The purpose of environments and environment managers is to allow an arbitrary software project to be used on an arbitrary computer, regardless of operating system (although one should note that some OS-specific software is required, for example the environment manager itself). This is illustrated schematically in the following figure.
Environments and environment managers make it very easy to share projects between collaborators without the need to make computer-specific versions that are compatible with a wide variety of hardware and operating systems. This is illustrated schematically in the following figure, where multiple environment managers can be used to run projects on different computers. Depending on the requirements of a project or computer, a wide number of environment managers could be considered by the user.
Copy file name to clipboardExpand all lines: book/install/common/env_vars_windows.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Your computer has _environment variables_ which define the behavior of your oper
10
10
````{tip}
11
11
Keep in mind that the Windows OS allows you to set environment variables for a specific _user_ as well as for the _system_ (all users). It is important to note which environment variable you should set for a given activity, as choosing the wrong one can have unintended consequences (or lead to much frustration!). The difference can be seen in the example here:
@@ -61,7 +61,7 @@ Note also that depending on your system settings, or if you are copying the path
61
61
62
62
The easiest way to find the appropriate setting window is by typing the first letters of "environment" in the Windows toolbar. The first three letters are usually enough to cause several relevant options to appear; select _Edit environment variables for your account_ and see the figure below for an illustration:
@@ -73,7 +73,7 @@ As a general rule you should only adjust the `PATH` variable for the _user_, **n
73
73
74
74
To set the right variable, pay particular attention to the descriptions provided in the environment variable window, as it is easy to miss; the right location is illustrated clearly in the following figure:
@@ -83,7 +83,7 @@ Unless specified otherwise, don't set an environment variable for the _system_,
83
83
84
84
Once you have identified the proper (user) window, look for the `PATH` variable, select it, then click the "Edit..." button. If the variable value is empty, you will probably see a window similar to that in the following figure; enter (paste) the path of the folder (directory) you wish to add to the path in the field "Variable value" then click "OK." Note that you can browse for the file and folder of interest via the settings window if you did not already copy the path via the File Explorer or a CLI.
@@ -93,7 +93,7 @@ How to add a folder (directory) location to the `PATH` variable. The example her
93
93
94
94
If there are already values set for the `PATH` variable then the "Edit..." button will probably show a window like that in the following figure. In this case, you can add a new path via the "New" button; paste the path in an open row of the list. Note that you can browse for the file and folder of interest via the settings window if you did not already copy the path via the File Explorer or a CLI.
Copy file name to clipboardExpand all lines: book/install/common/hidden.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ If this doesn't work, try a Google search for "Finding hidden files on a Mac" an
19
19
20
20
Settings for hidden files and folders can be found directly via the Windows File Explorer. First find the "options" or "settings" configuration window (sometimes pressing the `ALT` button toggles the menubar on and off):
Copy file name to clipboardExpand all lines: book/install/python/miniconda.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ del miniconda.exe
33
33
Note that depending on your Windows settings `CTRL+V` does not always work; you may need to use the menu bar of the terminal window or right-click and select paste. In addition, the paste feature typically works one line at a time, therefore after the first line is executed (download) you may need to hit enter once or twice to complete the last lines, as they may not execute automatically.
@@ -110,7 +110,7 @@ Now that Miniconda is installed on your system, from now on we will use the Anac
110
110
````{tab-item} Windows OS
111
111
112
112
Open the Windows tool bar and begin typing "Anaconda". You should soon see two options appear: "Anaconda Prompt" and "Anaconda PowerShell Prompt." There two versions are based on the two primary CLI's on Windows: Command Prompt and PowerShell. Unless you are an experienced PowerShell user, we recommend using the Command Prompt version: Anaconda Prompt (see figure below):
Copy file name to clipboardExpand all lines: book/version_control/version_control.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ While working on personal or university projects, without a doubt you have come
13
13
14
14
What you have been doing is called version control. Version control systems start with a base version of the document and then record changes you make each step of the way. You can think of it as a recording of your progress: you can rewind to start at the base document and play back each change you made, eventually arriving at your most recent version, as shown in figure {numref}`intro1`:
Once you think of changes as separate from the document itself, you can then think about "playing back" different sets of changes on the base document, resulting in different versions of that document. For example, two users can make independent sets of changes on the same document, resulting in 2 independent versions ({numref}`intro2`).
Unless multiple users make changes to the same section of the document - a conflict - you can incorporate two sets of changes into the same base document ({numref}`intro3`).
Copy file name to clipboardExpand all lines: book/workflows/git/branch_merge.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ Commits in git have a graph structure, where every node is a commit and edges re
6
6
7
7
The graph below shows the commit history of a repo with two commits:
8
8
9
-

9
+

10
10
11
11
The main advantage of version control is that it allows developers to work together in parallel. During projects, you will be working on "feature" branches and separating the work to review and merge it later. A common graphical structure of commits is shown below, where we have developers working on 3 separate branches and merging their work when necessary. This separation offers flexibility, parallelization of work, and offers more control over the development process.
12
12
13
-

13
+

14
14
15
15
In the commit graph above you see two branches (`Main` and `Dev Branch`). The orange commits `q1` and `q2` were part of a branch but that branch is merged with `main`. The `HEAD` is at `m2`, so if you're looking at the files in repository, you see the stated of all the files after that commit. E.g. the changes from `a1`, `m3` and `q2` (and all others not in front of `m2`) are not visible. So it's not only possible to change branch, but also to go back in time with `Head`!
Copy file name to clipboardExpand all lines: book/workflows/git/cloning.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This page will show you how to use Source Control in VS Code to **clone** a repo
6
6
7
7
Upon opening VS Code, we see that the first thing that is needed is to clone a repository ({numref}`clone1_VSC`). First, we have to get the address from our GitHub account.
@@ -16,7 +16,7 @@ Opening the VS Code Source Control tab for the first time--we need to clone a re
16
16
17
17
Visit the repository you would like to clone to your computer on GitHub. As illustrated in {numref}`clone2_VSC`, you can see a bright green button "Clone" on the home page of the repository.
@@ -28,7 +28,7 @@ Home page of the repository in GitHub; note the "Clone" button.
28
28
29
29
To clone the repository, we need the address--its location on the internet. There are several ways to do this, but the most secure is using SSH. As illustrated in {numref}`clone3_VSC`, under "Clone with SSH," click the icon to copy the URL to your clipboard, then go back to VS Code.
@@ -41,15 +41,15 @@ Copy SSH address of repository to your clipboard.
41
41
42
42
Now you are ready to click the "Clone Repository" option in the Source Control tab of VS Code ({numref}`clone1`). Paste the address you copied from GitHub into the top bar and press 'enter' (as shown in {numref}`clone4_VSC`). Then select the folder or location on your local machine where you would like the _local repository_ to be stored ({numref}`clone5_VSC`).
@@ -85,7 +85,7 @@ At this point you can create the local repository by clicking "Select Repository
85
85
`````{note}
86
86
If you were not successful in creating an SSH key and linking it to your GitHub account, this is when you will find out, as a message like this will appear:
@@ -98,7 +98,7 @@ If this happens, go back to the [SSH setup instructions](../../install/git/intro
98
98
99
99
If you were successful in cloning the repository, you will see something similar to {numref}`clone7` and you can choose to open your _local repository_. Now we are ready to work on the files and preserve the changes by making our first local **commit**!
Copy file name to clipboardExpand all lines: book/workflows/git/commits_local.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Now that we have learned how to clone a repository, we will find out how to make
6
6
7
7
We begin by identifying the repository on which we would like to work, in this case `sandbox-public`; the starting condition is visible in {numref}`commit1_VSC` after cloning and opening your repository (see previous page). We can see that it began as a completely empty repository, except for the default README.md file that GitHub creates automatically.
@@ -18,7 +18,7 @@ Starting position after cloning GitHub repository and opening it in VS Code.
18
18
19
19
Now that our repository is cloned, we are ready to get to work! First we will make a change to `README.md` in VS Code. As shown in {numref}`commit1_VSC`, we have removed the title and added some relevant text. Save the changes to the file then click the Source Control tab.
@@ -34,7 +34,7 @@ Once the changes have been saved, open the Source Control view in VS Code. You w
34
34
35
35
If we click on the README under Changes we can see in {numref}`commit3_VSC`, git has now registered the changes in our file. git uses a few text symbols to identify and describe the changes, for example, a `+` and `-`. VS Code highlights the changed lines in green and red, making it very obvious what happened.
@@ -53,7 +53,7 @@ A local commit can record changes made to more than one file at once--we are onl
53
53
54
54
Because the change to our `README.md` was so large, it was difficult to see all the changes. Let's try making another one. Using the change summary in {numref}`commit4_VSC`, can you tell what happened to the file?
@@ -80,7 +80,7 @@ The small change to `README.md` revealed.
80
80
81
81
Now that we have recorded our commits with git, there is one last thing to do: update the _remote repository._ We can do this by **pushing** the commit, using the blue "Sync Changes" button shown in {numref}`commit6_VSC`.
@@ -96,7 +96,7 @@ Origin is the name git uses to identify the original _remote repository_ where o
96
96
97
97
Now that we have pushed to origin, it is easy to confirm that things worked. First, we can see that in VS Code Source Control once again shows no changes, as in {numref}`commit7_VSC`.
@@ -106,7 +106,7 @@ View of VS Code Source Control with no local changes.
106
106
107
107
In addition, we can check the remote repository directly. Visiting the [home page of the repository](https://github.com/monadevos/sandbox-public/tree/main) is the best way to check the current status. {numref}`commit8_VSC` illustrates how this paged looked just after we pushed our commit to origin. As you can see the screenshot was made very soon afterwards (the "now" message), the commit message is visible, and we can see the actual change in in the text of `README.md`.
0 commit comments