Update Windows documentation for new version of PyCharm and gitea
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
This is an installation guide for Windows, covering all the steps needed to begin developing code for the Urban
|
This is an installation guide for Windows, covering all the steps needed to begin developing code for the Urban
|
||||||
Simulation Platform 'Hub'. At the end of this process you will have installed and configured all the necessary applications,
|
Simulation Platform 'Hub'. At the end of this process you will have installed and configured all the necessary applications,
|
||||||
set up your own project on CERC's Gitlab and created your first python file.
|
set up your own project on CERC's Gitea and created your first python file.
|
||||||
|
|
||||||
## Prepare your environment
|
## Prepare your environment
|
||||||
g
|
|
||||||
To develop any new code for the Urban Simulation Platform you must have the right software applications installed and configured.
|
To develop any new code for the Urban Simulation Platform you must have the right software applications installed and configured.
|
||||||
The Platform is written in python and so the applications you need are:
|
The Platform is written in python and so the applications you need are:
|
||||||
* Miniconda
|
* Miniconda
|
||||||
|
* SRA Files
|
||||||
* Python Editor
|
* Python Editor
|
||||||
|
|
||||||
You also need to register a user account with the CERC's code repository on Gitlab and have the necessary permissions for
|
You also need to register a user account with the CERC's code repository on Gitea and have the necessary permissions for
|
||||||
creating new code. For that purpose, please, contact Guillermo (guillermo.gutierrezmorote@concordia.ca) or
|
creating new code. For that purpose, please, contact Guillermo (guillermo.gutierrezmorote@concordia.ca) or
|
||||||
Koa (kekoa.wells@concordia.ca) as soon as possible.
|
Koa (kekoa.wells@concordia.ca) as soon as possible.
|
||||||
|
|
||||||
|
@ -47,6 +47,21 @@ _The term '...' is not recognized as the name of a cmdlet, function,..._
|
||||||
|
|
||||||
To solve it, type 'Set-ExecutionPolicy Unrestricted' as shown in the image.
|
To solve it, type 'Set-ExecutionPolicy Unrestricted' as shown in the image.
|
||||||
|
|
||||||
|
### Setup SRA
|
||||||
|
|
||||||
|
1. Get the SRA executable and dll files from Guille or Koa
|
||||||
|
2. Create a folder in "C:\Program Files\" called "sra"
|
||||||
|
|
||||||
|
![create_sra](docs/img_windows_install/img_34.png)
|
||||||
|
|
||||||
|
3. Copy shortwave_integer.exe and pthreadGC2.dll into the sra folder.
|
||||||
|
|
||||||
|
![create_sra](docs/img_windows_install/img_35.png)
|
||||||
|
|
||||||
|
4. Add the newly created sra folder to the Path, similar to step 2 from the Miniconda setup above.
|
||||||
|
|
||||||
|
![create_sra](docs/img_windows_install/img_36.png)
|
||||||
|
|
||||||
### Get a Python editor
|
### Get a Python editor
|
||||||
|
|
||||||
1. You will need a python editor in order to import the existing Hub source code and to write your own python code.
|
1. You will need a python editor in order to import the existing Hub source code and to write your own python code.
|
||||||
|
@ -55,7 +70,7 @@ an excellent open-source python editor.
|
||||||
2. Run the installer, and follow the installation instructions for PyCharm, you may change a few options,
|
2. Run the installer, and follow the installation instructions for PyCharm, you may change a few options,
|
||||||
but the default ones should be fine.
|
but the default ones should be fine.
|
||||||
|
|
||||||
**NOTE:** If Pycharm asks you to create a Virtual Environment, click **Cancel**. You will do it later using Conda instead.
|
**NOTE:** If PyCharm asks you to create a Virtual Environment, click **Cancel**. You will do it later using Conda instead.
|
||||||
|
|
||||||
![creating_virtual_environment](docs/img_windows_install/img_31.png)
|
![creating_virtual_environment](docs/img_windows_install/img_31.png)
|
||||||
|
|
||||||
|
@ -70,14 +85,12 @@ You can find it also at **Git->Clone...**
|
||||||
|
|
||||||
![pycharm get from version control](docs/img_windows_install/img_6.png)
|
![pycharm get from version control](docs/img_windows_install/img_6.png)
|
||||||
|
|
||||||
3. Select **Git** as the **Version control**. For the URL use the link to the Hub repository, as seen below.
|
3. Select **Git** as the **Version control**. Open the [hub repository](https://nextgenerations-cities.encs.concordia.ca/gitea/CERC/hub)
|
||||||
|
on Gitea and copy the URL from your browser to use as the URL inside PyCharm.
|
||||||
|
|
||||||
![pycharm get from version control screen](docs/img_windows_install/img_1.png)
|
![pycharm get from version control screen](docs/img_windows_install/img_1.png)
|
||||||
|
|
||||||
(You can also copy this URL by going to the Hub repository in [Gitlab](https://rs-loy-gitlab.concordia.ca/Guille/hub.git)
|
![gitea get https](docs/img_windows_install/img_39.png)
|
||||||
and clicking on the **Copy URL** button, next to **Clone with HTTPS**)
|
|
||||||
|
|
||||||
![gitlab get https](docs/img_windows_install/img_17.png)
|
|
||||||
|
|
||||||
The Directory to store the Hub source code locally is automatically created for you. Edit this if you prefer it to be stored somewhere else.
|
The Directory to store the Hub source code locally is automatically created for you. Edit this if you prefer it to be stored somewhere else.
|
||||||
|
|
||||||
|
@ -152,7 +165,7 @@ _lca_classes_,... And, click on the **Create** button.
|
||||||
3. Click on the **Git** button in the bottom-left corner to pop-up the window showing the Git information.
|
3. Click on the **Git** button in the bottom-left corner to pop-up the window showing the Git information.
|
||||||
See your new branch has been created under _Local_.
|
See your new branch has been created under _Local_.
|
||||||
|
|
||||||
4. Now we need to let the CERC Gitlab repository know about this new branch. You do this by right-clicking on
|
4. Now we need to let the CERC Gitea repository know about this new branch. You do this by right-clicking on
|
||||||
your branch and selecting **Push...** from the drop-down menu.
|
your branch and selecting **Push...** from the drop-down menu.
|
||||||
|
|
||||||
5. Then click on the **Push** button at the bottom-right of the **Push Commits** window.
|
5. Then click on the **Push** button at the bottom-right of the **Push Commits** window.
|
||||||
|
@ -180,33 +193,35 @@ See the picture below.
|
||||||
|
|
||||||
![pycharm configuration screen](docs/img_windows_install/img_5.png)
|
![pycharm configuration screen](docs/img_windows_install/img_5.png)
|
||||||
|
|
||||||
## Set up a new project on Gitlab
|
## Set up a new project on Gitea
|
||||||
|
You will need an account before you can access the Gitea. Please contact Guillermo (guillermo.gutierrezmorote@concordia.ca) or
|
||||||
|
Koa (kekoa.wells@concordia.ca) to request an account.
|
||||||
|
|
||||||
1. Open a browser and to the [CERC Git](https://rs-loy-gitlab.concordia.ca/). Click on the blue **New project** button.
|
1. Open a browser and go to the [CERC Gitea](https://nextgenerations-cities.encs.concordia.ca/). Click on the **+** in the top right
|
||||||
|
and select "New Repository" or press the **+** below the Organization tab.
|
||||||
|
|
||||||
![git new project screen](docs/img_windows_install/img_14.png)
|
![git new project screen](docs/img_windows_install/img_37.png)
|
||||||
|
|
||||||
2. Choose the **Create blank project** option from the three options seen below.
|
2. Choose the **Create blank project** option from the three options seen below.
|
||||||
|
|
||||||
3. Type in a name that describes your project: _hp_workflow_, _bus_system_optimization_...
|
3. Type in a name that describes your project: _hp_workflow_, _bus_system_optimization_...
|
||||||
(remember to follow the CERC naming conventions described in the [Coding Style](PYGUIDE.md)).
|
(remember to follow the CERC naming conventions described in the [Coding Style](PYGUIDE.md)).
|
||||||
Check the option **Initialize repository with a README**, and ideally, check the **Visibility Level** to be **Public**.
|
Ideally, uncheck the option **Make Repository Private**, and check the **Initialize Repository**
|
||||||
Then click on the **Create project** button.
|
Then click on the **Create project** button.
|
||||||
|
|
||||||
![git give a name](docs/img_windows_install/img_15.png)
|
![git give a name](docs/img_windows_install/img_38.png)
|
||||||
|
|
||||||
You should then see a confirmation screen with all the information about your new project.
|
You should then see a confirmation screen with all the information about your new project.
|
||||||
|
|
||||||
## Get your project into Pycharm
|
## Get your project into Pycharm
|
||||||
|
|
||||||
1. Now you can make a clone of this project, within PyCharm. First, copy the URL by clicking on the blue **Clone** button
|
1. Now you can make a clone of this project, within PyCharm. First, go to the page of your repository on the Gitea and copy the URL.
|
||||||
and then click on the **Copy URL** button, next to the **Clone with HTTPS** link.
|
|
||||||
|
|
||||||
2. Switch back to PyCharm and close the Hub project by choosing **File->Close Project**. You will then see the
|
2. Switch back to PyCharm and close the Hub project by choosing **File->Close Project**. You will then see the
|
||||||
**Welcome To PyCharm** window again.
|
**Welcome To PyCharm** window again.
|
||||||
|
|
||||||
3. Clone a copy of your Project into PyCharm, following the steps 2-6 of the _GET THE CERC HUB SOURCE CODE_
|
3. Clone a copy of your Project into PyCharm, following the steps 2-6 of the _GET THE CERC HUB SOURCE CODE_
|
||||||
section above, but using the URL link that you just copied for your gitlab project.
|
section above, but using the URL link that you just copied for your Gitea project.
|
||||||
|
|
||||||
4. Select **File->Settings** to open the **Settings** window. From the panel on the left click on
|
4. Select **File->Settings** to open the **Settings** window. From the panel on the left click on
|
||||||
**Project:<project name> -> Project Structure**.
|
**Project:<project name> -> Project Structure**.
|
||||||
|
@ -242,5 +257,5 @@ city = GeometryFactory('citygml', path='myfile.gml').city
|
||||||
|
|
||||||
9. Always remember to push your own project changes as the last thing you do before ending your working day!
|
9. Always remember to push your own project changes as the last thing you do before ending your working day!
|
||||||
First, commit your changes by clicking on the green check in the top-right corner of Pycharm. Add a comment that explains briefly your changes.
|
First, commit your changes by clicking on the green check in the top-right corner of Pycharm. Add a comment that explains briefly your changes.
|
||||||
Then, pull by clicking on the blue arrow to be sure that there are no conflicts between your version (local) and the remote one (gitlab).
|
Then, pull by clicking on the blue arrow to be sure that there are no conflicts between your version (local) and the remote one (Gitea).
|
||||||
Once the conflicts are solved and the merge in local is done, push the changes by clicking on the green arrow.
|
Once the conflicts are solved and the merge in local is done, push the changes by clicking on the green arrow.
|
||||||
|
|
BIN
hub/docs/img_macos_install/img_macos_install/img_0.png
Normal file
After Width: | Height: | Size: 551 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_1.png
Normal file
After Width: | Height: | Size: 422 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_10.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_11.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_12.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_13.png
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_14.png
Normal file
After Width: | Height: | Size: 224 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_15.png
Normal file
After Width: | Height: | Size: 219 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_16.png
Normal file
After Width: | Height: | Size: 489 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_17.png
Normal file
After Width: | Height: | Size: 695 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_18.png
Normal file
After Width: | Height: | Size: 281 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_19.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_2.png
Normal file
After Width: | Height: | Size: 927 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_3.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_4.png
Normal file
After Width: | Height: | Size: 966 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_5.png
Normal file
After Width: | Height: | Size: 821 KiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_6.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_7.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_8.png
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
hub/docs/img_macos_install/img_macos_install/img_9.png
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_0.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_1.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_10.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_11.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_12.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_13.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_14.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_15.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_16.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_17.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_2.png
Normal file
After Width: | Height: | Size: 207 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_20.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_21.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_22.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_23.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_24.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_25.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_26.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_27.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_28.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_29.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_3.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_30.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_31.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_32.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_33.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_34.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_35.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_36.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_37.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_38.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_39.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_4.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_40.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_5.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_6.png
Normal file
After Width: | Height: | Size: 219 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_7.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_8.png
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
hub/docs/img_macos_install/img_windows_install/img_9.png
Normal file
After Width: | Height: | Size: 310 KiB |