Skip to content

Commit

Permalink
Spell checking and a few minor fixes
Browse files Browse the repository at this point in the history
* Fixes a few typos and commas
* Remove non-working anchor in CONTRIBUTING.md
* Fixed a few links in CONTRIBUTING.md
* Add .idea to the gitignore
  • Loading branch information
nyurik committed Feb 21, 2022
1 parent d7df627 commit a1b8d4c
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/target
**/Cargo.lock
.idea
10 changes: 5 additions & 5 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This document is based on, and aims to track the [Rust Code of Conduct](https://
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behavior. We interpret the term "harassment" as including the definition in the <a href="http://citizencodeofconduct.org/">Citizen Code of Conduct</a>; if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [GeoRust moderation team][mod_team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome.
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [GeoRust moderation team][mod_team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you, and we've got your back.
* Likewise, any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome.

## Moderation

Expand All @@ -25,13 +25,13 @@ These are the policies for upholding our community's standards of conduct. If yo
3. Moderators will first respond to such remarks with a warning.
4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
6. Moderators may choose at their discretion to un-ban the user if it was a first offense, and they offer the offended party a genuine apology.
7. If a moderator bans someone, and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.

In the GeoRust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.

And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.
And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along, and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.

*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/).*

Expand Down
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sections:
* [Feature Requests](#feature-requests)
* [Bug Reports](#bug-reports)
* [Pull Requests](#pull-requests)
* [Writing Tests and Documentation](#writing-documentation)
* [Writing Tests and Documentation](#writing-tests-and-documentation)

As a reminder, all contributors are expected to follow our [Code of Conduct][coc].

Expand All @@ -19,7 +19,7 @@ As a reminder, all contributors are expected to follow our [Code of Conduct][coc
[feature-requests]: #feature-requests

`geo` aims to provide a broad suite of functionality. If
you're in any doubt as to whether a feature can be included,
you're in any doubt whether a feature can be included,
simply open an issue and ask. It's a good idea to check open
issues and pull requests first, in order to check whether a
requested feature is already in progress.
Expand All @@ -39,7 +39,7 @@ always work, and sometimes it's hard to know what to search for, so consider thi
extra credit. We won't mind if you accidentally file a duplicate report.

Similarly, to help others who encountered the bug find your
issue, consider filing an issue with with a descriptive
issue, consider filing an issue with a descriptive
title, which contains information that might be unique to
it. This can be the language or compiler feature used, the
conditions that trigger the bug, or part of the error
Expand Down Expand Up @@ -111,14 +111,13 @@ we support. If it all works out, @bors will merge your code
into `master` and close the pull request.

## Writing Tests and Documentation
[writing-documentation]: #writing-documentation

Documentation improvements are very welcome. Standard API
documentation is generated from the source code itself. If
you're adding a new feature, you **must** document its use,
and write tests, preferably covering 100% of the added
functionality. [Several
geometries](geo/src/algorithm/test_fixtures) are provided as
geometries](geo-test-fixtures) are provided as
test fixtures. If you need help with the format or content
of docs, or help writing some tests, don't hesitate to ask.

Expand All @@ -138,7 +137,7 @@ releases may involve all three. If publishing more than one,
that, a breaking change should be released with a change
in the major version number.

1. If there is a dependency on the other sub-crates (eg.
1. If there is a dependency on the other sub-crates (e.g.
`geo` depends on `geo-types`), ensure the major version
matches the latest release, and the minor the minimum
version needed to compile.
Expand Down
6 changes: 3 additions & 3 deletions geo-types/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* <https://github.com/georust/geo/pull/705>
* Add +=, -=, \*=, and /= for Point
* <https://github.com/georust/geo/pull/715>
* Note: The MSRV when installing latest dependencies has increased to 1.55
* Note: The MSRV when installing the latest dependencies has increased to 1.55
* <https://github.com/georust/geo/pull/726>

## 0.7.2
Expand Down Expand Up @@ -66,7 +66,7 @@
* <https://github.com/georust/geo/pull/468>
* Add `Triangle` and `Rect` to `Geometry`
* <https://github.com/georust/geo/pull/432>
* Introduce `Rect::try_new` constructor which doesn’t panic
* Introduce `Rect::try_new` constructor which does not panic
* <https://github.com/georust/geo/pull/442>
* Add `Rect::center` method
* <https://github.com/georust/geo/pull/450>
Expand Down Expand Up @@ -155,7 +155,7 @@
* <https://github.com/georust/geo/pull/265>
* Introduce `x_y` method on `Point` and `Coordinate`
* <https://github.com/georust/geo/pull/277>
* Migrate `Line` aand `LineString` to be a series of `Coordinates` (not `Points`).
* Migrate `Line` and `LineString` to be a series of `Coordinates` (not `Points`).
* <https://github.com/georust/geo/pull/244>
* Introduce Triangle geometry type.
* <https://github.com/georust/geo/pull/285>
Expand Down
8 changes: 4 additions & 4 deletions geo-types/src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ where
///
/// assert_eq!(p.x(), 1.234);
/// ```
#[deprecated = "use `Point::x` instead, it's less ambigous"]
#[deprecated = "use `Point::x` instead, it's less ambiguous"]
pub fn lng(self) -> T {
self.x()
}
Expand All @@ -191,7 +191,7 @@ where
///
/// assert_eq!(p.x(), 9.876);
/// ```
#[deprecated = "use `Point::set_x` instead, it's less ambigous"]
#[deprecated = "use `Point::set_x` instead, it's less ambiguous"]
pub fn set_lng(&mut self, lng: T) -> &mut Point<T> {
self.set_x(lng)
}
Expand All @@ -207,7 +207,7 @@ where
///
/// assert_eq!(p.y(), 2.345);
/// ```
#[deprecated = "use `Point::y` instead, it's less ambigous"]
#[deprecated = "use `Point::y` instead, it's less ambiguous"]
pub fn lat(self) -> T {
self.y()
}
Expand All @@ -224,7 +224,7 @@ where
///
/// assert_eq!(p.y(), 9.876);
/// ```
#[deprecated = "use `Point::set_y` instead, it's less ambigous"]
#[deprecated = "use `Point::set_y` instead, it's less ambiguous"]
pub fn set_lat(&mut self, lat: T) -> &mut Point<T> {
self.set_y(lat)
}
Expand Down
2 changes: 1 addition & 1 deletion geo/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* <https://github.com/georust/geo/pull/718>
* Add missing `Intersects` implementations
* <https://github.com/georust/geo/pull/725>
* Note: The MSRV when installing latest dependencies has increased to 1.55
* Note: The MSRV when installing the latest dependencies has increased to 1.55
* <https://github.com/georust/geo/pull/726>
* Add `get()` to `IntersectionMatrix` for directly querying DE-9IM matrices
* <https://github.com/georust/geo/pull/714>
Expand Down
2 changes: 1 addition & 1 deletion geo/src/algorithm/area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ where
// determinants.
//
// Note: we can't use the `Centroid` trait as it
// requries `T: Float` and in fact computes area in the
// requires `T: Float` and in fact computes area in the
// implementation. Another option is to use the average
// of the coordinates, but it is not fool-proof to
// divide by the length of the linestring (eg. a long
Expand Down
2 changes: 1 addition & 1 deletion geo/src/algorithm/dimensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::{
/// ```
#[derive(Debug, Clone, Copy, PartialEq, Eq, Ord, PartialOrd)]
pub enum Dimensions {
/// Some geometries, like a `MultiPoint` or `GeometryColletion` may have no elements - thus no
/// Some geometries, like a `MultiPoint` or `GeometryCollection` may have no elements - thus no
/// dimensions. Note that this is distinct from being `ZeroDimensional`, like a `Point`.
Empty,
/// Dimension of a point
Expand Down
2 changes: 1 addition & 1 deletion geo/src/algorithm/intersects/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ mod test {

#[test]
fn compile_test_geom_geom() {
// This test should check existance of all
// This test should check existence of all
// combinations of geometry types.
let geom: Geometry<_> = Line::from([(0.5, 0.5), (2., 1.)]).into();
assert!(geom.intersects(&geom));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ where
) {
if self.edges_are_from_same_geometry || !intersection.is_proper() {
// In the case of self-noding, `edge0` might alias `edge1`, so it's imperative that
// the mutable borrow's are short lived and do not overlap.
// the mutable borrows are short lived and do not overlap.
edge0
.borrow_mut()
.add_intersections(intersection, line_0, segment_index_0);
Expand Down
6 changes: 3 additions & 3 deletions geo/src/algorithm/relate/geomgraph/intersection_matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::algorithm::{coordinate_position::CoordPos, dimensions::Dimensions};
/// Models a *Dimensionally Extended Nine-Intersection Model (DE-9IM)* matrix.
///
/// DE-9IM matrix values (such as "212FF1FF2") specify the topological relationship between
/// two [Geometeries](struct.Geometry.html).
/// two [Geometries](struct.Geometry.html).
///
/// DE-9IM matrices are 3x3 matrices that represent the topological locations
/// that occur in a geometry (Interior, Boundary, Exterior).
Expand All @@ -25,7 +25,7 @@ pub struct IntersectionMatrix(LocationArray<LocationArray<Dimensions>>);

/// Helper struct so we can index IntersectionMatrix by CoordPos
///
/// CoordPos enum members are ordered: OnBondary, Inside, Outside
/// CoordPos enum members are ordered: OnBoundary, Inside, Outside
/// DE-9IM matrices are ordered: Inside, Boundary, Exterior
///
/// So we can't simply `CoordPos as usize` without losing the conventional ordering
Expand Down Expand Up @@ -234,7 +234,7 @@ impl IntersectionMatrix {
/// // The intersection of the two interiors is empty, because no part of the string is inside the rect
/// assert_eq!(intersection.get(CoordPos::Inside, CoordPos::Inside), Dimensions::Empty);
///
/// // The intersection of the line string's interior with the rect's boundary is one-dimensoinal, because part of the first line overlaps one of the rect's edges
/// // The intersection of the line string's interior with the rect's boundary is one-dimensional, because part of the first line overlaps one of the rect's edges
/// assert_eq!(intersection.get(CoordPos::Inside, CoordPos::OnBoundary), Dimensions::OneDimensional);
///
/// // The intersection of the line string's interior with the rect's exterior is one-dimensional, because part of the string is outside the rect
Expand Down
4 changes: 2 additions & 2 deletions geo/src/algorithm/relate/relate_operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ where
}
}

/// Insert nodes for all intersections on the edges of a Geometry.
/// Insert nodes for all intersections on the edges of a Geometry.
///
/// Label the created nodes the same as the edge label if they do not already have a label.
/// This allows nodes created by either self-intersections or mutual intersections to be
Expand Down Expand Up @@ -397,7 +397,7 @@ where
}

/// Isolated nodes are nodes whose labels are incomplete (e.g. the location for one Geometry is
/// null).
/// null).
/// This is the case because nodes in one graph which don't intersect nodes in the other
/// are not completely labeled by the initial process of adding nodes to the nodeList. To
/// complete the labelling we need to check for nodes that lie in the interior of edges, and in
Expand Down
8 changes: 4 additions & 4 deletions geo/src/algorithm/rotate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ pub trait Rotate<T> {
T: CoordFloat;

#[deprecated(
note = "Equivalent to `rotate_around_centroid` except for `Polygon<T>`,
where it is equivalent to rotating around the polygon's outer ring.
Call that instead, or `rotate_around_center` if you'd like to rotate
note = "Equivalent to `rotate_around_centroid` except for `Polygon<T>`,
where it is equivalent to rotating around the polygon's outer ring.
Call that instead, or `rotate_around_center` if you'd like to rotate
around the geometry's bounding box center."
)]
fn rotate(&self, angle: T) -> Self
Expand Down Expand Up @@ -672,7 +672,7 @@ mod test {
.into();

// results agree with Shapely / GEOS
// (relaxing the episilon a bit)
// (relaxing the epsilon a bit)
assert_relative_eq!(
multipolygon.rotate_around_centroid(45.),
expected_centroid,
Expand Down
4 changes: 2 additions & 2 deletions geo/src/algorithm/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ where
/// Simplifies a geometry.
///
/// The [Ramer–Douglas–Peucker
/// algorithm](https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm) simplifes a
/// algorithm](https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm) simplifies a
/// linestring. Polygons are simplified by running the RDP algorithm on all their constituent
/// rings. This may result in invalid Polygons, and has no guarantee of preserving topology.
///
/// Multi* objects are simplified by simplifing all their constituent geometries individually.
/// Multi* objects are simplified by simplifying all their constituent geometries individually.
///
/// An epsilon less than or equal to zero will return an unaltered version of the geometry.
pub trait Simplify<T, Epsilon = T> {
Expand Down
2 changes: 1 addition & 1 deletion geo/src/algorithm/simplifyvw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ where
assert!(tree.remove(&line_1).is_some());
assert!(tree.remove(&line_2).is_some());

// Restore continous line segment
// Restore continuous line segment
tree.insert(Line::new(left_point, right_point));

// Now recompute the adjacent triangle(s), using left and right adjacent points
Expand Down
2 changes: 1 addition & 1 deletion geo/src/algorithm/winding_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub trait Winding {
/// order, so that the resultant order makes it appear counter-clockwise
fn points_ccw(&self) -> Points<Self::Scalar>;

/// Change this objects's points so they are in clockwise winding order
/// Change this object's points so they are in clockwise winding order
fn make_cw_winding(&mut self);

/// Change this line's points so they are in counterclockwise winding order
Expand Down
2 changes: 1 addition & 1 deletion geo/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ use std::cmp::Ordering;

/// Compare two coordinates lexicographically: first by the
/// x coordinate, and break ties with the y coordinate.
/// Expects none of coordinates to be uncomparable (eg. nan)
/// Expects none of coordinates to be incomparable (eg. nan)
#[inline]
pub fn lex_cmp<T: CoordNum>(p: &Coordinate<T>, q: &Coordinate<T>) -> Ordering {
p.x.partial_cmp(&q.x)
Expand Down

0 comments on commit a1b8d4c

Please sign in to comment.