Merge remote-tracking branch 'origin/master'

This commit is contained in:
Guille Gutierrez 2020-06-09 11:33:08 -04:00
commit 4b7c536307
5 changed files with 252 additions and 2 deletions

129
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,129 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
guillermo.gutierrezmorote@concordia.ca.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

88
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,88 @@
# Contributing guidelines
## Push Request Checklist
Before sending your pull requests, make sure you followed this list.
- Read [contributing guidelines](CONTRIBUTING.md).
- Read [Code of Conduct](CODE_OF_CONDUCT.md).
- Check if my changes are consistent with the [guidelines](CONTRIBUTING.md#user-content-general-guidelines-and-philosophy-for-contribution).
- Changes are consistent with the [Coding Style](CONTRIBUTING.md#user-content-coding-style).
- Manually test your code and add [Unit Tests](CONTRIBUTING.md#user-content-testing-best-practices).
- [Document your work](CONTRIBUTING.md#user-content-documentation).
## How to become a contributor and submit your own code
### 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, 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.
### Contributing code
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)
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.
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.
### 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.
#### General guidelines and philosophy for contribution
* Include unit tests when you contribute new features, as they help to:
* Prove that your code works correctly.
* 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 broke the backward compatibility, please ensure that you:
* Clearly indicate which features are affected by your changes.
* Technical reasons for the changes.
* Tests should follow the
[testing best practices](CONTRIBUTING.md#user-content-testing-best-practices)
guide.
* [Document your contribution](CONTRIBUTING.md#user-content-documentation)
#### License
Include a small header with contact information and the code license at the top of any new file like in the following example.
"""
Name module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author name mail@concordia.ca
"""
#### Coding style
Changes to CERC Libs 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:
To install `pylint` and check a file
with `pylint` against Cerc custom style definition:
```bash
pip install pylint
pylint --rcfile=pylintrc myfile.py
```
#### Testing best practices
Before any pull request, the code must been manually and automatically tested to ensure at least some quality minimum. There are a few practices for unit tests that we believe are important, so we encourage you to follow it.
* The test should be self-contained, which implies that your tests will prepare and clean up everything before and after the test execution.
* We encourage you to create if possible functional tests that cover the complete workflow of the implemented functionality.
* Maximize your code coverage by ensuring that you are testing as much of your code as possible.
#### Documentation
In case of new functionality, a general overview, configuration, installation, and user manuals need to be provided by the developer; this will provide an excellent starting point for all the future users and help you detect any inconsistencies in your design.

View File

22
PYGUIDE.md Normal file
View File

@ -0,0 +1,22 @@
# Cerc Python Style Guide
## What's coding style and why it matters
Coding style is just how the code looks, it's incredibly personal, and everyone has their style.
Your preferred architectures, variable and function naming style all of then impacts in your code style and how the others read and understand it, so it could become a significant burden if everyone is coding on his own.
At CERC we are following the [PEP8](https://www.python.org/dev/peps/pep-0008/) with two spaces indentation instead of four.
## Tools.
We use [PyCharm](https://www.jetbrains.com/pycharm/) as an integrated development environment and follow the tool's overall advice but the space indentation, which we set to two spaces instead of default four spaces.
For code analysis, we enforce the usage of [pylint](https://www.pylint.org/) with our own [custom style definition](pylintrc)
## Naming convention
* Name your folders and files in lowercase.
* Your class names must start in capital letters and follow the python CapWords pattern.
* Methods and properties that return lists must end in "s".
* Constants names must be all capitals.
* Avoid the usage of "get_" and "set_" methods whenever possible, by using @property and @variable.setter decorators instead.

View File

@ -1,8 +1,19 @@
# libs # libs
Libs is a generic repository containing the following classes Libs is part of Insel4D architecture for the urban simulations, created by the CERC group at Concordia University.
Libs repository contains a set of classes modeling the data for urban environments in the form of:
* city_model_structure * city_model_structure
* geometry * geometry
* physics * physics
* usage * usages
Released under [LGPL license](LICENSE.md), will provide an object-oriented, modular approach to urban simulations.
Our aims are:
* involve as many scientists and contributors as possible
* provide a complete set of classes that help scientists and students to model urban environments.
Please check the [contributing information](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) if you want to contribute, and let us know any new feature you may be of interest for you or your team.