Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release 0.1.0 #16

Merged
merged 5 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/dart-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ jobs:
run: dart analyze
if: always()

- name: Run build_runner
run: dart run build_runner build --delete-conflicting-outputs
if: always()

- name: Run tests with coverage enabled
run: dart test --coverage=./coverage
if: always()
Expand Down
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
## 0.1.0
- Several bug fixes, including for LineString, FeatureCollection and Polygon equality
- Increase test coverage
- Relying on the GeoJson objects from geotypes instead of turf

Huge thank to [@jsiedentop](https://github.com/jsiedentop) for helping!

## 0.0.3
- This is solely a quality release, without new functionality.

## 0.0.2
Huge thank to [@jsiedentop](https://github.com/jsiedentop) for helping!

## 0.0.2
- Several bugfixes, including fix of reversed and shifted polygon.

## 0.0.1
Huge thank to [@armantorkzaban](https://github.com/armantorkzaban), [@lukas-h](https://github.com/lukas-h) for helping!

## 0.0.1
- Initial version.

Huge thank to [@armantorkzaban](https://github.com/armantorkzaban), [@lukas-h](https://github.com/lukas-h) for helping!
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# turf_equality

Comparison of two GeoJSON objects, based on the [turf pub-package](https://pub.dev/packages/turf).
Comparison of two GeoJSON objects, based on the [geotypes](https://pub.dev/packages/geotypes) library.
11 changes: 11 additions & 0 deletions lib/src/round.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'dart:math';

/// Round number to precision
num round(num value, [num precision = 0]) {
if (!(precision >= 0)) {
throw Exception("precision must be a positive number");
}
num multiplier = pow(10, precision);
num result = (value * multiplier);
return result.round() / multiplier;
}
4 changes: 2 additions & 2 deletions lib/src/turf_equality_base.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:turf/turf.dart';
import 'package:turf/helpers.dart' as rounder;
import 'package:geotypes/geotypes.dart';
import 'round.dart' as rounder;

class Equality {
/// Decides the number of fraction digits in a [double]
Expand Down
7 changes: 2 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: turf_equality
description: Comparison of two GeoJSON objects, based on the turf pub-package
version: 0.0.3
version: 0.1.0
repository: https://github.com/dartclub/turf_equality

environment:
sdk: ">=2.17.3 <4.0.0"

dependencies:
turf: ^0.0.8

geotypes: ^0.0.2
dev_dependencies:
lints: ^3.0.0
test: ^1.19.3
json_serializable: ^6.1.1
build_runner: ^2.1.5
analyzer: ^6.4.0
benchmark: ^0.3.0
2 changes: 1 addition & 1 deletion test/context/helper.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// A List of builders that are similar to the way TurfJs creates GeoJSON
// objects. The idea is to make it easier to port JavaScript tests to Dart.
import 'package:turf/turf.dart';
import 'package:geotypes/geotypes.dart';

Feature<LineString> lineString(List<List<num>> coordinates, {dynamic id}) {
return Feature(
Expand Down
2 changes: 1 addition & 1 deletion test/geojson_equality_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:io';

import 'package:turf_equality/turf_equality.dart';
import 'package:test/test.dart';
import 'package:turf/helpers.dart';
import 'package:geotypes/geotypes.dart';

import 'context/helper.dart';

Expand Down
2 changes: 1 addition & 1 deletion test/geojson_equality_wout_precision.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:io';

import 'package:turf_equality/turf_equality.dart';
import 'package:test/test.dart';
import 'package:turf/helpers.dart';
import 'package:geotypes/geotypes.dart';

void main() {
group(
Expand Down
Loading