-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First Draft GitHub Codespaces setup, preparation Summer Term 2024 (#355)
* set Ubuntu to 22.04 LTS for WSL2 * Update windows_wsl2.rst * make ubuntu 22.04 the explicit version for CoLRev * Update setup.rst * make installation of ubuntu 22.04 mandatory * Create github_codespaces.rst * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update setup.rst; link to codespaces setup * Update github_codespaces.rst; add "additional repo" steps * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update github_codespaces.rst * Update github_codespaces.rst * Update github_codespaces.rst --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f52b105
commit 53b2ca1
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
Install GitHub Codespaces | ||
------------------------- | ||
A short introduction video into GitHub Codespaces: `How to use GitHub Codespaces for Coding and Data Science <https://www.youtube.com/watch?v=kvJf8s18Vr4>`__ | ||
|
||
Prerequisites for web-based usage: | ||
|
||
- GitHub Account | ||
- Firefox or Chromium-based Browser | ||
|
||
Setup `Codespaces here <https://github.com/features/codespaces>`__: | ||
|
||
- Click: Get started for free | ||
- Click: New codespace | ||
- Click: Select a repository | ||
- Enter: colrev | ||
- Select: ColRev-Environment/colrev | ||
- Leave the rest on default settings (Branch: main; Region: Europe West; Machine type 2-core) | ||
- Uncheck "Auto-delete codespace" in "..." menu | ||
- Let "GitHub Codespaces configuration" do some initial setup (happens automatically) | ||
|
||
While on "@username ➜ /workspaces/colrev (main) $" run the following commands to setup the CoLRev development environment: | ||
|
||
:: | ||
|
||
pip install -e .[dev,docs] | ||
# if the command above terminates with a warning append "--break-system-packages" and rerun the command: | ||
# pip install -e .[dev,docs] --break-system-packages | ||
pre-commit run --all | ||
|
||
[Optional, recommended] For local usage also required: | ||
|
||
- Install Visual Studio Code available for Windows, Linux and macOS (`download <https://code.visualstudio.com/download>`__) | ||
- `Short intro <https://www.youtube.com/watch?v=u9ZQpKGTog4>`__ to "Git Graph" extension for VSCode (only for local installation of VSCode, web-based view does not work/stays blank) | ||
|
||
[Optional, recommended] Update your git credentials: | ||
|
||
:: | ||
|
||
git config --global user.name "Lisa Smith" | ||
git config --global user.email "lisa.smith@stud.uni-bamberg.de" | ||
git config --global credential.helper store | ||
|
||
[Optional] Add additional repos to current workspace and Git Graph: | ||
|
||
:: | ||
|
||
# In local VSCode setup click on "File" (top left menu)-> "Add Folder To Workspace..." -> enter absolute path to git repository | ||
# The newly added repo will be visible in Git Graph "Repo" drop-down menu | ||
# If the workspace settings is not saved, newly added repositories will not persist in Git Graph | ||
|
||
[Optional] Navigation in the terminal, open and edit text files: | ||
|
||
:: | ||
|
||
# navigate with | ||
ls | ||
cd | ||
# open any text files directly in VSCode | ||
code mytextfile.txt | ||
# or in the terminal window with nano or vim | ||
nano mytextfile2.txt | ||
vim mytextfile3.txt | ||
|
||
[Optional, diagnostics] Check if everything is setup correctly: | ||
|
||
:: | ||
|
||
# check if $PATH variable is correctly setup | ||
echo $PATH | grep :/home/codespace/.local/bin: | ||
# print effective user name | ||
whoami | ||
# print system information (kernel and distro version) | ||
uname -a | ||
# check docker functionality with docker-image "hello-world" | ||
docker run hello-world | ||
# print the git user name, user email and credential helper | ||
git config user.name | ||
git config user.email | ||
git config credential.helper | ||
|
||
[Optional] Create a SSH key pair and register the public key at Github | ||
(`steps <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent>`__). |