Skip to content

Commit 5cc2f6d

Browse files
authored
Reduce spam during tests and remove docstrings on some internal methods extending Base functions (#231)
1 parent 487ba1b commit 5cc2f6d

File tree

35 files changed

+626
-577
lines changed

35 files changed

+626
-577
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
version:
21+
- '1'
2122
- '1.11'
2223
- 'pre'
2324
- 'lts'

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## 1.6.5
44

55
- Clarified the counter-clockwise requirement for the `clip_polygon` argument in `voronoi`. See [#230](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/230).
6+
- Reduced spam during package tests. `@info` statements are now only shown on a failed test, and are now shown in the `Context` output of the failed test. See [#231](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/231).
7+
- Removed docstrings on some methods that extended `Base` functions for internal use only. You can still find documentation on them by going to the method location and viewing the commented-out docstring. See [#231](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/231).
68

79
## 1.6.4
810

docs/Project.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2020

2121
[compat]
2222
BenchmarkTools = "1.5"
23-
CairoMakie = "0.12"
23+
CairoMakie = "0.15"
2424
Dates = "1.11"
2525
Documenter = "1.5.0"
2626
DocumenterTools = "0.1"
@@ -34,3 +34,6 @@ SimpleGraphs = "0.8"
3434
StableRNGs = "1.0"
3535
StatsBase = "0.34"
3636
Test = "1.11"
37+
38+
[sources]
39+
DelaunayTriangulation = { path = ".." }

docs/src/applications/cell_simulations.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22
EditURL = "https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_applications/cell_simulations.jl"
33
```
44

5-
This example has been moved to Agent.jl's documentation. Please see the example [here]().
5+
# Cellular Biology
6+
This example has been moved to Agent.jl's documentation. Please
7+
see the example [here](https://juliadynamics.github.io/Agents.jl/stable/examples/delaunay/).
8+
9+
## Just the code
10+
An uncommented version of this example is given below.
11+
You can view the source code for this file [here](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_applications/cell_simulations.jl).
12+
13+
```julia
14+
15+
```
16+
17+
---
618

719
*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*
820

docs/src/math/clipped.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resize_to_layout!(fig)
2525
```
2626

2727
```@example vornclip11
28-
fig # hide
28+
fig #hide
2929
```
3030

3131
At the end of this section, we also discuss the intersection of $\mathcal V(\mathcal P)$ with a rectangle, and then discuss clipping $\mathcal V(\mathcal P)$ more generically to a given convex polygon.
@@ -100,7 +100,7 @@ resize_to_layout!(fig)
100100
```
101101

102102
```@example vornclip11
103-
fig # hide
103+
fig #hide
104104
```
105105

106106
In the first figure above, we are considering the processing of an edge $e$. The Voronoi polygon $\mathcal V$ we consider incident to $e$ is shown, obtained by finding that the midpoint of $e$ is contained in $\mathcal V$. By just processing the intersections of $\mathcal V$, we find the intersections with $\mathcal C\mathcal H(\mathcal P)$ (shown in magenta) shown in orange. This alone is not enough, though, as we can see that we don't identify that the black dot between $e_\ell$ and $e$ should be included in this intersection. This dot is an example of a corner point we were discussing previously, showing the need for this extra processing step. Note also from the above figure that unbounded polygons $\mathcal V$ alone are not sufficient for checking all intersections, as we can see that some of the bounded polygons also intersect with the convex hull. Eventually, after processing all edges in this way, we obtain the set of orange points shown in the second figure.
@@ -157,7 +157,7 @@ resize_to_layout!(fig)
157157
```
158158

159159
```@example suthodg
160-
fig # hide
160+
fig #hide
161161
```
162162

163163
In the figure above, the black polygon shows the subject polygon and the red polygon is the clip polygon. Our aim is to clip the subject polygon to the clip polygon to obtain the blue polygon shown. Letting $\mathcal P_S = \{p_1, \ldots, p_n\}$ and $\mathcal P_C = \{q_1, \ldots, q_m\}$ be the subject and clip polygons listed in counter-clockwise order with $p_1 \neq p_n$ and $q_1 \neq q_m$, respectively, the procedure for this clipping as follows:
@@ -208,7 +208,7 @@ resize_to_layout!(fig)
208208
```
209209

210210
```@example suthodg
211-
fig # hide
211+
fig #hide
212212
```
213213

214214
In the figure above, we show the individual steps of this algorithm. In the second panel, the blue line shows the extended edge of the clip polygon that we use to slice the subject polygon, clipping it onto the edge. For the next four panels, the blue line never touches the subject polygon, and so nothing happens. The last two panels show the last two clips needed to obtain the final polygon.
@@ -270,7 +270,7 @@ resize_to_layout!(fig)
270270
```
271271

272272
```@example suthodg
273-
fig # hide
273+
fig #hide
274274
```
275275

276276
In the figure above, the polygon we are interested is the one corresponding to the black dot, and we want to clip this polygon to the red rectangle. The following figures show how we grow the polygon's unbounded edges to begin.
@@ -324,7 +324,7 @@ resize_to_layout!(fig)
324324
```
325325

326326
```@example suthodg
327-
fig # hide
327+
fig #hide
328328
```
329329

330330
In these figures, the blue polygon shows the Voronoi polygon, and the green edges show the approximations to the unbounded rays; the top-most ray starts away from the polygon since the midpoint is further behind the associated circumcenter in this case. The magenta line shows the line segment joining the two approximations - the aim is to grow the green edges long enough such that the magenta line is completely outside of the red rectangle. Let's analyse each figure.
@@ -350,7 +350,7 @@ resize_to_layout!(fig)
350350
```
351351

352352
```@example suthodg
353-
fig # hide
353+
fig #hide
354354
```
355355

356356
## Computing the intersection of the Voronoi tessellation with a convex polygon

docs/src/math/constrained.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end
5151
```
5252

5353
```@example segins1
54-
fig # hide
54+
fig #hide
5555
```
5656

5757
To develop an algorithm, we need to notice one important thing from this figure: Since the blue segment will occlude visibility between any points on either side of the segment, the blue segment effectively divides, locally, the triangulation into two parts that no longer interact with each other. In the figure above, this means that any changes to the triangles bounded between the red curve and the blue segment will not interact those in the region bounded between the green curve and the bkue segment. This is a key observation that will allow us to develop an algorithm for inserting segments: we can handle the two sides separately.
@@ -151,7 +151,7 @@ resize_to_layout!(fig)
151151
```
152152

153153
```@example segins1
154-
fig # hide
154+
fig #hide
155155
```
156156

157157
## Adding Points into a Constrained Delaunay Triangulation

docs/src/math/convex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ resize_to_layout!(fig)
4141
```
4242

4343
```@example convpoly
44-
fig # hide
44+
fig #hide
4545
```
4646

4747
See that at each stage the vertex $v_u$ to be added, shown in red, it lies outside of the triangulation, and only a single edge $e_{vw}$ separates $v_u$ from the triangulation. Thus, we can identify that the point location step amounts to finding this edge $e_{vw}$ so that we inserting $v_u$ into the triangulation can be done by retriangulating the cavity formed by the union of the triangles $T_{uvw}$ and the triangles containing $u$ in their circumcircles.

docs/src/math/curve_bounded.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ resize_to_layout!(fig)
6565
```
6666

6767
```@example curvbonddom1
68-
fig # hide
68+
fig #hide
6969
```
7070

7171
In the figure above, we show an example of a set of subcurves $\{s_1, s_2, s_3, s_4, s_5, s_6\}$ together with a common apex vertex. We see that the curve $s_1$ forms no small angle with any other curve, and so it is not a part of any small angle complex. The curves $\{s_2, s_3, s_4\}$ together form a small angle complex since they form a contiguous set of small angles. The curve $s_5$ is not included in this complex since the angle between $s_4$ and $s_5$ is not small. Lastly, the curves $\{s_5, s_6\}$ define a small angle complex. See that it is possible for a single apex vertex to define several separate small angle complexes.
@@ -130,7 +130,7 @@ resize_to_layout!(fig)
130130
```
131131

132132
```@example curvbonddom1
133-
fig # hide
133+
fig #hide
134134
```
135135

136136
In the above figure, the subcurves of interest are the subcures defined by the curves from $a$ to each of the first blue points on each curve. These blue points and lines shows the piecewise linear approximation to each subcurve. The shortest edge length is then used to compute $r_{\max}$, giving the circle shown in red. The shell with radius $2^{\lfloor \log_2 r_{\max}}\rfloor$ is shown in green. We then split each of the subcurves at their intersection with this green curve, giving the points shown in green and the updated piecewise linear approximation in the second figure. All subsequent splits of these subcurves (those between $a$ and the new split points) will be at the next smaller power of two shell, i.e. $2^{\lfloor \log_2 r_{\max} \rfloor - 1}$.

docs/src/math/curves.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ resize_to_layout!(fig)
100100
```
101101

102102
```@example curvexs1
103-
fig # hide
103+
fig #hide
104104
```
105105

106106
There are many orientation markers on this curve. Only two of these come from $\kappa(t) = 0$, with all the others coming from $x', y', x''$, and $y''$, as we can see from the graphs shown.
@@ -140,7 +140,7 @@ resize_to_layout!(fig)
140140
```
141141

142142
```@example curvexs1
143-
fig # hide
143+
fig #hide
144144
```
145145

146146
### Position of a point relative to a curve
@@ -173,7 +173,7 @@ resize_to_layout!(fig)
173173
```
174174

175175
```@example curvexs1
176-
fig # hide
176+
fig #hide
177177
```
178178

179179
### Computing equidistant splits
@@ -217,7 +217,7 @@ resize_to_layout!(fig)
217217
```
218218

219219
```@example curvexs1
220-
fig # hide
220+
fig #hide
221221
```
222222

223223
## LineSegment

docs/src/math/delaunay.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ triplot!(ax, tri, strokewidth = 3, show_points = true)
5858
```
5959

6060
```@example delaunay_ex1
61-
fig # hide
61+
fig #hide
6262
```
6363

6464
We can see that the circumcircles of the triangles contain no points in their interior. This is a Delaunay triangulation.
@@ -148,7 +148,7 @@ resize_to_layout!(fig)
148148
```
149149

150150
```@example delaunay_ex1
151-
fig # hide
151+
fig #hide
152152
```
153153

154154
In the above figure, we are considering insertion the red point into the triangulation. We then then all triangles whose circumcircles contain this red point, shown in blue. Deleting these triangles leaves behind a cavity shown in the third figure. Finally, connecting the vertices of the cavity to the red point gives the final triangulation.
@@ -186,7 +186,7 @@ scatter!(ax, [p, q], color = :red, markersize = 17, strokecolor = :black, stroke
186186
```
187187

188188
```@example delaunay_ex1
189-
fig # hide
189+
fig #hide
190190
```
191191

192192
The algorithm draws a line connecting some initial point $q$ and the search point $p$, as shown in red, and then marches along triangles until $p$ is found, traversing the blue triangles shown above.
@@ -254,7 +254,7 @@ resize_to_layout!(fig)
254254
```
255255

256256
```@example delaunay_ex1
257-
fig # hide
257+
fig #hide
258258
```
259259

260260
In this example, we are interested in the ghost triangle associated with the blue edge. The oriented outer halfplane for this edge can be defined simply as $H = \{(x, y) ∈ \mathbb R^2 : y > 1\}\{(x, y) ∈ \mathbb R^2 : 0 < x < 1, y = 1\}$. Using this definition, we see that the red point is not in $H$, the magenta point is in $H$ (in fact, it is exactly on $\partial H$, where $\partial H$ denotes the boundary of $H$), the black point is in $H$, and the green point is not in $H$.
@@ -301,7 +301,7 @@ resize_to_layout!(fig)
301301
```
302302

303303
```@example delaunay_ex1
304-
fig # hide
304+
fig #hide
305305
```
306306

307307
The ghost edges are the blue lines, and the central point is the red dot. With this definition, we therefore see that we can uniquely each region in space with a triangle - be it a ghost triangle or a real (solid) triangle.

0 commit comments

Comments
 (0)