-
Notifications
You must be signed in to change notification settings - Fork 7
Installation
Stefan Piatek edited this page Aug 29, 2019
·
26 revisions
This guide is for a completely fresh set up of everything required to start working with the TLO project. Whilst we currently only have mac setup, windows and linux steps will be similar.
- Navigate to https://account.jetbrains.com/login and create an account or sign up, making sure to click the verify email link
- Once logged in, navigate to https://www.jetbrains.com/student/ to get a staff/student license,
scrolling down the page to the
Apply Now
button. Most likely using your university email and a picture of your university ID card. The process should take a couple of days. In the meantime you can use an evaluation version of pycharm
- Navigate to https://www.anaconda.com/distribution/#download-section and click on the
Download
button underneath the Python 3.x version. - Run the installer, clicking continue and accept as required, using the default settings
- Navigate to https://www.jetbrains.com/pycharm/download/
- Click the
Download
button underneath the Professional version - Open the image and drag PyCharm into your Applications Folder
- Open PyCharm.app from your Applications folder, accepting the user agreement and clicking
Skip Remaining and Set Defaults
- A License Activation window will open, if you already have a license then enter in your login details
that you created your IntelliJ/PyCharm account with, otherwise click
evaluate for free
(You can activate Pycharm later by going to the Menu barHelp
>Register
)
- From the PyCharm welcome page, click
Check out from Versino control
and selectgit
- Select
Log in to Github...
and enter in your GitHub login information - The TLOmodel repository should now be available from the dropdown
URL
input, select it and then click on theclone
button - Click Yes on the dialogue box asking if you want to open the TLOmodel directory
- Click the Menu bar
PyCharm
>Preferences...
- In the dialogue box navigate to
Project: TLOmodel
>Project Interpreter
- Click on the settings cog on the right and select
Add...
- Select
Conda environment
from the left hand panel, and set the Python Version to3.6
, then clickOK
. - Click
OK
to close any windows until you are left with the main PyCharm window. - Now click on the
Terminal
button at the bottom of the Pycharm window and typepip install -r requirements/dev.txt
- Hit the enter key and the Terminal pane should fill with a lot of text. After a minute or so it should stop making output and look something like this
- Now go back to the Menu bar
PyCharm
>Preferences...
and navigate toTools
>Python Integrated Tools
- Change the
Default test runner
topytest
and clickOK
to close the Preferences window - At the top of your PyCharm window, click on
Add Configuration...
- Click the plus icon to the top left of the Configuration window and select
Python tests
>pytest
- A new configuration will appear
- Set the Target input by clicking on the folder icon, and select
TLOmodel
>tests
, click theOpen
button - The configuration window should now look something like this, click
OK
- At the top of the screen, there will now be a configuration, you can click on the green arrow to run the tests
- A new run pane will open up and pytest will run for a fair while, after it completes it will say that all of the tests have passed
- You can scroll down the window and the final lines should look something like this
-
You can skip this section if you've set up your details in git
-
Click on the
Terminal
button as before and enter in the following commands, replacing your Name and Email but keeping the quotes. Hit enter after each linegit config --global user.name "Stefan Piatek" git config --global user.email "s.piatek@ucl.ac.uk"
TLO Model Wiki