-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* in process - early analysis of the work * linked the meta functions in readme * CONTRIBUTING.md * links to the sources * edited typos * documentation work * closes #77, closes #16 * proofread * improves pub.dev score, closes #79, #78, #75 * Added deleted model, complemented contributing.md Co-authored-by: Lukas Himsel <[email protected]>
- Loading branch information
1 parent
6d6d786
commit 2ecfc4f
Showing
15 changed files
with
396 additions
and
210 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Contributiung to Turf.dart | ||
|
||
Welcome and thank you for deciding to contribute to the project! | ||
|
||
Here is how cooperation works perfectly at [Turf Dart](https://github.com/dartclub/turf_dart) | ||
#### Table of Contents | ||
- [Code of Conduct](#code-of-conduct) | ||
- [Get started](#get-started) | ||
- [Structure of modules](#structure-of-modules) | ||
- [Implementation Process](#implementation-process) | ||
- [Documentation](#documentation) | ||
- [GeoJSON object model](#GeoJSON-object-model) | ||
|
||
## Code of conduct | ||
By participating, you are expected to uphold international human rights and fundamental freedoms! | ||
To put it simply, be kind to each other. | ||
|
||
## Get started | ||
- Get the [Dart tools](https://dart.dev/tools) | ||
- Clone the repository: ```git clone [email protected]:dartclub/turf_dart.git``` | ||
- Navigate to project's folder in terminal & get its dependencies: ```dart pub get``` | ||
- Go through [Implementation Process](#implementation-process) | ||
- Import the library in your code and use it. For example: | ||
```dart | ||
import 'package:turf/helpers.dart'; | ||
import 'package:turf/src/line_segment.dart'; | ||
Feature<Polygon> poly = Feature<Polygon>( | ||
geometry: Polygon(coordinates: [ | ||
[ | ||
Position(0, 0), | ||
Position(2, 2), | ||
Position(0, 1), | ||
Position(0, 0), | ||
], | ||
[ | ||
Position(0, 0), | ||
Position(1, 1), | ||
Position(0, 1), | ||
Position(0, 0), | ||
], | ||
]), | ||
); | ||
var total = segmentReduce<int>(poly, (previousValue, | ||
currentSegment, | ||
initialValue, | ||
featureIndex, | ||
multiFeatureIndex, | ||
geometryIndex, | ||
segmentIndex) { | ||
if (previousValue != null) { | ||
previousValue++; | ||
} | ||
return previousValue; | ||
}, 0, combineNestedGeometries: false); | ||
// total.length == 6 | ||
``` | ||
## Structure of modules | ||
``` | ||
TURF_DART/lib/<MODULE NAME>.dart // public facing API, exports the implementation | ||
│ │ | ||
│ └───src/<MODULE NAME>.dart // the implementation | ||
│ | ||
└───benchmark/<MODULE NAME>_benchmark.dart | ||
│ | ||
└───test/components/<MODULE NAME>_test.dart // all the related tests | ||
``` | ||
## Implementation process | ||
- Check the Backlog/Issues for similar issues | ||
- Create a new branch _feature-_ from _main_ | ||
- Create a _draft Pull request_, mention in it the associated issues | ||
- **Implement** | ||
- Document everything [properly](#documentation) | ||
- If you are importing tests, comments etc. from [Turfjs](https://github.com/Turfjs/turf), please make sure you refactor it so it conforms with Dart syntax. | ||
- **Write [tests](https://dart.dev/guides/testing)**―Keep an eye on [Turfjs'](https://github.com/Turfjs/turf) implementation | ||
- run the the test: ```dart test test/components/XXX.dart``` | ||
- **Write [benchmarks](https://pub.dev/packages/benchmark)**―have a look at our [implementation](https://github.com/dartclub/turf_dart/tree/main/benchmark) | ||
- run the benchmark: ```dart pub run benchmark``` | ||
- Commit | ||
- Convert to real Pull request _ready for review_ | ||
- Code review / mention a reviewer from [contributors list](https://github.com/dartclub/turf_dart/graphs/contributors) | ||
|
||
|
||
## Documentation | ||
We follow [Effective Dart](https://dart.dev/guides/language/effective-dart/documentation) guidelines for documentation. | ||
|
||
After going through the [Implementation Process](#implementation-process), please mention the made changes in [README.md](https://github.com/dartclub/turf_dart/blob/main/README.md) | ||
|
||
In order to add to this very documentation, please develop CONTRIBUTING.md in [documentation branch](https://github.com/dartclub/turf_dart/tree/documentation) | ||
|
||
## GeoJSON Object Model | ||
If you have not read our [README.md](https://github.com/dartclub/turf_dart/blob/main/README.md) this diagram will give you a lot of information. Please consider looking our [notable design decisions](https://github.com/dartclub/turf_dart/blob/main/README.md#notable-design-decisions). | ||
 |
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
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
Oops, something went wrong.