forked from s_ranjbar/city_retrofit
125d3d4dd7
Add pep8 information
1.9 KiB
1.9 KiB
Get the code.
- First thing you will need is an editor for your source code, that's a personal choice, but we would like to recomend PyCharm community edition, a wonderful open source python editor
-
Run the installer, and follow the instalation instructions for PyCharm, you may change a few options, but the default ones, should be fine.
-
Open pycharm and click on "Get from Version Control".
- Select Git as the version control and set the url to libs repository as shown in the picture.
You may need to install git, by clicking at Download and install
- Click Clone to download CERC libs source code.
you will end with a project like this.
Configure PyCharm.
We use 2 spaces as a tab instead standard pep8 4 spaces indentation.
this option could be configured in PyCharm at the settings screen as shown in the picture.
Start your own project.
- Click on file new project like in the image
- Go to project settings and add the libs project to your own as shown in the picture
-
Add your first file to your project and click in install requirements to automatically download all the dependencies
-
When all the dependencies are satistied, we are good to go to start importing our first model.
by adding the following code to our main.py
from geometry.geometry_factory import GeometryFactory
city = GeometryFactory('citygml', 'myfile.gml').city