Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions _includes/copilot-setup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div>
<h4>Setting up GitHub Copilot in VSCode</h4>

<p>
In any VSCode window, click the Copilot icon near the bottom left corner of the bottom status bar and select "Use AI Features",
then follow the prompts to sign in using GitHub.
</p>
<p>
<img src="{{ '/assets/images/setup-copilot-status-bar.png' | relative_url }}" alt="Copilot status bar">
</p>

<p>
This will give you access to the [Copilot free plan](https://docs.github.com/en/copilot/concepts/billing/individual-plans) in VSCode.
</p>

<p>
To open the Copilot chat, go to **View > Chat**.
</p>

<p>
Reference: https://code.visualstudio.com/docs/copilot/setup
</p>
</div>
23 changes: 16 additions & 7 deletions _includes/extra-git-setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,30 @@ <h4>Git configuration</h4>

<p>
If you have never used Git on your computer, you may have to configure it.
The following instructions assume you have already created a GitHub account.
The following instructions assume you have already created a GitHub account following the main <a href="{{ 'setup.html' | relative_url }}">Setup</a> page.
</p>

<p>
Type the following commands in a terminal. Make sure to use the email associated with your GitHub account.
The <code>user.name</code> can be any name you want to appear as the author of your commits, but we recommend using the name associated with your GitHub profile.
Type the following commands in a terminal.
</p>


<p>Notes:</p>
<ul>
<li>For <code>user.email</code>, use the email associated with your GitHub account.</li>
<li><code>user.name</code> can be any name you want to use to author your commits, but we recommend using the display name on your GitHub profile.</li>
</ul>

<p>
<pre>
git config --global user.name "Jane Doe"
git config --global user.email "janedoe@example.com"
git config --global core.autocrlf true
git config --global user.name "Jane Doe" # Set the author name for your commits
git config --global user.email "janedoe@example.com" # Set the email linked to your commits
git config --global core.autocrlf true # Auto-handle line endings correctly across different OSes
git config --global init.defaultBranch main # Make new repos use "main" as the default branch name
git config --global pull.rebase false # Make "git pull" combine changes using merge by default
</pre>
</p>
<p>
<b>Tip:</b> You can review your configuration at any time with: <code>git config --list</code>
<b>Tip:</b> You can check your Git configuration at any time with: <code>git config --list</code>
</p>
</div>
11 changes: 5 additions & 6 deletions _includes/gh-ssh-key-setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<li>
In a terminal, <a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys">check if you have existing SSH keys in the ~/.ssh directory</a>.
A public/private key pair typically has the filename format <code>id_ALGORITHM</code> and <code>id_ALGORITHM.pub</code>.
If you have existing key files, use a custom name for your SSH key pair in step 2.
If you have existing key files, use a different, custom name for your SSH key pair in step 2.
</li>
<li>
<a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent">Generate a new SSH key and add it to the ssh-agent</a>.
<ul>
<li>Ensure to use the default file location for saving the key, unless you already have existing keys - in this case, replace just the <code>id_ALGORITHM</code> (e.g., <code>id_ed25519</code>) part of the file location with an informative keyname like <code>id_ed25519_github</code></li>
<li>Choose a passphrase you can remember easily, as you will need to use it for certain Git commands</li>
<li>Use the default file location for saving the key, unless you already have existing keys - in this case, replace just the <code>id_ALGORITHM</code> (e.g., <code>id_ed25519</code>) part of the file location with an informative keyname like <code>id_ed25519_github</code></li>
<li><strong>Store your passphrase in a secure location</strong>, as you will need to use it for certain Git commands</li>
</ul>
</li>
<li>
Expand All @@ -30,7 +30,7 @@
Locally specify the SSH key to use when connecting to GitHub, so that the right "identity" is always used for local Git operations (useful when you have multiple keys).
<ol>
<li>
Run the following command (replace <code>id_ed25519</code> with your <strong>private</strong> key's filename if you used a custom key name):
Run the following command (if you used a custom key name, replace <code>id_ed25519</code> with your <strong>private</strong> key's filename):
<pre><code>printf 'Host github.com\n User git\n IdentityFile ~/.ssh/id_ed25519\n IdentitiesOnly yes\n' &gt;&gt; ~/.ssh/config</code></pre>
</li>
<li>
Expand All @@ -40,8 +40,7 @@
<pre><code>Host github.com
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
</code></pre>
IdentitiesOnly yes</code></pre>
</li>
</ol>
</li>
Expand Down
11 changes: 8 additions & 3 deletions _includes/setup-python-package.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<p>
<pre>
conda config --append channels conda-forge
conda config --set channel_priority strict
conda create -n qlsc612 -y python=3.12 flake8 jupyterlab jupyter nilearn matplotlib seaborn bokeh statsmodels plotly wordcloud
conda config --append channels conda-forge # add conda-forge as a source for packages (channel)
conda config --set channel_priority strict # prioritize packages based on channel order
conda create -n qlsc612 -y python=3.12 flake8 jupyter nilearn matplotlib seaborn bokeh statsmodels plotly wordcloud
conda activate qlsc612
</pre>
</p>
Expand All @@ -16,3 +16,8 @@
The last line, <code>conda activate qlsc612</code>,
will activate this Python environment (the default environment is <code>base</code>).
</p>

<p>
Once the commands have finished running, you should see `(qlsc612)` at the beginning of your terminal prompt
to indicate that the new environment is active.
</p>
12 changes: 12 additions & 0 deletions _includes/vs-code-workspace-trust-popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<blockquote>
<p>
<strong>NOTE:</strong>
The first time you run <code>code .</code> in a folder,
you may see a popup asking "Do you trust the authors of the files in that folder?"
</p>
<p>
Select "Yes, I trust the authors", and if available, also check the box that says
"Trust the authors of all files in the parent folder".
This will enable full features and extensions in your VSCode workspace.
</p>
</blockquote>
Binary file added assets/images/setup-copilot-status-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 38 additions & 21 deletions setup/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Instructions for setting up on Linux

### Bash shell

You already have it! Depending on which version of Linux youre running you may
You already have it! Depending on which version of Linux you're running you may
need to type `bash` inside the terminal to access it. To check whether this is
necessary, follow these steps:

Expand All @@ -25,28 +25,34 @@ If you are prompted to install it follow the instructions on-screen to do so.

{% include extra-git-setup.html %}

#### Creating an SSH key for GitHub
#### Create an SSH key for GitHub

When following the GitHub docs below, make sure to select the **Linux** instructions.
When following the GitHub docs in the steps below, make sure to select the **Linux** instructions at the top of the page.

{% include gh-ssh-key-setup.html %}

### VSCode

1. Go to [this page](https://code.visualstudio.com/) and click the download
button for either the `.deb` (Ubuntu, Debian) or the `.rpm` (Fedora, CentOS) file.
1. Double-click the downloaded file to install VSCode
2. Double-click the downloaded file to install VSCode
(you may be prompted to type your administrator password during the install).
3. To confirm that everything worked, open a terminal and type `code .` (include the period).
This should open the current directory in a VSCode window.

{% include vs-code-workspace-trust-popup.html %}

#### VSCode extensions

1. Open the Visual Studio Code application.
1. Open the Extension side panel by pressing `Ctrl+Shift+X`.
2. Open the Extension side panel by pressing `Ctrl+Shift+X`.
In the search bar at the top of this panel
search for each of the following extensions and press `Install` for the first entry that appears.

{% include vs-code-extensions.html %}

{% include copilot-setup.html %}

### Python

1. Open a new terminal and type the following lines (separately) into the
Expand All @@ -57,23 +63,23 @@ When following the GitHub docs below, make sure to select the **Linux** instruct
bash Miniconda3-latest-Linux-x86_64.sh
```

1. A license agreement will be displayed and the bottom of the terminal will read `--More--`.
2. A license agreement will be displayed and the bottom of the terminal will read `--More--`.
Press `Enter` or the space bar until you are prompted with
"Do you accept the license terms? [yes|no]."
Type `yes` and then press `Enter`
1. The installation script will inform you that it is going to install into a default directory (e.g., `/home/$USER/miniconda3`).
`Do you accept the license terms? [yes|no]`.
Type `yes` and then press `Enter`.
3. The installation script will inform you that it is going to install into a default directory (e.g., `/home/$USER/miniconda3`).
Leave this default and press `Enter`.
1. When you are asked
"Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no],"
4. When you are asked
`Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no]`,
type `yes` and press `Enter`.
Exit the terminal once the installation has finished.
1. Re-open a new terminal.
Type `which python` into the terminal and it should return a path (e.g., `/home/$USER/miniconda3/bin/python`).
- If you do not see a path like this then please try typing `conda init`,
5. Re-open a new terminal.
Type `which python` into the terminal and check that it returns a path like `/home/$USER/miniconda3/bin/python`.
- If you do not see a path like this, try typing `conda init`,
closing your terminal, and repeating this step.
If your issue is still not resolved skip the following step
and contact an instructor on the `#help-installation` channel of the Slack workspace.
1. Type the following to remove the installation script that was downloaded:
6. Type the following to remove the installation script that was downloaded:

```bash
rm ./Miniconda3-latest-Linux-x86_64.sh
Expand All @@ -90,13 +96,24 @@ When following the GitHub docs below, make sure to select the **Linux** instruct
[Debian](https://docs.docker.com/engine/install/debian/),
[Fedora](https://docs.docker.com/engine/install/fedora/),
[CentOS](https://docs.docker.com/engine/install/centos/)). Make sure to
follow the Install using the repository method!
1. Once youve installed Docker make sure to follow the
follow the "Install using the repository" method!
2. Once you've installed Docker make sure to follow the
[post-install instructions](https://docs.docker.com/engine/install/linux-postinstall/)
as well. You only need to do the “Manage Docker as a non-root user” and
“Configure Docker to start on boot” steps.
1. Open a new terminal and type `docker run hello-world`. A brief introductory
message should be printed to the screen.
as well. You only need to do the "Manage Docker as a non-root user" and
"Configure Docker to start on boot" steps.
3. Open a new terminal and type `docker run hello-world`.
If the installation worked, a brief introductory message should be printed to the screen.

### Install the `tree` command

`tree` is a helpful command for viewing directory structures, and is strongly recommended.

1. Open a terminal, and check if you have `tree` already installed by running `tree --version`.
- If you see a version number, you're all set!
- If you see a message like `tree: command not found`, install it by running:
```bash
sudo apt-get update && sudo apt-get install -y tree
```

---

Expand Down
Loading
Loading