Welcome and thank you for deciding to contribute to the project!
Here is how cooperation works perfectly at Turf Dart
- Code of Conduct
- Get started
- Structure of modules
- Implementation Process
- Documentation
- GeoJSON object model
By participating, you are expected to uphold international human rights and fundamental freedoms! To put it simply, be kind to each other.
- Get the Dart 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
- Import the library in your code and use it. For example:
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
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
- 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
- If you are importing tests, comments etc. from Turfjs, please make sure you refactor it so it conforms with Dart syntax.
- Write tests―Keep an eye on Turfjs' implementation
- run the the test:
dart test test/components/XXX.dart
- run the the test:
- Write benchmarks―have a look at our implementation
- run the benchmark:
dart pub run benchmark
- run the benchmark:
- Commit
- Convert to real Pull request ready for review
- Code review / mention a reviewer from contributors list
We follow Effective Dart guidelines for documentation.
After going through the Implementation Process, please mention the made changes in README.md
In order to add to this very documentation, please develop CONTRIBUTING.md in documentation branch
If you have not read our README.md this diagram will give you a lot of information. Please consider looking our notable design decisions.