{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "\n", "\"Open\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Initializing course environment\n", "\n", "There are multiple ways to set up a python environment for the course and to complete and submit exercises. The recommended alternatives are intended to make sure that all the necessary packages get installed and to minimize the probability that environment related issues arise while doing course work.\n", "\n", "You are free to set up your course environment any way you like but support will only be provided for recommended setups." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1 Install Python and the needed external packages\n", "\n", "### (alternative a) Install full anaconda distribution\n", "\n", "* This is the recommended alternative\n", "* Will take about 3.3 gigabytes of disk space\n", "* Download the anaconda installer for your OS (64bits, Python 3) from https://www.anaconda.com/download\n", "* Install Anaconda\n", " * **Linux:** On command line run `bash nameofthedownloadedfile`\n", " * **Windows/MacOS:** Execute the installer you downloaded\n", "* Follow the instructions of the installer\n", "* Takes about 3 minutes\n", "* Verify that your installation is complete by downloading the script [versions.py](https://raw.githubusercontent.com/saskeli/data-analysis-with-python-summer-2019/master/versions.py) and run it with `python versions.py`.\n", " * **Windows:** use the Anaconda Prompt.\n", " * **Linux/MacOS**: use Terminal.\n", " * See [Anaconda user guide](https://docs.anaconda.com/anaconda/user-guide/getting-started/#write-a-python-program-using-anaconda-prompt-or-terminal) for details, if needed\n", "\n", "### (alternative b) Install miniconda and Python packages\n", "* This alternative is not recommended\n", "* Will take about 2.3 gigabytes of disk space\n", "* Download miniconda installer (64bits, Python 3) from https://conda.io/miniconda.html\n", "* Run the installer\n", " * **Linux:** On the command line run `bash nameofthedownloadedfile`\n", " * **Windows/MacOS:** Execute the downloaded installler\n", "* Activate the miniconda environment\n", " * **Linux and MacOS:** `source /miniconda/install/location/bin/activate`\n", " * **Windows:** Start the anaconda command prompts\n", "* Download the [requirements.txt](https://raw.githubusercontent.com/saskeli/data-analysis-with-python-summer-2019/master/requirements.txt) file\n", "* Install the required packages with `conda install --yes --file requirements.txt`\n", " This may take awhile. (About 1 min 30 s on fast network)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2 Log in to the course\n", "\n", "* Go to the [exercise page](https://tmc.mooc.fi/org/hy/courses/645) of the course\n", "* If you don't already have an account on this server, press the signup button\n", "* Use your student number as the organizational id, if you want to get credits from this course.\n", " Note for old-timers: it is not enough, that you have your student number as your user name in TMC, \n", " in fact, that is not even recommended anymore.\n", "* Choose organization Helsingin yliopisto\n", "* Choose course Data Analysis with Python 2020" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3 Install TMC client\n", "\n", "### Suggested approach (With anaconda navigator installed)\n", "\n", "The [TMC extension for VS Code](https://github.com/rage/tmc-vscode) is new and may contain bugs. That said, it does seem to work well and is significantly more approachable than the TMC CLI. Below is a very short point-to-point guide for the setup.\n", "\n", "* To install VS Code, follow the instructions at [https://www.mooc.fi/en/installation/vscode](https://www.mooc.fi/en/installation/vscode): \n", " * Go through the parts *Installing Visual Studio Code* and *Installing Java*. \n", " * Here you can skip the part Installing Python (that was taken care of by installing Anaconda)\n", "* Launch `VS Code` from the home tab on Anaconda Navigator\n", "* Follow the instructions for the part *Installing TestMyCode extension for VSCode* at [https://www.mooc.fi/en/installation/vscode](https://www.mooc.fi/en/installation/vscode)\n", "* You will see a new `TMC` tab in the left section of VS Code.\n", "* To start programming and to download excercises, continue with the instructions at [https://www.mooc.fi/en/installation/vscode](https://www.mooc.fi/en/installation/vscode) (the part *Starting programming*) using \n", " * Organization: Helsingin yliopisto\n", " * Course: Data Analysis with Python 2020\n", "* The instruction page also contains examples of how to test and submit your solutions to assignments from the introuction to programming course. You can follow these while substituting exercise names/numbers and code for the Data analysis with python exercises.\n", "\n", "### Alternative approach (TMC CLI)\n", "\n", "* TMC requires a fairly modern java 8 or later to work properly.\n", " * open jdk 1.8.0_212 for example works\n", " * as do all 11.x and 12.x versions i've seen.\n", " * you can try to install and run tmc and update your java install if logging in with the cli fails.\n", "* Follow the instructions on the following page to install TMC client \n", " https://github.com/testmycode/tmc-cli\n", "* For this approach especially, you need to know the basics of command line use in the terminal/command prompt\n", "* Go to a folder where you want to download the exercises, and issue command `tmc login`\n", "* If it asks for a server address, then your TMC client is outdated. Re-install the client.\n", "* Provide login details, and use organization slug `hy`\n", "* Then issue command `tmc download hy-data-analysis-with-python-2020` to download the exercises\n", "* Important commands:\n", " * `tmc` to show help message\n", " * `tmc test` to test your solution locally\n", " * `tmc submit` to submit your solution to the server for grading\n", "* The above github page of the tmc-client also contains instructions on the use of the client" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "\n", "\"Open\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.9" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }