diff --git a/.gitignore b/.gitignore index 9574a297..ed8f50f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vscode *.pyc +.ipynb_checkpoints diff --git a/Installation.md b/Installation.md index ac99e56c..288ba815 100644 --- a/Installation.md +++ b/Installation.md @@ -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 - ``` + ``` + git clone + ``` - 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 :/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 :/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!! \ No newline at end of file +Thank you!! diff --git a/PortfolioManager/0-Securities/securities_notebook.ipynb b/PortfolioManager/0-Securities/securities_notebook.ipynb index 09decdc2..52512b5b 100644 --- a/PortfolioManager/0-Securities/securities_notebook.ipynb +++ b/PortfolioManager/0-Securities/securities_notebook.ipynb @@ -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()" ] }, diff --git a/PortfolioManager/1-Positions/position_notebook.ipynb b/PortfolioManager/1-Positions/position_notebook.ipynb index 1a990de5..76e884c7 100644 --- a/PortfolioManager/1-Positions/position_notebook.ipynb +++ b/PortfolioManager/1-Positions/position_notebook.ipynb @@ -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()" ] }, diff --git a/PortfolioManager/2-Account/account_notebook.ipynb b/PortfolioManager/2-Account/account_notebook.ipynb index 4fa2ed4d..e66ba39e 100644 --- a/PortfolioManager/2-Account/account_notebook.ipynb +++ b/PortfolioManager/2-Account/account_notebook.ipynb @@ -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()" ] }, diff --git a/PortfolioManager/3-Portfolio/portfolio_notebook.ipynb b/PortfolioManager/3-Portfolio/portfolio_notebook.ipynb index 418c86f2..4d800186 100644 --- a/PortfolioManager/3-Portfolio/portfolio_notebook.ipynb +++ b/PortfolioManager/3-Portfolio/portfolio_notebook.ipynb @@ -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()" ] }, diff --git a/PortfolioManager/4-MarketValue/market_value_notebook.ipynb b/PortfolioManager/4-MarketValue/market_value_notebook.ipynb index ff8422ea..f1bf0db3 100644 --- a/PortfolioManager/4-MarketValue/market_value_notebook.ipynb +++ b/PortfolioManager/4-MarketValue/market_value_notebook.ipynb @@ -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()" ] },