Small bug corrections + rename libs to hub
This commit is contained in:
parent
6414ceedaf
commit
9b5577c677
@ -6,7 +6,7 @@ Please, refer to the [cerclibs.pdf](https://liveconcordia.sharepoint.com/:b:/s/C
|
||||
to integrate your data model with the Central Data Model.
|
||||
|
||||
## Starting with the basics
|
||||
- Install all requirements and download the Libs project. [Here](WINDOWS_INSTALL.md) how to do it for windows.
|
||||
- Install all requirements and download the hub project. [Here](WINDOWS_INSTALL.md) how to do it for windows.
|
||||
In order to maintain a good quality code, we will work in branches. New codes will need to pass quality standards before being accepted in the main branch.
|
||||
- Check and follow our [coding style](PYGUIDE.md).
|
||||
- Don’t forget to create unit tests and ensure that the old ones pass normally after your changes.
|
||||
|
@ -16,7 +16,7 @@ Before sending your pull requests, make sure you completed this checklist:
|
||||
|
||||
### Contributor License Agreements
|
||||
|
||||
CERC Libs is an [LGPL licensed](LICENSE.md) software, so even if we'd love to accept your patches, before we can take them,
|
||||
CERC Hub is an [LGPL licensed](LICENSE.md) software, so even if we'd love to accept your patches, before we can take them,
|
||||
please be sure that you are the intellectual property owner of your code and that do you fully understand and respect our software license.
|
||||
|
||||
***NOTE***: Only source code that you own will go into the main repository.
|
||||
@ -29,17 +29,17 @@ To do so, first, commit your changes by clicking on the green check at the top-r
|
||||
Then, pull by clicking on the blue arrow to be sure that there are no conflicts between your version (local) and the one in gitlab (remote).
|
||||
Once the conflicts are solved and the merge in local is done, push the changes by clicking on the green arrow.
|
||||
|
||||
If you have improvements to CERC Libs or want to extend the functionality, please send us your pull request as seen at [git pull request documentation](https://git-scm.com/docs/git-request-pull).
|
||||
If you have improvements to CERC Hub or want to extend the functionality, please send us your pull request as seen at [git pull request documentation](https://git-scm.com/docs/git-request-pull).
|
||||
Or ASK GUILLE!!!!
|
||||
|
||||
Once the pull requests are approved and pass continuous integration checks, a team member will merge your changes on CERC Libs, and your code will become an integral part of Insel4D platform.
|
||||
Once the pull requests are approved and pass continuous integration checks, a team member will merge your changes on CERC Hub, and your code will become an integral part of Insel4D platform.
|
||||
|
||||
If you prefer to contribute, instead of adding new functionality, you can also take a look at our ticket system and try to fix any of the listed issues.
|
||||
??????????? SURE WE WANT THIS?
|
||||
|
||||
### Contribution guidelines and standards
|
||||
|
||||
Before sending your pull request for review, make sure your changes are consistent with the guidelines, and follow the CERC Libs coding style.
|
||||
Before sending your pull request for review, make sure your changes are consistent with the guidelines, and follow the CERC Hub coding style.
|
||||
|
||||
#### General guidelines and philosophy for contribution
|
||||
|
||||
@ -48,7 +48,7 @@ Before sending your pull request for review, make sure your changes are consiste
|
||||
* Guard against future breaking changes to lower the maintenance cost.
|
||||
|
||||
* Bug fixes also generally require unit tests, because the presence of bugs usually indicates insufficient test coverage.
|
||||
* Keep backward compatibility in mind when you change code in CERC Libs, and if you need to brake the backward compatibility, please ensure that you:
|
||||
* Keep backward compatibility in mind when you change code in CERC Hub, and if you need to brake the backward compatibility, please ensure that you:
|
||||
* Clearly indicate which features are affected by your changes.
|
||||
* Technical reasons for the changes.
|
||||
??????????? SURE WE WANT THIS?
|
||||
@ -73,7 +73,7 @@ Include a small header with contact information and the code license at the top
|
||||
|
||||
#### Coding style
|
||||
|
||||
Changes to CERC Libs python code should conform to our coding style [Cerc Python Style Guide](PYGUIDE.md)
|
||||
Changes to CERC Hub python code should conform to our coding style [Cerc Python Style Guide](PYGUIDE.md)
|
||||
|
||||
As a general basis, all contributions need to be focused on the concept of code clarity and use pylint to check your Python changes.
|
||||
To install pylint and check your files against Cerc custom style definition:
|
||||
|
@ -21,7 +21,7 @@ You can find it also at VCS -> Get from Version Control...
|
||||
![pycharm get from version control](docs/img_windows_install/img_6.png)
|
||||
|
||||
|
||||
4. Select Git as the version control, and set the URL to [libs repository](https://rs-loy-gitlab.concordia.ca/Guille/libs.git) as shown in the picture.
|
||||
4. Select Git as the version control, and set the URL to [Hub repository](https://rs-loy-gitlab.concordia.ca/Guille/hub.git) as shown in the picture.
|
||||
At the website, copy the URL from Clone -> Clone with HTTPS.
|
||||
|
||||
![pycharm get from version control screen](docs/img_windows_install/img_1.png)
|
||||
@ -30,13 +30,13 @@ At the website, copy the URL from Clone -> Clone with HTTPS.
|
||||
You may need to install Git, by clicking at ***Download and install***.
|
||||
If that message does not appear is because you have it already installed in your computer.
|
||||
|
||||
5. Click Clone to download CERC libs source code. You will end with a project like this:
|
||||
5. Click Clone to download CERC hub source code. You will end with a project like this:
|
||||
|
||||
|
||||
![pycharm project screen](docs/img_windows_install/img_2.png)
|
||||
|
||||
6. To create your working branch you need rights to edit that project. Please, talk to Guillermo (guillermo.gutierrezmorote@concordia.ca)
|
||||
or Koa (kekoa.wells@concordia.ca) to get those rights. Once you have them, right-click on the project folder (libs) -> Git -> Repository -> Branches:
|
||||
or Koa (kekoa.wells@concordia.ca) to get those rights. Once you have them, right-click on the project folder (hub) -> Git -> Repository -> Branches:
|
||||
|
||||
![create new branch 1](docs/img_windows_install/img_9.png)
|
||||
|
||||
@ -75,13 +75,13 @@ Be sure that Initialize repository with a README is selected, and ideally, that
|
||||
|
||||
![git give a name](docs/img_windows_install/img_15.png)
|
||||
|
||||
And finally, clone it following the same steps as for ![libs](WINDOWS_INSTALL.md#get-the-code) (steps 3 to 5).
|
||||
And finally, clone it following the same steps as for ![hub](WINDOWS_INSTALL.md#get-the-code) (steps 3 to 5).
|
||||
|
||||
2. Go to project settings and add the libs project to your own, by clicking on Add Content Root:
|
||||
2. Go to project settings and add the hub project to your own, by clicking on Add Content Root:
|
||||
|
||||
![pycharm new project screen](docs/img_windows_install/img_4.png)
|
||||
|
||||
![pycharm add libs](docs/img_windows_install/img_7.png)
|
||||
![pycharm add hub](docs/img_windows_install/img_7.png)
|
||||
|
||||
3. Add your first file to your project and click on install requirements to automatically download all the dependencies (in blue at top-right corner).
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Libs
|
||||
# Hub
|
||||
|
||||
Libs is part of Insel4D architecture for urban simulations, created by the CERC group at Concordia University.
|
||||
Hub is part of Insel4D architecture for urban simulations, created by the CERC group at Concordia University.
|
||||
|
||||
Libs repository contains:
|
||||
Hub repository contains:
|
||||
* city_model_structure: a central data model specifically design to model urban environments. An instance of this is called City.
|
||||
* catalog_factories: a set of classes to describe catalog structures used by the import and export factories.
|
||||
* imports: factories to import data from different formats to feed the city model structure (and create a City) or the catalog structures depending on the purpose.
|
||||
|
@ -20,7 +20,7 @@ You can find it also at VCS -> Get from Version Control...
|
||||
![pycharm get from version control](docs/img_windows_install/img_6.png)
|
||||
|
||||
|
||||
4. Select Git as the version control, and set the URL to [libs repository](https://rs-loy-gitlab.concordia.ca/Guille/libs.git) as shown in the picture.
|
||||
4. Select Git as the version control, and set the URL to [hub repository](https://rs-loy-gitlab.concordia.ca/Guille/hub.git) as shown in the picture.
|
||||
At the website, copy the URL from Clone -> Clone with HTTPS.
|
||||
|
||||
![pycharm get from version control screen](docs/img_windows_install/img_1.png)
|
||||
@ -29,13 +29,13 @@ At the website, copy the URL from Clone -> Clone with HTTPS.
|
||||
You may need to install Git, by clicking at ***Download and install***.
|
||||
If that message does not appear is because you have it already installed in your computer.
|
||||
|
||||
5. Click Clone to download CERC libs source code. You will end with a project like this:
|
||||
5. Click Clone to download CERC hub source code. You will end with a project like this:
|
||||
|
||||
|
||||
![pycharm project screen](docs/img_windows_install/img_2.png)
|
||||
|
||||
6. To create your working branch you need rights to edit that project. Please, talk to Guillermo (guillermo.gutierrezmorote@concordia.ca)
|
||||
or Koa (kekoa.wells@concordia.ca) to get those rights. Once you have them, right-click on the project folder (libs) -> Git -> Repository -> Branches:
|
||||
or Koa (kekoa.wells@concordia.ca) to get those rights. Once you have them, right-click on the project folder (hub) -> Git -> Repository -> Branches:
|
||||
|
||||
![create new branch 1](docs/img_windows_install/img_9.png)
|
||||
|
||||
@ -74,13 +74,13 @@ Be sure that Initialize repository with a README is selected, and ideally, that
|
||||
|
||||
![git give a name](docs/img_windows_install/img_15.png)
|
||||
|
||||
And finally, clone it following the same steps as for ![libs](WINDOWS_INSTALL.md#get-the-code) (steps 3 to 5).
|
||||
And finally, clone it following the same steps as for ![hub](WINDOWS_INSTALL.md#get-the-code) (steps 3 to 5).
|
||||
|
||||
2. Go to project settings and add the libs project to your own, by clicking on Add Content Root:
|
||||
2. Go to project settings and add the hub project to your own, by clicking on Add Content Root:
|
||||
|
||||
![pycharm new project screen](docs/img_windows_install/img_4.png)
|
||||
|
||||
![pycharm add libs](docs/img_windows_install/img_7.png)
|
||||
![pycharm add hub](docs/img_windows_install/img_7.png)
|
||||
|
||||
3. Add your first file to your project and click on install requirements to automatically download all the dependencies (in blue at top-right corner).
|
||||
|
||||
|
@ -326,8 +326,15 @@ class Building(CityObject):
|
||||
|
||||
@property
|
||||
def human_readable_name(self):
|
||||
"""
|
||||
Get the human readable name for the building
|
||||
:return: str
|
||||
"""
|
||||
return self._human_readable_name
|
||||
|
||||
@human_readable_name.setter
|
||||
def human_readable_name(self, value):
|
||||
self._human_readable_name = value
|
||||
"""
|
||||
Set the human readable name for the building
|
||||
"""
|
||||
self._human_readable_name = value
|
||||
|
@ -296,7 +296,7 @@ class GeometryHelper:
|
||||
@staticmethod
|
||||
def gml_surface_to_libs(surface):
|
||||
"""
|
||||
Transform citygml surface names into libs names
|
||||
Transform citygml surface names into hub names
|
||||
"""
|
||||
if surface == 'WallSurface':
|
||||
return 'Wall'
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Functions and usages internally recognized within the libs
|
||||
# Functions and usages internally recognized within the hub
|
||||
|
||||
The libs uses a list of building functions a building usages that are the only ones recognized. All new categories should be added to the dicctionaries that translate from the input formats to the libs functions. From the libs functions to the libs usages and from the libs usages and libs functions to the output formats.
|
||||
The hub uses a list of building functions a building usages that are the only ones recognized. All new categories should be added to the dictionaries that translate from the input formats to the libs functions. From the libs functions to the libs usages and from the libs usages and libs functions to the output formats.
|
||||
|
||||
Input formats accepted:
|
||||
* Function:
|
||||
|
@ -1,18 +1,18 @@
|
||||
xmltodict~=0.12.0
|
||||
numpy~=1.20.1
|
||||
trimesh~=3.9.9
|
||||
pyproj~=3.0.1
|
||||
pandas~=1.2.3
|
||||
requests~=2.25.1
|
||||
esoreader~=1.2.3
|
||||
geomeppy~=0.11.8
|
||||
PyWavefront~=1.3.3
|
||||
xlrd~=2.0.1
|
||||
openpyxl~=3.0.7
|
||||
networkx~=2.5.1
|
||||
parseidf~=1.0.0
|
||||
ply~=3.11
|
||||
rhino3dm~=7.7.0
|
||||
scipy==1.7.1
|
||||
PyYAML==6.0
|
||||
pyecore~=0.12.2
|
||||
xmltodict
|
||||
numpy
|
||||
trimesh
|
||||
pyproj
|
||||
pandas
|
||||
requests
|
||||
esoreader
|
||||
geomeppy
|
||||
PyWavefront
|
||||
xlrd
|
||||
openpyxl
|
||||
networkx
|
||||
parseidf==1.0.0
|
||||
ply
|
||||
rhino3dm==7.7.0
|
||||
scipy
|
||||
PyYAML
|
||||
pyecore==0.12.2
|
@ -155,11 +155,8 @@ class TestGeometryFactory(TestCase):
|
||||
:return: None
|
||||
"""
|
||||
file_1 = 'one_building_in_kelowna.gml'
|
||||
print('file 1')
|
||||
self._test_hft(file_1)
|
||||
file_2 = 'pluto_building.gml'
|
||||
print('file 2')
|
||||
self._test_pluto(file_2)
|
||||
file_3 = 'C40_Final.gml'
|
||||
print('file 3')
|
||||
self._test_hft(file_3)
|
||||
|
BIN
unittests/tests_data/dompark.3dm
Normal file
BIN
unittests/tests_data/dompark.3dm
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user