Skip to content

Commit bd44082

Browse files
committed
Merge remote-tracking branch 'origin/release/1-1-0'
2 parents f70d4b0 + ed2b3d1 commit bd44082

File tree

153 files changed

+13274
-1771
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+13274
-1771
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ run-unit-tests:
3939
- java -version
4040
- ./gradlew lib:cleans lib:tests
4141
artifacts:
42+
reports:
43+
junit:
44+
- lib/jbotsim-core/build/test-results/test/TEST-*.xml
45+
- lib/jbotsim-extras-common/build/test-results/test/TEST-*.xml
46+
- lib/jbotsim-extras-swing/build/test-results/test/TEST-*.xml
47+
- lib/jbotsim-icons/build/test-results/test/TEST-*.xml
48+
- lib/jbotsim-ui-common/build/test-results/test/TEST-*.xml
49+
- lib/jbotsim-ui-swing/build/test-results/test/TEST-*.xml
50+
- lib/jbotsim-serialization-common/build/test-results/test/TEST-*.xml
4251
paths:
4352
- lib/jbotsim-core/build/test-results
4453
- lib/jbotsim-extras-common/build/test-results

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
dist: trusty
12
language: java
23
script: ./gradlew lib:cleans lib:jars lib:tests
34
jdk:

CHANGELOG.md

Lines changed: 324 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,331 @@
22

33
This file lists modifications introduced by each version.
44

5-
As of version 1.0.0, the project will try and follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6-
75
## [Unreleased]
86

97
* empty
108

