├── .gitattributes
├── .gitignore
├── README.md
├── docs
├── 1-run_scripts_cmd_line.md
├── 2-git_version_control
│ ├── archive_branch.sh
│ ├── git_dif_excel_workaround.md
│ ├── git_lfs.md
│ ├── index.md
│ ├── sync_git_branches.sh
│ └── useful_git_commands.md
├── 3-edit_with_vscode.md
├── 4-mambaforge_python_env.md
├── 5-poetry_package_manager.md
├── css
│ └── custom_style.css
├── img
│ ├── add-ssh-host.png
│ ├── bitbucket_settings.png
│ ├── code_logo.png
│ ├── conda-bashrc.png
│ ├── conda-cmd.png
│ ├── conda-init.png
│ ├── conda-install-done.png
│ ├── conda-license.png
│ ├── conda-loc.png
│ ├── conda-profile.png
│ ├── conda_deps_installed.png
│ ├── conda_env_created.png
│ ├── enter-ssh-pw.png
│ ├── enter-ssh-pw2.png
│ ├── git-excel-changes.png
│ ├── git-log.png
│ ├── git-rebase1.png
│ ├── git-rebase2.png
│ ├── git-rebase3.png
│ ├── git-rebase4.png
│ ├── git-rebase5.png
│ ├── git-rebase6.png
│ ├── git-rebase7.png
│ ├── git-rebase8.png
│ ├── git-rebase9.png
│ ├── git_settings.png
│ ├── github_connected_wsl.png
│ ├── host-added.png
│ ├── install_vscode_ext_in_wsl.png
│ ├── json-viewer-extension.png
│ ├── jupyter-extension.png
│ ├── markdown-extension.png
│ ├── medium_article.png
│ ├── no-excel-change.png
│ ├── notebook-access-error.png
│ ├── open-ssh-folder.png
│ ├── open_wsl_folder.png
│ ├── orig-excel.png
│ ├── pdf-extension.png
│ ├── poetry-init1.png
│ ├── poetry-init2.png
│ ├── poetry-install1.png
│ ├── poetry-install2.png
│ ├── poetry_add.png
│ ├── poetry_add_file_updates.png
│ ├── poetry_install_output.png
│ ├── post_poetry_install.png
│ ├── prettify-json-extension.png
│ ├── python-env-manager-extension.png
│ ├── python-extension.png
│ ├── rainbow-csv-extension.png
│ ├── remote-edit-tab.png
│ ├── remote-ssh-pkg.png
│ ├── remove-git-exclusion.png
│ ├── reset_wsl_pw.png
│ ├── ssh connected.png
│ ├── ssh-clone-success.png
│ ├── ssh-connect-command.png
│ ├── ssh-success.png
│ ├── ssh_clone.png
│ ├── ssh_keygen.png
│ ├── start-ubuntu-install.png
│ ├── start_ssh_agent_wsl.png
│ ├── terminal_formatting.png
│ ├── test.png
│ ├── ubuntu-install-done.png
│ ├── update-ssh-file.png
│ ├── updated-excel.png
│ ├── vscode_wsl.png
│ ├── windows-feature.png
│ ├── wsl-1.png
│ ├── wsl-3.png
│ ├── wsl-4.png
│ ├── wsl-5.png
│ ├── wsl-no-distros.png
│ ├── wsl-targets.png
│ ├── wsl_2.png
│ ├── wsl_install_git.png
│ ├── wsl_keygen.png
│ ├── wsl_terminal.png
│ ├── wsl_terminal2.png
│ └── wsl_username.png
└── index.md
├── excel_to_text_dump.py
├── git_dif_excel_demo.xlsx
├── mkdocs.yml
├── poetry.lock
├── pyproject.toml
└── sync_or_create_all_mds.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.xlsx diff=excel
2 | *.xls diff=excel
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
3 | # mkdocs
4 | site/
5 |
6 | # script markdowns
7 | archive_branch.md
8 | sync_git_branches.md
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## View the documentation at: https://jillvillany.github.io/python-dev-setup/
2 |
3 | ### To create the documentation site
4 |
5 | ```
6 | conda create -n python-dev-setup python=3.9 -y
7 | conda activate python-dev-setup
8 | poetry install --no-root
9 | python sync_or_create_all_mds.py
10 | mkdocs gh-deploy
11 | ```
12 |
13 | ### To view a working version of the documentation site
14 |
15 | ```
16 | mkdocs serve
17 | ```
--------------------------------------------------------------------------------
/docs/1-run_scripts_cmd_line.md:
--------------------------------------------------------------------------------
1 | ## Mac
2 |
3 | Mac's Terminal app is ideal for this because Mac has a Linux based OS and most apps are deployed to Linux machines in Production due to their cost effectiveness.
4 |
5 |
6 | ## Windows
7 |
8 | Since Window's is not a Linux based OS, you can set up a Linux virtual environment with WSL.
9 |
10 | ### Set Up a WSL Environment
11 |
12 | [WSL Article Reference](https://docs.microsoft.com/en-us/windows/wsl/install)
13 |
14 | NOTE: If you already have a legacy version of WSL installed (i.e. WSL1 instead of WSL2), uninstall it so you can follow the install steps below
15 |
16 |
17 | 1. Enable Virtual Machine Platform Windows Feature (if not already done)
18 | -
19 | 2. Ensure virtualization is enabled in the Bios: https://support.microsoft.com/en-us/windows/enable-virtualization-on-windows-11-pcs-c5578302-6e43-4b4b-a449-8ced115f58e1
20 | 3. Run Windows PowerShell as an administrator and select yes to the prompt asking if you want to allow the app to make changes to your device
21 | -
22 | 4. Run the command `wsl --install`
23 | - This will take a few minutes, but on successful complete, you should see the below output
24 | -
25 | 5. Restart your computer
26 | 6. If you see an Ubunutu terminal loaded when you log back in
27 | -
28 | - Close out of the Ubuntu window, and open PowerShell
29 | - Run the command `wsl -l -v` to list your installed Linux Distributions and you should see something like the following
30 | - NOTE: The star next to the Ubuntu-20.40 distribution means this is the default distribution that will be used when launching WSL
31 | -
32 | - To launch your default Linux distribution from PowerShell, simply run the command `wsl`
33 | -
34 | 7. If you don't see an Ubuntu shell, you likely don't have any distributions installed.
35 | -
36 | - Install an Ubuntu distribution with the command `wsl --install -d ubuntu`
37 | -
38 | - Create a username and password when prompted.
39 | - **NOTE:** Be sure to save the username and password you use for this linux distribution - each distro has a dif one and this is what has sudo access
40 | - When the install completes you will see
41 | -
42 |
43 | ## Format Your Terminal
44 |
45 | No matter the command line interface (CLI) used, it helps to format your CLI to work well with Git so that you know what branch you are working on and don't accidentally commit code to the wrong branch.
46 |
47 | ### `.bashrc` vs. `.bash_profile`
48 |
49 | The code below accounts for proper formatting using both the `.bashrc` and `.bash_profile`. This is important because `.bashrc` is used for inactive logins (i.e. task run in the background like a cron job or VSCode logging into your terminal), and `.bash_profile` is used when you are actively logging in.
50 |
51 | **NOTE:** Code below found in [this Medium article](https://medium.com/@charlesdobson/how-to-customize-your-macos-terminal-7cce5823006e)
52 |
53 | 1. Open your terminal of choice (i.e. Mac users default terminal/ Windows users WSL)
54 | 2. Cd to your home directory
55 | - ```cd ~```
56 | 3. Create `.bash_profile` file if it doesn't already exist
57 | - ```touch .bash_profile```
58 | 4. Open `.bash_profile`
59 | - Mac: ```open .bash_profile```
60 | - WSL: ```notepad .bash_profile```
61 | - Linux: ```vim .bash_profile```
62 | 5. Add this line to the bottom of the file
63 | - ```source ~/.bashrc```
64 | - NOTE: In vim, type `i` to enter INSERT mode and then right click to paster the copied text. Press `esc` to exit INSERT mode. Type `:wq` and press enter to save and close the file.
65 | 6. Create `.bashrc` file if it doesn't already exist
66 | 7. Open `.bashrc`
67 | 8. Add this line to the bottom of the file
68 | - ```source ~/.bash_prompt```
69 | 9. Create `.bash_prompt file`
70 | 10. Open `.bash_prompt` file
71 | 11. Add these lines to your file
72 | ```
73 | #!/usr/bin/env bash
74 |
75 | # GIT FUNCTIONS
76 | git_branch() {
77 | git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*$ \\(.*\\)/ (\\1)/'
78 | }
79 |
80 | # TERMINAL PROMPT
81 | PS1="\[\e[0;93m\]\u\[\e[m\]" # username
82 | PS1+=" " # space
83 | PS1+="\[\e[0;95m\]\W\[\e[m\]" # current directory
84 | PS1+=" " # space
85 | PS1+="\[\e[0;92m\]\$(git_branch)\[\e[m\]" # current branch
86 | PS1+=" " # space
87 | PS1+=">> " # end prompt
88 | export PS1;
89 |
90 | export CLICOLOR=1
91 | export LSCOLORS=ExFxBxDxCxegedabagacad
92 | ```
93 | 12. Relaunch you terminal and navigate to a git repo (i.e. this python-dev-setup repo). You will now see your terminal prompt formatted with your username, current folder and repo branch
94 | - Mac:
95 | -
96 | - WSL:
97 | -
98 | -
99 |
--------------------------------------------------------------------------------
/docs/2-git_version_control/archive_branch.sh:
--------------------------------------------------------------------------------
1 | # This script takes one input:
2 | # branch name
3 | # To archive a branch in this repo run: ./archive_branch.sh branch_name
4 |
5 | # capture the standard output of a command so it can be retrieved with ret
6 | cap () { tee /tmp/capture.out; }
7 |
8 | # return the output of the most recent command that was captured by cap
9 | ret () { cat /tmp/capture.out; }
10 |
11 | # checkout master to make sure not on the branch archiving
12 | git checkout main
13 | git pull
14 | # redirect error message to stdout so can be captured
15 | git tag archive/$1 $1 2>/tmp/capture.out | cap
16 | echo $(ret)
17 |
18 | if [[ $(ret) == *"Failed to resolve"* ]]; then
19 | # try checking out the branch first
20 | git checkout $1 2>/tmp/capture.out | cap
21 | echo $(ret)
22 | if [[ $(ret) == *"did not match any file"* ]];
23 | then
24 | echo "ERROR REASON: $1 branch doesn't exist"
25 | exit 0
26 | fi
27 | git checkout master
28 | git tag archive/$1 $1 2>/tmp/capture.out | cap
29 | echo $(ret)
30 | if [[ $(ret) == *"already exists"* ]]; then
31 | echo Tag already exists, specify new name:
32 | read newTag
33 | git tag archive/$newTag $1 2>/tmp/capture.out | cap
34 | echo $(ret)
35 | if [[ $(ret) == *"already exists"* ]]; then
36 | echo ERROR REASON: New tag name already exists
37 | exit 0
38 | fi
39 | fi
40 | elif [[ $(ret) == *"already exists"* ]]; then
41 | echo Tag already exists, specify new name:
42 | read newTag
43 | git tag archive/$newTag $1 2>/tmp/capture.out | cap
44 | echo $(ret)
45 | if [[ $(ret) == *"already exists"* ]]; then
46 | echo ERROR REASON: New tag name already exists
47 | exit 0
48 | fi
49 | else
50 | echo tag archive/$1 created successfully
51 | fi
52 |
53 | git push origin --tags
54 | git branch -d $1
55 | git push -d origin $1
--------------------------------------------------------------------------------
/docs/2-git_version_control/git_dif_excel_workaround.md:
--------------------------------------------------------------------------------
1 | Git does not natively support showing the differences in binary files such as Excel files.
2 |
3 |
4 | This causes a variety of problems including:
5 |
6 | - Unsure if file actually edited - VS Code will usually mark the file modified once it is opened
7 | - Unsure what changes were made
8 |
9 | To ease the inconvenience of this, you can make your own custom diff tool.
10 |
11 | ## Setup Steps
12 |
13 | 1. Create "excel_to_text_dump.py" with the following code
14 | ```
15 | from io import StringIO
16 | import sys
17 |
18 | import pandas as pd
19 |
20 |
21 | for sheet_name in pd.ExcelFile(sys.argv[1]).sheet_names:
22 | output = StringIO()
23 | print('Sheet: %s' % sheet_name)
24 | pd.read_excel(sys.argv[1], sheet_name=sheet_name)\
25 | .to_csv(output,
26 | header=True,
27 | index=False)
28 | print(output.getvalue())
29 | ```
30 |
31 | 2. Add to .gitattributes file
32 | ```
33 | *.xlsx diff=excel
34 | *.xls diff=excel
35 | ```
36 | 3. Update .git/config file
37 | This creates a filter to convert the file to text so that it can still be compared with git diff
38 |
39 | ```
40 | [diff "excel"]
41 | textconv = python {absolute path to file}
42 | ```
43 |
44 | **NOTE:** The `.git` folder is a hidden folder
45 |
46 | - To view the folder in Mac Finder:
47 | - `shift + cmd + .`
48 | - To view the folder in VS Code:
49 | - Go into VS Code's Preferences > Settings
50 | - Search for `files.exclude` and remove the `**/.git` item
51 | -
52 |
53 | ## Push .gitattributes and Excel file
54 |
55 | In order for the .gitattributes to take effect it must first at least be committed.
56 |
57 | ## Run git diff
58 |
59 | If there is no output, you know it is just because the file was open. For example:
60 | ```
61 | git diff git_dif_excel_demo.xlsx
62 | ```
63 |
64 |
65 | If there were changes,for example changing the text classification of a review in one row from "positive" to "neutral", the output will look like this:
66 |
67 | - File before modifications:
68 | -
69 | - File after modifications:
70 | -
71 | - Git diff output
72 | -
73 |
74 | ## Handle merge conflicts
75 | You can choose to use the version of the file on your active branch (--ours) or the branch you are merging in (--theirs)
76 |
77 | For example:
78 | ```
79 | git checkout --ours {path to file}
80 | git add {path to file}
81 | ```
82 |
--------------------------------------------------------------------------------
/docs/2-git_version_control/git_lfs.md:
--------------------------------------------------------------------------------
1 | ## Git LFS
2 |
3 | Git LFS is used to for large file storage.
4 |
5 | - Download and install: [Git Large File Storage ](https://git-lfs.github.com/)
6 |
7 | ### Install Git LFS on Linux
8 | 1. Navigate to [https://github.com/git-lfs/git-lfs/releases](https://github.com/git-lfs/git-lfs/releases)
9 | 2. Download the package .rpm file for your Linux Distribution
10 | 3. Switch to root user `sudo su`
11 | 4. Install the package
12 | ```
13 | rpm -iv {absolute path to .rpm file}
14 | ```
15 | 5. Install git lfs
16 | ```
17 | git lfs install
18 | ```
19 |
20 | ### Fetch all git lfs files
21 | **NOTE:** Use this command if you installed Git LFS after cloning the repo
22 | ```
23 | git lfs fetch --all
24 | ```
25 |
26 | ### Track a file with git lfs
27 | This will add the file paths to the .gitattributes file
28 | **NOTE:** The .gitattibutes file must be committed before it takes effect
29 |
30 | ```
31 | git lfs track {path to file}
32 | ```
33 |
34 | ### See files currently tracked
35 | ```
36 | git lfs ls-files
37 | ```
38 |
39 | ### See lfs files committed or staged for commit
40 | ```
41 | git lfs status
42 | ```
--------------------------------------------------------------------------------
/docs/2-git_version_control/index.md:
--------------------------------------------------------------------------------
1 | ## Install
2 | ### Mac
3 |
4 | 1. Install Apple Xcode developer tools
5 | - ```xcode-select --install```
6 | 2. Download Homebrew: https://brew.sh/
7 | - Homebrew helps you easily manage installs on a Mac from command-line
8 | 3. Install git using homebrew
9 | - ```brew install git```
10 |
11 | ### Windows
12 |
13 | 1. From PowerShell, open your Ubuntu Linux distribution with `wsl` and run the command ` apt install git`
14 | -
15 | - NOTE: If you forgot your password (or were not prompted to set one upon initial WSL install), you can reset your password using the following steps:
16 | - Exit the Linux distribution you are in with the command `exit`
17 | - Re-enter the Linux distribution as the root user `wsl -u root`
18 | - Enter the command `passwd {your username}` and type in the new password
19 | -
20 | - NOTE: your username is what you saw in the command prompt when you weren't at the root
21 | -
22 | - Exit the Linux Distribution with `exit`
23 |
24 | ### Red Hat Linux
25 |
26 | 1. Switch to the super user (a.k.a root user)
27 | - ```sudo su```
28 | 2. Enter your password
29 | 3. Install git
30 | - ```yum install git```
31 | 4. Switch back to a normal user
32 | - ```exit```
33 |
34 | ## Set Git Username and Email
35 |
36 | In order to commit/ push code to Git you must configure your username and email.
37 |
38 | 1. `git config --global user.name {your username}`
39 | 2. `git config --global user.email {your email}`
40 |
41 | ## Configure SSH Auth
42 |
43 | To easily authenticate with Github/ Bitbucket (i.e. not need to enter your username/ password every time you pull/push to the repo) you can set up SSH authentication.
44 |
45 | Setting up git authentication on a personal machine (i.e. one that only you will be using) is very simple. However, if multiple user may be using the machine (i.e. a Linux Machine shared by a development team) you will want to follow a few additional step so that commits can be distinguished by user.
46 |
47 |
48 | ### Personal Machine SSH Auth
49 |
50 | 1. Create an SSH key pair with the command `ssh-keygen` and press enter to accept all the default
51 | -
52 | 2. Copy the content of the id_rsa.pub file using the `cat {path to your file}` command
53 | - For example, `cat ~/.ssh/id_rsa.pub`
54 | 3. See the [Machine Type Agnostic Steps](#machine-type-agnostic-steps) section for remaining steps
55 |
56 | ### Shared Machine SSH Auth
57 |
58 | 1. Create an SSH key pair with the command `ssh-keygen`, adding your git profile to the end of the id_rsa file name instead of accepting all default
59 | - For example:
60 | `Users/jillvillany/.ssh/id_rsa_jillvillany`
61 | -
62 | 2. Navigate to where the ssh key pair was created using the `cd {path to ssh folder}` command
63 | - For example: `cd Users/jillvillany/.ssh`
64 | 3. Create the config file
65 | ```
66 | touch config
67 | vim config
68 | ```
69 | - **NOTE:** Git username vairable is case sensitive
70 | - If using Github, add the below to your config file:
71 | ```
72 | Host github-{git username}
73 | HostName github.com
74 | IdentityFile ~/.ssh/id_rsa_{git username}
75 | IdentitiesOnly yes
76 | ```
77 | - If using Github Enterprise (i.e. IBM), add the below to yuur config file:
78 | ```
79 | Host github-{git username}
80 | HostName github.ibm.com
81 | IdentityFile ~/.ssh/id_rsa_{git username}
82 | IdentitiesOnly yes
83 | ```
84 | - If Bitbucket:
85 | ```
86 | Host bitbucket.org-{git username}
87 | HostName bitbucket.org
88 | User git
89 | IdentityFile ~/.ssh/id_rsa_{git username}
90 | IdentitiesOnly yes
91 | ```
92 | - **NOTE:** If you have other users to add, create similar entries below in the file
93 | 4. Copy the contents of the `id_rsa_{git username}.pub` file using the `cat id_rsa_{git username}.pub` command
94 |
95 | ### Machine Type Agnostic Steps
96 |
97 | 5. Add SSH key in Github or Bitbucket
98 | - In Github:
99 | - Navigate to Settings > SSH and GPG keys
100 | -
101 | - Click New SSH key and add the contents of your `id_rsa_{git username}.pub` file in the key field
102 | - In Bitbucket:
103 | - Navigate to personal settings
104 | -
105 | - Select SSH Key > Add Key add the contents of your `id_rsa_{git username}.pub` file in the key field
106 | 6. Add the SSH key to the SSH agent
107 | ```
108 | ssh-add ~/.ssh/id_rsa_{git username}
109 | ```
110 | - NOTE: if you get an error about connecting to the ssh agent, you need to start the agent in the background with `eval $(ssh-agent -s)`
111 | -
112 | 7. Test your SSH connection
113 | - If on a personal machine:
114 | - Github: ```ssh -T git@github.com```
115 | -
116 | - Github Enterprise (i.e. IBM): ```ssh -T git@github.ibm.com```
117 | - Bitbucket: ```ssh -T git@bitbucket.org```
118 | - If on a shared machine:
119 | - Github: ```ssh -T git@github-{your username}```
120 | - Github Enterprise (i.e. IBM): ```ssh -T git@github.ibm-{your username}```
121 | - Bitbucket: ```ssh -T git@bitbucket.org-{your username}```
122 |
--------------------------------------------------------------------------------
/docs/2-git_version_control/sync_git_branches.sh:
--------------------------------------------------------------------------------
1 | # return the output of the most recent command that was captured by cap
2 | ret () { cat /tmp/capture.out; }
3 |
4 | # checkout source branch -> named master or main based on bitbucket/ github use
5 | # Use &> to capture both stdout and stderr
6 | git checkout master &> /tmp/capture.out
7 | switch_master_out=$(ret)
8 | if [[ $switch_master_out == *"error: pathspec 'master' did not match any file(s) known to git"* ]]; then
9 | source_branch="main"
10 | else
11 | source_branch="master"
12 | fi
13 | echo "Using $source_branch for source branch name"
14 | echo
15 |
16 | # error: pathspec 'master' did not match any file(s) known to git
17 | git pull
18 |
19 | # After fetching, remove any remote-tracking branches which no longer exist on the remote
20 | echo
21 | echo "Removing any remote-tracking branches which no longer exist on the remote..."
22 | git fetch --prune
23 |
24 | #### checkout and pull all the remote branches ####
25 | echo
26 | echo "CHECKING LOCAL AND REMOTE BRANCHES SYNCED..."
27 |
28 | git branch -r &> /tmp/capture.out
29 | # echo "$(ret)"
30 |
31 | remote_branches_string=$(ret)
32 | IFS=$'\n' read -rd '' -a remote_branches_array <<<"$remote_branches_string"
33 |
34 | # potential source branch names: head, main, master
35 | source_branch_regex="(\s*(head|main|master)\s*|.*(origin/head|origin/main|origin/master).*)"
36 |
37 | echo
38 | for branch in "${remote_branches_array[@]}"
39 | do
40 | # NOTE: important to put the longer string on the left
41 | if ! [[ $branch =~ $source_branch_regex ]]; then
42 | # replace origin with empty str
43 | branch_name=$(echo $branch | sed 's/origin\///')
44 | # split on space and take first element - for origin/head -> origin/master
45 | branch_name_array=($branch_name)
46 | branch_name=$(echo ${branch_name_array[0]})
47 | echo "BRANCH NAME: $branch_name"
48 | git checkout $branch_name
49 | git pull
50 | fi
51 | done
52 |
53 | #### Clean up local branches that no longer have an upstream ref ####
54 | echo
55 | echo "CHECKING IF LOCAL BRANCHES NEED CLEAN-UP..."
56 | git checkout $source_branch
57 | git branch &> /tmp/capture.out
58 | # echo "$(ret)"
59 |
60 | local_branches_string=$(ret)
61 | IFS=$'\n' read -rd '' -a local_branches_array <<<"$local_branches_string"
62 |
63 | echo
64 | for branch in "${local_branches_array[@]}"
65 | do
66 | if ! [[ $branch =~ $source_branch_regex ]]; then
67 | echo "BRANCH NAME: $branch"
68 | git checkout $branch &> /tmp/capture.out
69 | branch_checkout_msg=$(ret)
70 | echo $branch_checkout_msg
71 | if [[ $branch_checkout_msg == *"the upstream is gone"* ]]; then
72 | git checkout $source_branch
73 | git branch -D $branch
74 | echo "Deleted $branch"
75 | fi
76 | git pull &> /tmp/capture.out
77 | branch_pull_msg=$(ret)
78 | echo $branch_pull_msg
79 | if [[ $branch_pull_msg == *"no such ref was fetched"* ]]; then
80 | git checkout $source_branch
81 | git branch -D $branch
82 | echo "Deleted $branch"
83 | elif [[ $branch_pull_msg == *"There is no tracking information for the current branch"* ]]; then
84 | git checkout $source_branch
85 | git branch -D $branch
86 | echo "Deleted $branch"
87 | fi
88 | fi
89 | done
90 |
--------------------------------------------------------------------------------
/docs/2-git_version_control/useful_git_commands.md:
--------------------------------------------------------------------------------
1 | ## Get Repo
2 | ### Clone repo with SSH auth
3 |
4 | **IMP NOTE:** If you are an SSH config file so multiple git users can be on the same machine (i.e. as done in instructions above), you must modify the SSH URL git provides
5 |
6 | For example, in `git@github.com:jillvillany/python-dev-setup.git` replace ".com" with "-{username}" -> `git@github-jillvillany:jillvillany/python-dev-setup.git`
7 |
8 | 1. Select SSH when you clone the code and copy the URL
9 | -
10 | 2. Enter the command ```git clone {SSH URL}```
11 | - For example: `git clone git@github.com:jillvillany/python-dev-setup.git`
12 | -
13 |
14 | ### Switch Repo to SSH auth
15 |
16 | 1. Set the remote URL to the URL used with ssh
17 | - ```git remote set-url origin {SSH URL}```
18 | 2. Now try ```git push```
19 | 3. Answer yes to the prompt and you will see git connects/ shows everything up to date without prompting for username/ password
20 | -
21 |
22 | ### Maintain a Forked Repo
23 |
24 | To sync your forked version of the repo with the most updated version of the main repo:
25 |
26 | 1. ```git checkout master```
27 | 2. If not already done: ```git remote add upstream {ssh url}```
28 | 3. ```git fetch upstream```
29 | 4. ```git rebase upstream/master```
30 | 5. ```git push -u origin```
31 |
32 |
33 | ## File Changes
34 |
35 | ### Add new/ modified files
36 | ```
37 | git pull
38 | git add {relative file path}
39 | git commit -m "commit message"
40 | git push
41 | ```
42 | **IMPORTANT:** If multiple users are working in the directory, be sure to set the git config user.email before pushing so that commits belong to the user that made the change
43 | ```
44 | git config user.email {your email}
45 | ```
46 |
47 | ### Amend last commit message
48 | ```
49 | git commit --amend
50 | ```
51 |
52 | ### See text of unpushed commit
53 | ```
54 | git cherry -v
55 | ```
56 |
57 | ### Undo all local changes to the checked out branch
58 | ```
59 | git stash
60 | ```
61 |
62 | ### Undo local changes to a particular file
63 | ```
64 | git checkout --{file name}
65 | ```
66 |
67 | ## Branches
68 |
69 | ### Create & Publish a New Branch
70 | ```
71 | git checkout -b {branch name} {branch making new branch from}
72 | git push -u origin {branch name}
73 | ```
74 |
75 | ### Archive & Delete a Branch
76 |
77 | ```
78 | git tag archive/{branchname} {branchname}
79 | git push origin --tags
80 | git branch -d {branchname}
81 | git push -d origin {branch_name}
82 | ```
83 |
84 | **NOTE:** If need to delete a created tag
85 |
86 | ```
87 | git tag -d
88 | ```
89 |
90 | #### archive_branch.sh
91 | The process of archiving numerous branches can get tedious. See the archive_branch.sh script for an automated way to archive branches.
92 |
93 | ### Restore an archived branch
94 | ```
95 | git checkout -b {branch name} archive/{archived branch name}
96 | ```
97 |
98 | ## Merges
99 |
100 | ### Abort a merge
101 | ```
102 | git merge --abort
103 | ```
104 |
105 | ### Ours vs Theirs
106 | You can choose to use the version of the file on your active branch (--ours) or the branch you are merging in (--theirs)
107 |
108 | For example:
109 | ```
110 | git checkout --ours {path to file}
111 | git add {path to file}
112 | ```
113 |
114 | ## Undo
115 | ### Revert to a previous commit
116 | ```
117 | git revert {commit hash}
118 | ```
119 | - **NOTE:** See [this stack overflow post](https://stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit) for more details
120 |
121 | ### Revert specific file to previous commit
122 | [Reference: https://ohshitgit.com/](https://ohshitgit.com/)
123 | ```
124 | # find a hash for a commit before the file was changed
125 | git log
126 | # use the arrow keys to scroll up and down in history
127 | # once you've found your commit, save the hash
128 | git checkout [saved hash] -- path/to/file
129 | # the old version of the file will be in your index
130 | git commit -m "Wow, you don't have to copy-paste to undo"
131 | ```
132 |
133 | ### Undo last commit - keep changes in staged
134 | ```
135 | git reset HEAD~ --soft
136 | ```
137 |
138 | ### Remove file added before last commit
139 | If you accidentally add a file with PII or a file that should be stored with git-lfs, this is super helpful!
140 |
141 | See the following Medium Article for context: [Tutorial: Removing Large Files from Git](https://medium.com/analytics-vidhya/tutorial-removing-large-files-from-git-78dbf4cf83a#:~:text=If%20the%20large%20file%20was,HEAD%20to%20edit%20the%20commit)
142 |
143 | 1. Identify the commit before the mistake was made
144 | ```
145 | git log
146 | ```
147 |
148 | This will show you all the commits from the branch you are on with the latest first:
149 |
150 |
151 | Once you find the last good commit - in this case the "git updates" commit before the "bad file" was added - close out of the git log by typing `wq`
152 |
153 | 2. Initiate a rebase between the last good commit and the current commit
154 | ```
155 | git rebase -i cffbcbcaf2d46a6c60e730c3f580646727bf9a57
156 | ```
157 | **IMPORTANT NOTE:** You can abort a rebase at any time with `git rebase --abort`
158 |
159 | 3. You will be brought into vim where all the commits after the last good commit (here the first 3 lines) are displayed. All the other stuff is just instructions.
160 |
161 |
162 | 4. You want to edit the first commit with the bad file and pick (i.e. keep without changes) the other two.
163 | - Type `i` to enter insert mode
164 | - Delete pick and write edit
165 | - Press `esc` to exit insert mode
166 | - Type `:wq` to save
167 | -
168 |
169 | 5. You are now in a detached, temporary space
170 |
171 |
172 | 6. Remove the file from git
173 | ```
174 | git rm --cached bad_file.xlsx
175 | ```
176 |
177 |
178 | 7. Delete the file (or add it to git lfs files ). You need to do this becuase if you git status, you will see the file as an untracked file.
179 |
180 | - **NOTE:** The steps for adding a file to git lfs are:
181 | - `git lfs track {path to file}`
182 | - This should update your `.gitattributes` file - run `git status` to check
183 | - `git add .gitattribtues`
184 | - `git add {path to file}`
185 |
186 | 8. Now that you are done with the changes to the commit, amend the commit:
187 | ```
188 | git commit --amend
189 | ```
190 |
191 | 9. Use vim to edit the text of the commit from "bad file and formatting updates" to "formatting updates"
192 | - Type `i` to enter insert mode
193 | - Press `esc` to exit insert mode
194 | - Type `:wq` to close and save
195 |
196 |
197 | 10. Once you save and close the commit amend, you will see the below:
198 |
199 |
200 | 11. Continue the rebase (it will go until the next edit commit or complete if nothing left to edit). In our case, we have nothing else to edit, so the rebase completes successfully.
201 | ```
202 | git rebase --continue
203 | ```
204 |
205 |
206 | If you `git log` again, you will see that commit message is updated but the rest of the history looks the same
207 |
208 |
209 | 12. Push your rebased branch to the remote
210 | ```
211 | git push --force
212 | ```
213 |
214 |
215 | ## Compare
216 | ### Compare your local branch to origin
217 | ```
218 | git diff origin/branch name
219 | ```
--------------------------------------------------------------------------------
/docs/3-edit_with_vscode.md:
--------------------------------------------------------------------------------
1 | ## Install
2 |
3 | 1. [Download Vscode](https://code.visualstudio.com/download)
4 | 2. Install the extensions below (optional):
5 |
6 | - Python
7 | - Extension ID: ms-python.python
8 | -
9 | - Python Environment Manager
10 | - Extension ID: donjayamanne.python-environment-manager
11 | -
12 | - Jupyter
13 | - Extension ID: ms-toolsai.jupyter
14 | -
15 | - Prettify JSON
16 | - Extension ID: mohsen1.prettify-json
17 | -
18 | - JSON Viewer
19 | - Extension ID: ccimage.jsonviewer
20 | -
21 | - Markdown Preview Enhanced
22 | - Extension ID: shd101wyy.markdown-preview-enhanced
23 | -
24 | - Rainbow CSV
25 | - Extension ID: mechatroner.rainbow-csv
26 | -
27 | - vscode-pdf
28 | - Extension ID: tomoki1207.pdf
29 | -
30 | - Remote-SSH
31 | - Extension ID: ms-vscode-remote.remote-ssh
32 | -
33 | - WSL (only if using Windows WSL)
34 | - Extension ID: ms-vscode-remote.remote-wsl
35 | -
36 |
37 | **NOTE:** If you are using a remote WSL or SSH server, you will also need to install these packages there.
38 |
39 |
40 | ## Use VSCode with WSL
41 |
42 | 1. Once you install the WSL extension, navigate to the Remote Explorer tab and connect to your WSL distribution
43 | -
44 | 2. Navigate to open a folder as you normally would
45 | -
46 | 3. Install VSCode extensions that are installed locally by navigating to the marketplace and clicking the `Install in WSL:Ubuntu` button
47 | -
48 |
49 | ## Configure Remote-SSH Editing
50 |
51 | When project files are hosted on a Linux Machine, you can easily edit/ debug them as you would local files by taking advantage of VS Code's Remote-SSH extension.
52 |
53 | To use SSH to connect to a remote Linux machine:
54 |
55 | 1. Open the Command Palette
56 | - Mac: `shift + cmd + P`
57 | - Windows: `shift + ctrl + P`
58 | 2. Search for/ Select Remote-SSH: Add New SSH Host..
59 | -
60 | 3. Enter the ssh connection command
61 | - `ssh {username}@{ip}`
62 | -
63 | 4. Select the ssh file to update
64 | -
65 | 5. You will see a pop-up in the bottom right corner that the host has been added
66 | -
67 | 6. In the Remote Explorer tab, you will now see your new SSH Target. Click the plus folder icon to "Connect to Host in New Window"
68 | -
69 | 7. A new window will open and you will be prompted to enter your password
70 | -
71 | 8. Choose the folder in the remote machine you want to open and select "OK"
72 | -
73 | 9. You will be prompted for your password one more time
74 | -
75 | 10. Upon successful connection, you will see the remote machine's ip as well as the git branch you are currently on (if opened to a git repo) in the bottom left corner
76 | -
77 |
78 | You can now easily edit and debug your code as you would locally.
79 |
80 | ### Note on High Security Remote Machines
81 | If you are connecting to the remote machine with a normal user (i.e. non-root user) you will may get access errors when trying to run a ipynb file depending on the user's permissions.
82 |
83 |
84 |
85 | This happens because, in a Unix/Linux system, you can’t bind to external facing ports without super user/root access.
86 |
87 | If you do not have an environment controlled with Puppet, you can try editing the user's permissions to not need password authentication when entering root user mode. However, it is easiest to just test small code snippets in a noteboook file locally.
88 |
89 | For more information, see [https://code.visualstudio.com/docs/remote/ssh](https://code.visualstudio.com/docs/remote/ssh)
90 |
91 |
--------------------------------------------------------------------------------
/docs/4-mambaforge_python_env.md:
--------------------------------------------------------------------------------
1 | ## Install
2 | ### Mac
3 |
4 | 1. Install `wget`
5 | ```bash
6 | brew install wget
7 | ```
8 | 2. Install Mambaforge
9 | ```bash
10 | wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
11 | bash Mambaforge-$(uname)-$(uname -m).sh
12 | ```
13 |
14 | ### Windows WSL/ Linux
15 |
16 | 1. Install `wget`
17 | ```bash
18 | sudo apt install wget
19 | ```
20 | 2. Install Mambaforge
21 | ```bash
22 | wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
23 | bash Mambaforge-$(uname)-$(uname -m).sh
24 | source ~/.bashrc
25 | ```
26 |
27 | ## Shared Install Instructions
28 | 1. Respond to install prompts
29 | - Accepts the license
30 | -
31 | - Accept the default install location
32 | -
33 | - Accept default to not update shell profile
34 | -
35 | -
36 | 2. Run `conda init`
37 | -
38 | - This will add the conda init to your `.bashrc` file
39 | -
40 | 3. If not done already, add sourcing `.bashrc` to your `.bash_profile` so conda is initialized when your terminal loads
41 | ```
42 | source ~/.bashrc
43 | ```
44 | 4. Now when you open your terminal and run the command `conda` you will see:
45 | -
46 |
47 | ## Useful Mambaforge Commands
48 |
49 | - Create new conda python virtual environment
50 | * Note: If it asks you to select y/n, enter "y"
51 | ```bash
52 | conda create -n {name} python={version}
53 | ```
54 | - Activate conda environment
55 | ```bash
56 | conda activate {name}
57 | ```
58 | - Deactivate conda environment
59 | ```bash
60 | source deactivate
61 | ```
62 |
--------------------------------------------------------------------------------
/docs/5-poetry_package_manager.md:
--------------------------------------------------------------------------------
1 |
2 | ## Install
3 |
4 | - Install `poetry` with the following command:
5 | ```curl -sSL https://install.python-poetry.org | python3 -```
6 | - Restart your terminal
7 | - Enter `poetry` and you should see a list of commands returned
8 |
9 | **NOTE:** If that install doesn't work for you, use this workaround:
10 |
11 | - Activate the conda environment for your project
12 | - Run `pip install poetry==1.7`
13 |
14 | ## Specify Project Dependencies
15 |
16 | When you are first creating the project, you will use `poetry init` to interactively create the `pyproject.toml` file.
17 |
18 | For example, to create specify this project's dependencies, I followed the steps below:
19 |
20 | 1. Create a conda environment with the same name as the project folder
21 |
22 | - `conda create -n python-dev-setup python=3.9`
23 | -
24 |
25 | 2. Run `poetry init`
26 |
27 | - Press enter to accept the defaults until you get to the questions on defining dependencies interactivaly
28 | -
29 | - I find it easier to specificy the dependencies individually later vs. at this step. So, I enter no to both questions and then press enter to confirm generation.
30 | -
31 |
32 | 3. You will now see a `pyproject.toml` file created
33 |
34 | **NOTE:** If you are converting a project that currently uses a `requirements.txt` file, you can just fill in the template below instead of using poetry init:
35 |
36 | ```
37 | [tool.poetry]
38 | name = "{repo/project name}"
39 | version = "1.0.0"
40 | description = "{free text description}"
41 | readme = "README.md"
42 | repository = "{git repo link}"
43 | documentation = "{site url if applicable}"
44 | authors = [
45 | "{full name} <{email}>"
46 | ]
47 |
48 | [tool.poetry.dependencies]
49 | python = "=={Python version}"
50 |
51 | [tool.poetry.dev-dependencies]
52 |
53 | [build-system]
54 | requires = ["poetry-core>=1.0.0"]
55 | build-backend = "poetry.core.masonry.api"
56 | ```
57 |
58 | ## Create poetry.lock file
59 |
60 | The first time you run `poetry install` or add a package with `poetry add {package name}`, the `poetry.lock` file is created
61 |
62 | After adding the dependencies needed with `poetry add`, push the `pyproject.toml` and `poetry.lock` files to the remote repo.
63 |
64 | ## Install Project Dependencies
65 |
66 |
67 | Now that the lock file is created, other team members can simply:
68 |
69 | 1. Create a conda environment using python version 3.9
70 | 2. Run `poetry install`
71 |
72 | After these steps, they will be working with the same dependencies you are using!
73 |
74 | ## Useful Poetry Commands
75 |
76 | ### Install requirements
77 | ```
78 | poetry install
79 | ```
80 |
81 | ### Add a package
82 | This will install the latest package version. The `pyproject.toml` will show a version greater than or equal to the version is required and the `poetry.lock` file will update to specify the specific version installed.
83 |
84 | - Add the latest version fo the package meeting other project depencies:
85 | - `poetry add {package name}`
86 | - Install specific version of the package:
87 | - `poetry add {package name}={version}`
88 | - Install a model from a URL:
89 | - `poetry add {package name}@{url}`
90 | - Install an editable local package:
91 | - `poetry add --editable {relative path to package}`
92 |
93 | ### Remove a package
94 | This will update the `pyproject.toml` and `poetry.lock` files
95 | ```
96 | poetry remove {package name}
97 | ```
98 |
99 | ### Convert `poetry.lock` file to `requirements.txt`
100 | ```
101 | poetry export -f requirements.txt -o requirements.txt --without-hashes
102 | ```
103 |
104 | ## Troubleshooting
105 |
106 | If poetry is endlessly searching for a package to install, try deleting the `poetry.lock` file and running `poetry install` again
107 |
--------------------------------------------------------------------------------
/docs/css/custom_style.css:
--------------------------------------------------------------------------------
1 | th {
2 | font-weight: bold;
3 | }
4 |
5 | .df-div {
6 | overflow-x:auto;
7 | }
8 |
9 | .codehilite code{
10 | background-color: white;
11 | }
12 |
13 | /* format like code */
14 | .md-typeset mark {
15 | background-color:#f5f5f5;
16 | color: #404e56;
17 | padding: 2px
18 | }
19 |
20 | /* format medium link embed */
21 | .medium-link {
22 | border-style: solid;
23 | border-color: #404e56;
24 | padding: 10px;
25 | width: 100%;
26 | margin: 0 auto;
27 | display: -webkit-flex; /* Safari */
28 | display: flex; /* Standard syntax */
29 | }
30 |
31 | .article-info {
32 | width: 75%;
33 | float: left
34 | }
35 |
36 | .article-img {
37 | width: 25%;
38 | float: right
39 | }
40 |
--------------------------------------------------------------------------------
/docs/img/add-ssh-host.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/add-ssh-host.png
--------------------------------------------------------------------------------
/docs/img/bitbucket_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/bitbucket_settings.png
--------------------------------------------------------------------------------
/docs/img/code_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/code_logo.png
--------------------------------------------------------------------------------
/docs/img/conda-bashrc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda-bashrc.png
--------------------------------------------------------------------------------
/docs/img/conda-cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda-cmd.png
--------------------------------------------------------------------------------
/docs/img/conda-init.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda-init.png
--------------------------------------------------------------------------------
/docs/img/conda-install-done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda-install-done.png
--------------------------------------------------------------------------------
/docs/img/conda-license.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda-license.png
--------------------------------------------------------------------------------
/docs/img/conda-loc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda-loc.png
--------------------------------------------------------------------------------
/docs/img/conda-profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda-profile.png
--------------------------------------------------------------------------------
/docs/img/conda_deps_installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda_deps_installed.png
--------------------------------------------------------------------------------
/docs/img/conda_env_created.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/conda_env_created.png
--------------------------------------------------------------------------------
/docs/img/enter-ssh-pw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/enter-ssh-pw.png
--------------------------------------------------------------------------------
/docs/img/enter-ssh-pw2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/enter-ssh-pw2.png
--------------------------------------------------------------------------------
/docs/img/git-excel-changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-excel-changes.png
--------------------------------------------------------------------------------
/docs/img/git-log.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-log.png
--------------------------------------------------------------------------------
/docs/img/git-rebase1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase1.png
--------------------------------------------------------------------------------
/docs/img/git-rebase2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase2.png
--------------------------------------------------------------------------------
/docs/img/git-rebase3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase3.png
--------------------------------------------------------------------------------
/docs/img/git-rebase4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase4.png
--------------------------------------------------------------------------------
/docs/img/git-rebase5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase5.png
--------------------------------------------------------------------------------
/docs/img/git-rebase6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase6.png
--------------------------------------------------------------------------------
/docs/img/git-rebase7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase7.png
--------------------------------------------------------------------------------
/docs/img/git-rebase8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase8.png
--------------------------------------------------------------------------------
/docs/img/git-rebase9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git-rebase9.png
--------------------------------------------------------------------------------
/docs/img/git_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/git_settings.png
--------------------------------------------------------------------------------
/docs/img/github_connected_wsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/github_connected_wsl.png
--------------------------------------------------------------------------------
/docs/img/host-added.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/host-added.png
--------------------------------------------------------------------------------
/docs/img/install_vscode_ext_in_wsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/install_vscode_ext_in_wsl.png
--------------------------------------------------------------------------------
/docs/img/json-viewer-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/json-viewer-extension.png
--------------------------------------------------------------------------------
/docs/img/jupyter-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/jupyter-extension.png
--------------------------------------------------------------------------------
/docs/img/markdown-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/markdown-extension.png
--------------------------------------------------------------------------------
/docs/img/medium_article.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/medium_article.png
--------------------------------------------------------------------------------
/docs/img/no-excel-change.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/no-excel-change.png
--------------------------------------------------------------------------------
/docs/img/notebook-access-error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/notebook-access-error.png
--------------------------------------------------------------------------------
/docs/img/open-ssh-folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/open-ssh-folder.png
--------------------------------------------------------------------------------
/docs/img/open_wsl_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/open_wsl_folder.png
--------------------------------------------------------------------------------
/docs/img/orig-excel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/orig-excel.png
--------------------------------------------------------------------------------
/docs/img/pdf-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/pdf-extension.png
--------------------------------------------------------------------------------
/docs/img/poetry-init1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/poetry-init1.png
--------------------------------------------------------------------------------
/docs/img/poetry-init2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/poetry-init2.png
--------------------------------------------------------------------------------
/docs/img/poetry-install1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/poetry-install1.png
--------------------------------------------------------------------------------
/docs/img/poetry-install2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/poetry-install2.png
--------------------------------------------------------------------------------
/docs/img/poetry_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/poetry_add.png
--------------------------------------------------------------------------------
/docs/img/poetry_add_file_updates.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/poetry_add_file_updates.png
--------------------------------------------------------------------------------
/docs/img/poetry_install_output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/poetry_install_output.png
--------------------------------------------------------------------------------
/docs/img/post_poetry_install.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/post_poetry_install.png
--------------------------------------------------------------------------------
/docs/img/prettify-json-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/prettify-json-extension.png
--------------------------------------------------------------------------------
/docs/img/python-env-manager-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/python-env-manager-extension.png
--------------------------------------------------------------------------------
/docs/img/python-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/python-extension.png
--------------------------------------------------------------------------------
/docs/img/rainbow-csv-extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/rainbow-csv-extension.png
--------------------------------------------------------------------------------
/docs/img/remote-edit-tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/remote-edit-tab.png
--------------------------------------------------------------------------------
/docs/img/remote-ssh-pkg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/remote-ssh-pkg.png
--------------------------------------------------------------------------------
/docs/img/remove-git-exclusion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/remove-git-exclusion.png
--------------------------------------------------------------------------------
/docs/img/reset_wsl_pw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/reset_wsl_pw.png
--------------------------------------------------------------------------------
/docs/img/ssh connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/ssh connected.png
--------------------------------------------------------------------------------
/docs/img/ssh-clone-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/ssh-clone-success.png
--------------------------------------------------------------------------------
/docs/img/ssh-connect-command.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/ssh-connect-command.png
--------------------------------------------------------------------------------
/docs/img/ssh-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/ssh-success.png
--------------------------------------------------------------------------------
/docs/img/ssh_clone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/ssh_clone.png
--------------------------------------------------------------------------------
/docs/img/ssh_keygen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/ssh_keygen.png
--------------------------------------------------------------------------------
/docs/img/start-ubuntu-install.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/start-ubuntu-install.png
--------------------------------------------------------------------------------
/docs/img/start_ssh_agent_wsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/start_ssh_agent_wsl.png
--------------------------------------------------------------------------------
/docs/img/terminal_formatting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/terminal_formatting.png
--------------------------------------------------------------------------------
/docs/img/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/test.png
--------------------------------------------------------------------------------
/docs/img/ubuntu-install-done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/ubuntu-install-done.png
--------------------------------------------------------------------------------
/docs/img/update-ssh-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/update-ssh-file.png
--------------------------------------------------------------------------------
/docs/img/updated-excel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/updated-excel.png
--------------------------------------------------------------------------------
/docs/img/vscode_wsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/vscode_wsl.png
--------------------------------------------------------------------------------
/docs/img/windows-feature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/windows-feature.png
--------------------------------------------------------------------------------
/docs/img/wsl-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl-1.png
--------------------------------------------------------------------------------
/docs/img/wsl-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl-3.png
--------------------------------------------------------------------------------
/docs/img/wsl-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl-4.png
--------------------------------------------------------------------------------
/docs/img/wsl-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl-5.png
--------------------------------------------------------------------------------
/docs/img/wsl-no-distros.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl-no-distros.png
--------------------------------------------------------------------------------
/docs/img/wsl-targets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl-targets.png
--------------------------------------------------------------------------------
/docs/img/wsl_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl_2.png
--------------------------------------------------------------------------------
/docs/img/wsl_install_git.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl_install_git.png
--------------------------------------------------------------------------------
/docs/img/wsl_keygen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl_keygen.png
--------------------------------------------------------------------------------
/docs/img/wsl_terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl_terminal.png
--------------------------------------------------------------------------------
/docs/img/wsl_terminal2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl_terminal2.png
--------------------------------------------------------------------------------
/docs/img/wsl_username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jillvillany/python-dev-setup/4a3635455bd8329d186c0cb3770f0b98c60972a0/docs/img/wsl_username.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ## Table of Contents
2 |
3 |
Task | 6 |Recommended Tool | 7 |Content | 8 |
---|---|---|
11 | 1. Run Scripts from Command Line 12 | | 13 |
14 |
|
19 |
20 |
|
25 |
2. Version Control Your Code | 28 |Git | 29 |
30 |
|
42 |
3. Edit and Debug Your Code | 45 |VS Code | 46 |
47 |
|
53 |
4. Manage Your Python Version | 56 |Mambaforge | 57 |
58 |
|
63 |
5. Manage Your Python Package Versions | 66 |Poetry | 67 |
68 |
|
74 |