-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into feature-#377-alternative-routes
- Loading branch information
Showing
18 changed files
with
230 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Contribution Guidelines | ||
|
||
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 --> | ||
|
||
- [Contribution Guidelines](#contribution-guidelines) | ||
- [Issues](#issues) | ||
- [Technical issues](#technical-issues) | ||
- [Routing issues](#routing-issues) | ||
- [Feature requests](#feature-requests) | ||
- [Pull Requests](#pull-requests) | ||
- [Pull request guidelines](#pull-request-guidelines) | ||
- [Contributing code](#contributing-code) | ||
|
||
<!-- /TOC --> | ||
|
||
**Firstly, thanks for using the ORS and contributing to making it better for everyone.** | ||
|
||
OpenRouteService has been around for over ten years, and as such it has seen many changes and adoption of new methodologies and techniques, as well as the coming and going of multiple developers. To try and keep the OpenRouteService codebase clean and stable, there are a few guidelines that we try to follow. | ||
|
||
## Issues | ||
|
||
We accept technical issues, routing issues and feature requests. Common questions should be asked at [ask.openrouteservice.org](https://ask.openrouteservice.org). | ||
|
||
Please search for issues before creating [a new one](https://github.com/GIScience/openrouteservice/issues/new). | ||
|
||
### Technical issues | ||
|
||
If you encounter a bug, please make sure to be as descriptive as possible, i.e.: | ||
|
||
- operating system (in case of self-hosting) | ||
- request URL (incl. parameters if POST) | ||
- expected outcome | ||
- actual outcome (e.g. JSON output) | ||
- fenced code around the bug, if known | ||
|
||
### Routing issues | ||
|
||
If you encounter weird or unexpected behavior during routing, please make sure to rule out expected behavior based on road attributes from e.g. [openstreetmap.org](https://openstreetmap.org/query), such as unexpected one-way streets or access restrictions. Find an overview of our tagging filters for all transportation profiles in our [wiki](https://github.com/GIScience/openrouteservice/wiki/Tag-Filtering). | ||
|
||
Information to include: | ||
|
||
- request URL (incl. parameters if POST) | ||
- expected outcome | ||
- actual outcome (e.g. JSON output) | ||
- screenshots where applicable (e.g. from our [maps](https://maps.openrouteservice.org)) | ||
|
||
### Feature requests | ||
|
||
Here you can be creative, but still descriptive. Make sure to describe the current behavior, your desired behavior and **to give actual use cases**. That makes it whole easier for us to prioritize. | ||
|
||
## Pull Requests | ||
|
||
We :heart: pull requests! We also aspire to make our commit history cleaner and more sustainable, benefiting our contributors and us maintainers. | ||
|
||
### Pull request guidelines | ||
|
||
We'd like all pull requests to adhere to the following rules: | ||
|
||
- a PR has to **close an issue**. If there is none yet for yours, please [create one](https://github.com/GIScience/openrouteservice/issues/new) | ||
- branch off [development](https://github.com/GIScience/openrouteservice/tree/development) | ||
- name your branch according to `<[hotfix/bugfix/feat/algo]>/<issue#>-<purpose>`, e.g. `[feat]/#381-simplify_geometry` | ||
- if you introduce new functions/classes, write unit or API tests | ||
- **limit the number of commits to a minimum**, i.e. use [`git commit --amend [--no-edit]`](https://www.atlassian.com/git/tutorials/rewriting-history#git-commit--amend) | ||
- use meaningful commit messages, e.g. `commit -m "[feat] include geometry_simplify in API and core code"` | ||
- if your branch needs an update from its base branch, use [`rebase`](https://blog.algolia.com/master-git-rebase/#rebasing-on-the-base-branch), e.g. | ||
|
||
``` | ||
git checkout my-new-feat | ||
git stash | ||
git rebase development | ||
git stash pop | ||
``` | ||
|
||
Be extra careful using `rebase` commands when collaborating on a branch with other people. | ||
|
||
**Don't merge** `development` branch into your feature branch. | ||
|
||
### Contributing code | ||
|
||
For a short explanation on how to setup, deploy and test **openrouteservice** locally for development, see our [wiki entry](https://github.com/GIScience/openrouteservice/wiki/Contributing-Code). | ||
|
||
Though there are no concrete rules for code that is contributed, we have a few general styles that should be adopted: | ||
|
||
- **Descriptive names** for variables, methods and classes | ||
- **Minimal in-line comments**: code should be self-explanatory. **Never** use comments to comment out blocks of code | ||
- **Use JDoc** docstrings to provide context for methods and classes | ||
- **Unit tests!!** | ||
- **API test** when adding API functionality in the corresponding [`openrouteservice-api-tests`](https://github.com/GIScience/openrouteservice/tree/master/openrouteservice-api-tests) subproject | ||
- Keep **methods modular**: rather short and singular functionality than 100s line of code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -408,4 +408,4 @@ | |
stdout: true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
openrouteservice/src/main/java/heigit/ors/exceptions/IncompatibleParametersException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* This file is part of Openrouteservice. | ||
* | ||
* Openrouteservice is free software; you can redistribute it and/or modify it under the terms of the | ||
* GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 | ||
* of the License, or (at your option) any later version. | ||
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Lesser General Public License for more details. | ||
* You should have received a copy of the GNU Lesser General Public License along with this library; | ||
* if not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package heigit.ors.exceptions; | ||
|
||
import heigit.ors.common.StatusCode; | ||
|
||
public class IncompatibleParametersException extends StatusCodeException | ||
{ | ||
private static final long serialVersionUID = 507243355121086541L; | ||
|
||
public IncompatibleParametersException(int errorCode, String param1, String param2) | ||
{ | ||
super(StatusCode.BAD_REQUEST, errorCode, "Parameter '" + param1 + "' is incompatible with parameter '" + param2 + "'."); | ||
} | ||
} | ||
|
Oops, something went wrong.