9+
## [1.1.0] - 2019/09/10
10+
11+
### Topology, Node and Link classes modifications
12+
13+
**Links handling clarification:**
14+
15+
[[issue 49]][issue: #49]
16+
17+
* The `Link.Type` enum has been **renamed** as `Link.Orientation`
18+
* The `Link.DEFAULT_TYPE` enum has been **renamed** into `Link.DEFAULT_ORIENTATION`
19+
* The `Topology` class is augmented with an instance variable `orientation` that contains the default orientation of
20+
the topology
21+
22+
Accessors/Actuators have been added as `Topology.setOrientation()` and `Topology.getOrientation()`.
23+
* A new `Topology.isDirected()` helper method has been added
24+
25+
It is a simple test of the value returned by `Topology.getOrientation()`.
26+
* Accessors to links `Topology.getLinks()`, `Topology.getLink()` and `Node.getLinks()` now return links whose type is
27+
determined with respect to `Topology.getOrientation()`
28+
* Accessors to links based on a `Boolean` specification of the orientation i.e., `Topology.getLinks(boolean)`,
29+
`Topology.getLink(Node,Node,boolean)` and `Node.getLinks(boolean)` are marked **deprecated** and replaced by methods
30+
where the `Boolean` is replaced by a `Link.Orientation` parameter
31+
* The method `Topology.hasDirectedLinks()` is marked as **deprecated**; `Topology.isDirected()` should be used instead
32+
* The implementation of `Node.getCommonLinkWith()` and `Node.getNeighbors()` is changed to explicitly request undirected
33+
links
34+
* A test suite has been added to check behaviors of `Topology.getLinks()` w.r.t. topology orientation
35+
36+
[issue: #49]: https://github.com/jbotsim/JBotSim/issues/49
37+
38+
39+
**Bug fix in Link:**
40+
41+
* Fixed a `NullPointerException` when calling `Link.equals(null)` [[issue 65]][issue: #65]
42+
43+
[issue: #65]: https://github.com/jbotsim/JBotSim/issues/65
44+
45+
### MessageEngine class modifications
46+
47+
[[issue 58]][issue: #58]
48+
49+
**Fix in MessageEngine:**
50+
51+
* A call to the now **deprecated** `MessageEngine.setSpeed()` (now `MessageEngine.setDelay()`) method does not duplicate
52+
messages delivery anymore
53+
54+
**Behavior modifications in MessageEngine:**
55+
56+
* The delay feature from the former `DelayMessageEngine` has finally been integrated in the `MessageEngine`
57+
58+
Modifying the `MessageEngine`'s delay (`setDelay()`) will only affect messages sent during this round and the
59+
following ones. Already queued messages retain their counters.
60+
61+
* A message will now be dropped if the link between its sender and destination is broken, while the message is queued
62+
63+
In order for a message to be delivered, a link from the sender to the destination must be present during each round,
64+
while the message is queued. If at some point the `MessageEngine` can't find such a link, the message will be dropped.
65+
66+
Note that if `Message.retryMode` is set to `true`, the `MessageEngine` will try requeue it, with a new delay.
67+
68+
* Concurrent messages delivery is now consistent with insertion order
69+
70+
When several messages between a sender and a destination are supposed to be delivered during the same round (they
71+
have possibly been queued during different rounds, but with different delays), they will now consistently be delivered
72+
according to their queuing order.
73+
74+
75+
**New symbols in MessageEngine:**
76+
77+
* The `MessageEngine.setDelay(int)` and `MessageEngine.getDelay()` have been created
78+
79+
These methods allow you to control the delay (in rounds) applied before actually trying to deliver a message.
80+
81+
* The `MessageEngine.DELAY_INSTANT` constant has been added
82+
83+
This constant sets the value of the delay use for the quickest possible delivery.
84+
85+
* The `MessageEngine.DEFAULT_DELAY` constant has been added
86+
87+
This constant sets the delay's default value. It actually matches `MessageEngine.DELAY_INSTANT`.
88+
89+
* The explicit constructors `MessageEngine(Topology)` and `MessageEngine(Topology, int)` have been created
90+
91+
* It is thus now mandatory to provide at least a `Topology` when creating a `MessageEngine`.
92+
* `MessageEngine.setTopology(Topology)` has however been kept.
93+
* No default constructor is available. Please check that your code do not use it (reflection calls included).
94+
95+
**Deprecations in MessageEngine:**
96+
97+
* The `MessageEngine.setSpeed(int)` method has been deprecated
98+
99+
Please use `MessageEngine.setDelay(int)` instead.
100+
101+
### DelayMessageEngine/RandomMessageEngine class modifications
102+
103+
[[issue 58]][issue: #58]
104+
105+
Since the base `MessageEngine` now handles the _delay_ feature:
106+
107+
* `DelayMessageEngine` has been renamed to `RandomMessageEngine`
108+
109+
`jbotsim-extras-common`/`io.jbotsim.contrib.messaging.DelayMessageEngine` -> `io.jbotsim.contrib.messaging.RandomMessageEngine`
110+
111+
* The `RandomMessageEngine` inherits from all delay-related improvements in `MessageEngine`:
112+
113+
* The delay applied to message delivery is now modifiable during the object's lifecycle
114+
* Concurrent messages delivery is now consistent with insertion order
115+
* A broken link leads to message dropping
116+
* `Message.retryMode` is now taken into account
117+
118+
### AsyncMessageEngine class modifications
119+
120+
[[issue 58]][issue: #58]
121+
122+
**Behavior modifications in AsyncMessageEngine:**
123+
124+
* The _average_ feature is now better handled and documented
125+
126+
In non-FIFO cases, the delay is drawn randomly according to an exponential law with average value
127+
`AsyncMessageEngine.getAverageDuration()`.
128+
129+
In FIFO cases, the theoretical random delay is drawn the same way as for non-FIFO cases, but also taking care that the
130+
new message won't be delivered before a pre-existing one.
131+
132+
133+
**New symbols in AsyncMessageEngine:**
134+
135+
* The `AsyncMessageEngine.setAverageDuration(int)` and `AsyncMessageEngine.getAverageDuration()` have been created
136+
137+
These methods allow you to control the delay (in rounds) applied before actually trying to deliver a message.
138+
139+
* The `AsyncMessageEngine.DEFAULT_TYPE` constant has been added
140+
141+
This constant sets the default queue type value: `AsyncMessageEngine.Type.FIFO`.
142+
143+
* The `AsyncMessageEngine.DEFAULT_AVERAGE_DURATION` constant has been added
144+
145+
This constant sets the desired average delivery duration's default value: `10` rounds.
146+
147+
* The explicit constructors `AsyncMessageEngine(Topology, double, Type)` and `AsyncMessageEngine(Topology)` have been created
148+
149+
**Removals in AsyncMessageEngine:**
150+
151+
* The explicit constructor `AsyncMessageEngine(double, Type)` has been removed
152+
153+
Please use `AsyncMessageEngine(Topology, double, Type)` instead.
154+
155+
[issue: #58]: https://github.com/jbotsim/JBotSim/issues/58
156+
157+
### JViewer class modifications
158+
159+
**Bug fix in JViewer:**
160+
161+
* Fixed a truncation issue when importing a Topology via the *Load Topology* command [[issue 60]][issue: #60]
162+
163+
[issue: #60]: https://github.com/jbotsim/JBotSim/issues/60
164+
165+
**Behavior modifications in JViewer:**
166+
167+
* The `JViewer` now also detects `.gv` and `.xdot` files as to be handled with the `DotTopologySerializer` [[issue 48]][issue: #48]
168+
* The `JViewer` now detects `.d6` and `.g6` files as to be handled with the new `Graph6TopologySerializer` [[issue 28]][issue: #28]
169+
170+
### DotTopologySerializer class modifications
171+
172+
[[issue 48]][issue: #48]
173+
174+
**Behavior modifications in DotTopologySerializer:**
175+
176+
* `DotTopologySerializer.exportToString(Topology)` is now implemented (`null` was knowingly returned in the previous
177+
version)
178+
179+
Amongst other implementation points:
180+
* Node positions are output with the `pos = "x, y!"` syntax
181+
* The Y-coordinates are exported flipped, to be consistent with `DotTopologySerializer.importFromString()`
182+
* The exportation is done without respect to the `scale` member
183+
184+
* By default, the `DotTopologySerializer.importFromString(Topology , String)` does not scale anymore (it formerly
185+
doubled distances).
186+
187+
The former behavior can be achieved by either:
188+
* using the `DotTopologySerializer(double scale, int margin, boolean reorganize)` constructor or
189+
* using `TopologyLayouts.autoscale()`.
190+
191+
**Method symbols in DotTopologySerializer:**
192+
193+
* `DotTopologySerializer.DEFAULT_SCALE` has been added
194+
195+
The previous default scale factor was `2.0`. It is now set to `1.0`.
196+
197+
* `DotTopologySerializer.DEFAULT_MARGIN` has been added
198+
199+
The default value is unchanged: `50`.
200+
201+
* `DotTopologySerializer.DOT_FILENAME_EXTENSIONS` has been added
202+
203+
This array contains known extensions for DOT files. It currently contains `"gv"`, `"dot"` and `"xdot"`.
204+
Please [prefer][graphviz-gv-extension] the `.gv` extension.
205+
206+
[graphviz-gv-extension]: https://marc.info/?l=graphviz-devel&m=129418103126092
207+
[issue: #48]: https://github.com/jbotsim/JBotSim/issues/48
208+
209+
### DotTopologySerializer new parser implementation
210+
211+
[[issue 55]][issue: #55]
212+
213+
* The replacement of the parser removes the dependency to [com.paypal.digraph.digraph-parser](https://github.com/paypal/digraph-parser)
214+
215+
* The new parser has been written from the ANTLR grammar used by digraph-parser package
216+
(actually it is the grammar given in "The definitive ANTLR 4 Reference" book by T. Parr)
217+
218+
* ANTLR runtime classes are still required to run the parser
219+
220+
* The parser builds a graph structure (`DotGraph`, `DotNode`, `DotEdge`) that is translated into a topology
221+
222+
* The new parser permits to distinguish directed and undirected graphs
223+
224+
[issue: #55]: https://github.com/jbotsim/JBotSim/issues/55
225+
226+
### Graph6 file format support
227+
228+
[[issue 28]][issue: #28]
229+
230+
* A new serializer `Graph6TopologySerializer` is added to `jbotsim-serialization-common`/`io.jbotsim.io.format.graph6`.
231+
232+
* Extensions `.d6` and `.g6` have been registered in client classes of `TopologySerializerFilenameMatcher`:
233+
* `examples.tools.JBotSimConvert`
234+
* `examples.tools.JBotSimViewer`
235+
* `io.jbotsim.ui.JViewer`
236+
237+
[issue: #28]: https://github.com/jbotsim/JBotSim/issues/28
238+
239+
### TopologySerializerFilenameMatcher
240+
241+
* An helper method has been added in `TopologySerializerFilenameMatcher` that associates a set of filename extensions
242+
with a single `TopologySerializer`
243+
244+
### Color class modifications
245+
246+
* Some internal fixes have been provided, and unit tests added, to better match AWT's implementation regarding
247+
constructors and the alpha component
248+
249+
* `Color.getColor()` variants now better match their AWT counter parts
250+
251+
JBotSim's implementations used to directly consider the provided String as a RGB value, instead of trying to get the
252+
said value from a system property.
253+
254+
* General documentation effort
255+
256+
### JBackgroundPainter, JLinkPainter, JNodePainter classes modifications
257+
258+
In order to ease behavior modifications by inheritance, `JBackgroundPainter`, `JLinkPainter` and `JNodePainter` have
259+
been modified so that they all expose a `protected` variant of:
260+
* `setColor()`: this method is called by the object when it needs to set the AWT `Color` of the element
261+
* `setStroke()`: this method is called by the object when it needs to set the AWT `Stroke` used to draw the element
262+
* `setRenderingHints()`: this method is called by the object when it needs to set the AWT `RenderingHints` used to draw
263+
the element
264+
265+
Overriding these methods should be fairly straightforward.
266+
267+
The behaviors associated to each class stay unchanged.
268+
269+
### JDirectedLinkPainter creation
270+
271+
* `JDirectedLinkPainter` is added to `jbotsim-extras-swing`/`io.jbotsim.ui.painting` [[issue 71]][issue: #71]
272+
273+
It provides arrow-tips to directed links. Its implementation uses the reusable
274+
`jbotsim-extras-common`/`io.jbotsim.ui.painting.ArrowTipPathGenerator` class.
275+
276+
[issue: #71]: https://github.com/jbotsim/JBotSim/issues/71
277+
278+
### TopologyLayouts class modifications
279+
280+
**Method modifications in TopologyLayouts:**
281+
* `TopologyLayouts.autoscale(Topology)` is now `public` [[issue 51]][issue: #51]
282+
283+
284+
**New methods in TopologyLayouts:**
285+
* `TopologyLayouts.autoscale(Topology, AutoScaleParams)` created [[issue 52]][issue: #52]
286+
287+
This method allows to control the scaling process more precisely than the previous default, thanks to the
288+
`AutoScaleParams` object.
289+
The parameters used with the default method are:
290+
* *margin ratios*: `0.1`
291+
* *centering*: enabled
292+
* *communication ranges scaling*: enabled
293+
* *sensing ranges scaling*: enabled
294+
295+
* `TopologyLayouts.center(Topology)` created [[issue 52]][issue: #52]
296+
297+
This method centers the content of the `Topology` inside its boundaries (without scaling it).
298+
299+
* `TopologyBoundaries TopologyLayouts.computeBoundaries(Topology)` created [[issue 52]][issue: #52]
300+
301+
This method computes the boundaries of a `Topology`. These are represented by `TopologyBoundaries` object, with
302+
minimum and maximum coordinates on 3 axes.
303+
304+
305+
[issue: #51]: https://github.com/jbotsim/JBotSim/issues/51
306+
[issue: #52]: https://github.com/jbotsim/JBotSim/issues/52
307+
308+
### New icon in the jbotsim-icons module
309+
310+
`jbotsim-icons`/`io.jbotsim.ui.icons`
311+
312+
* A new icon suitable for servers/mainframes has been added [[issue 59]][issue: #59]
313+
* `jbotsim-icons`/`io/jbotsim/ui/icons/server.png`
314+
315+
As usual, it's path can be accessed using the corresponding constant `Icons.SERVER`.
316+
317+
318+
[issue: #59]: https://github.com/jbotsim/JBotSim/issues/59
319+
320+
321+
### Javadoc modifications
322+
323+
* Link JSE8 javadoc from javadoc [[issue 62]][issue: #62]
324+
* Prevent some errors in javadoc compilation by specifying UTF-8 encoding for javac and javadoc [[issue 66]][issue: #66]
325+
* Also remove some invalid tags (i.e. \<tt\>) from comments [[issue 66]][issue: #66]
326+
327+
[issue: #62]: https://github.com/jbotsim/JBotSim/issues/62
328+
[issue: #66]: https://github.com/jbotsim/JBotSim/issues/66
329+
11330
## [1.0.0] - 2019/02/28
12331

13332
This first official version introduces several changes. They are listed here.
@@ -445,5 +764,6 @@ have executed their onStart() method before that, you may simply call start()
445764
on your topology immediately followed by a call to pause().
446765
(Eventually we will provide an atomic call to this effect.)
447766

448-
[Unreleased]: https://github.com/acasteigts/JBotSim/compare/v1.0.0...develop
449-
[1.0.0]: https://github.com/acasteigts/JBotSim/compare/v1.0.0-beta03...v1.0.0
767+
[Unreleased]: https://github.com/acasteigts/JBotSim/compare/v1.1.0...develop
768+
[1.1.0]: https://github.com/acasteigts/JBotSim/compare/v1.0.0...v1.1.0
769+
[1.0.0]: https://github.com/acasteigts/JBotSim/compare/v1.0.0-beta03...v1.0.0

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,12 @@ Here is what happens during a release:
163163
1. The `release/x-y-z` release branch from `develop` by the release manager when it contains all features for next
164164
release (*e.g.* `release/1-0-0`).
165165
* The `x-y-z` version number is decided upon creation of the release branch.
166-
2. All tests, debugging, etc. are done on branch `release/x-y-z`.
166+
2. The new version number is applied to the project (with the [`bump-version.sh`](bump-version.sh) script).
167+
3. All tests, debugging, etc. are done on branch `release/x-y-z`.
167168
* This allows for new features to be merged into `develop` without interfering with the release.
168-
3. Branch `release/x-y-z` is merged into `master` after version `x-y-z` is officially published on Maven Central.
169-
4. The merge commit on the `master` branch is tagged `vx.y.z` (*e.g.* `v1.0.0`).
170-
5. After release, the new content of `master` is merged into `develop`.
169+
4. Branch `release/x-y-z` is merged into `master` after version `x-y-z` is officially published on Maven Central.
170+
5. The merge commit on the `master` branch is tagged `vx.y.z` (*e.g.* `v1.0.0`).
171+
6. After release, the new content of `master` is merged into `develop`.
171172
* This allows for developers on `develop` to benefit from fixes made during the release.
172173

173174
## Pull / Merge requests

0 commit comments

Comments
 (0)