Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes ahead of Tech Lab 2024 #37

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
*.pyc
.ipynb_checkpoints
42 changes: 26 additions & 16 deletions Installation.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,53 @@
## Installation Instructions

### 1. Installing **Git** (Windows laptop only. Mac OS has Git already installed)

- Navigate to: https://www.atlassian.com/git/tutorials/git-bash
- Download & install the latest version of Git Bash.

### 2. Installing **Docker**

- Navigate to: https://docs.docker.com/engine/install/
- Download & install the right docker engine for your operating system.

### 3. Install your Favorite Terminal (You can skip this step if you already have one installed on your machine)
- You can install **Git Bash**, for example, https://git-scm.com/downloads.

- You can install **Git Bash**, for example, https://git-scm.com/downloads.

### 4. Fork the GitHub repository and clone it locally.

- In your favorite terminal, clone the repository
```
git clone <GitHubRepo>
```
```
git clone <GitHubRepo>
```
- Navigate into the folder **learning_labs**

### 5. Create a **Docker image** of the BBIT Lab (This might take some time, so have a coffee :) )

- First, ensure that docker is running and then in your favorite terminal, from the folder **learning_labs**, run the following command to build the docker image:
```
docker build . --tag bbitlab
```
**We can remove this step if we publish our image to DockerHub**

```
docker build . --tag bbitlab
```

**We can remove this step if we publish our image to DockerHub**

### 6. Launch a docker container layer over the docker image of the lab

- launch our container and mount the **learning_labs** folder as a volume to access the lab.
```
docker run -p 8888:8888 -v <full path of the folder 'learning_labs'>:/app bbitlab
```

- When the container fully launches, you should have a similar output.
You should copy the URL *(circled in red)* and paste it into your favorite web browser to launch Jupyter Lab.
![alt text](./data/bbit_lab.PNG)
```
docker run --rm -p 8888:8888 -v <full path of the folder 'learning_labs'>:/app bbitlab
```

> Tip: on _Git Bash_ and _macOS Terminal_, use the `pwd` command to
> get the full path of your current directory.

- When the container fully launches, you should have a similar output.
You should copy the URL _(circled in red)_ and paste it into your favorite web browser to launch Jupyter Lab.
![alt text](./data/Images/bbit_lab.PNG)

**If you have a similar page displaying in your browser, you are all set and ready to start working on the BBIT Lab.**
![alt text](./data/bbit_lab_2.PNG)
![alt text](./data/Images/bbit_lab_2.PNG)

Thank you!!
Thank you!!
13 changes: 11 additions & 2 deletions PortfolioManager/0-Securities/securities_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,20 @@
"metadata": {},
"outputs": [],
"source": [
"#Run this cell before running the your testing cell. This will setup the ipytest cell magic command. If you're running this notebook locally you may need to install ipytest from pip or conda\n",
"#Run this cell before running the your testing cell. This will:\n",
"# 1. adjust the system path to locate your solution;\n",
"# 2. setup the ipytest cell magic command.\n",
"#If you're running this notebook locally you may need to install ipytest from pip or conda\n",
"#%conda install ipytest\n",
"#%pip install ipytest\n",
"import ipytest\n",
"\n",
"import os\n",
"import sys\n",
"module_path = os.path.abspath('..')\n",
"if module_path not in sys.path:\n",
" sys.path.append(module_path)\n",
"\n",
"import ipytest\n",
"ipytest.autoconfig()"
]
},
Expand Down
13 changes: 11 additions & 2 deletions PortfolioManager/1-Positions/position_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,20 @@
"metadata": {},
"outputs": [],
"source": [
"#Run this cell before running the your testing cell. This will setup the ipytest cell magic command. If you're running this notebook locally you may need to install ipytest from pip or conda\n",
"#Run this cell before running the your testing cell. This will:\n",
"# 1. adjust the system path to locate your solution;\n",
"# 2. setup the ipytest cell magic command.\n",
"#If you're running this notebook locally you may need to install ipytest from pip or conda\n",
"#%conda install ipytest\n",
"#%pip install ipytest\n",
"import ipytest\n",
"\n",
"import os\n",
"import sys\n",
"module_path = os.path.abspath('..')\n",
"if module_path not in sys.path:\n",
" sys.path.append(module_path)\n",
"\n",
"import ipytest\n",
"ipytest.autoconfig()"
]
},
Expand Down
12 changes: 11 additions & 1 deletion PortfolioManager/2-Account/account_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,20 @@
"metadata": {},
"outputs": [],
"source": [
"#Run this cell before running the your testing cell. This will:\n",
"# 1. adjust the system path to locate your solution;\n",
"# 2. setup the ipytest cell magic command.\n",
"#If you're running this notebook locally you may need to install ipytest from pip or conda\n",
"#%conda install ipytest\n",
"#%pip install ipytest\n",
"import ipytest\n",
"\n",
"import os\n",
"import sys\n",
"module_path = os.path.abspath('..')\n",
"if module_path not in sys.path:\n",
" sys.path.append(module_path)\n",
"\n",
"import ipytest\n",
"ipytest.autoconfig()"
]
},
Expand Down
12 changes: 11 additions & 1 deletion PortfolioManager/3-Portfolio/portfolio_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,20 @@
"metadata": {},
"outputs": [],
"source": [
"#Run this cell before running the your testing cell. This will:\n",
"# 1. adjust the system path to locate your solution;\n",
"# 2. setup the ipytest cell magic command.\n",
"#If you're running this notebook locally you may need to install ipytest from pip or conda\n",
"#%conda install ipytest\n",
"#%pip install ipytest\n",
"import ipytest\n",
"\n",
"import os\n",
"import sys\n",
"module_path = os.path.abspath('..')\n",
"if module_path not in sys.path:\n",
" sys.path.append(module_path)\n",
"\n",
"import ipytest\n",
"ipytest.autoconfig()"
]
},
Expand Down
12 changes: 11 additions & 1 deletion PortfolioManager/4-MarketValue/market_value_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,20 @@
"metadata": {},
"outputs": [],
"source": [
"#Run this cell before running the your testing cell. This will:\n",
"# 1. adjust the system path to locate your solution;\n",
"# 2. setup the ipytest cell magic command.\n",
"#If you're running this notebook locally you may need to install ipytest from pip or conda\n",
"#%conda install ipytest\n",
"#%pip install ipytest\n",
"import ipytest\n",
"\n",
"import os\n",
"import sys\n",
"module_path = os.path.abspath('..')\n",
"if module_path not in sys.path:\n",
" sys.path.append(module_path)\n",
"\n",
"import ipytest\n",
"ipytest.autoconfig()"
]
},
Expand Down