Skip to content

Commit 4c5d883

Browse files
committed
[docu] Add guidelines chapter + add missing algorithms to inheritance diagram
1 parent bea5ca3 commit 4c5d883

8 files changed

Lines changed: 86 additions & 15 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Contributions are always welcome. Before creating [Pull Requests](https://github.com/52North/WeatherRoutingTool/pulls) or commenting [Issues](https://github.com/52North/WeatherRoutingTool/issues) please carefully read the [Contributing](https://52north.github.io/WeatherRoutingTool/source/contributing.html) section in our documentation.
1+
Contributions are always welcome. Before creating [Pull Requests](https://github.com/52North/WeatherRoutingTool/pulls) or commenting [Issues](https://github.com/52North/WeatherRoutingTool/issues) please carefully read the [Contributing](https://52north.github.io/WeatherRoutingTool/source/guidelines/contribution_guidelines.html) section in our documentation.
22

33
Please do not ask if you can work on an issue. Just re-read our documentation and remember that contributions are welcome! Also be aware that we do not assign issues to contributors we have not worked with yet. If this applies to you please do not ask to be assigned.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Welcome to the documentation of the 52°North Weather Routing Tool (WRT)!
1818
source/sequence_diagrams
1919
source/api-documentation/index
2020
source/conventions
21-
source/contributing
21+
source/guidelines/index
2222
source/references
2323

2424
Indices and tables

docs/source/contributing.rst renamed to docs/source/guidelines/coding_guidelines.rst

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
.. _contributing:
2-
3-
Contribution Guidelines
4-
=======================
5-
6-
Before getting involved please carefully read our `documentation for Open Source Software contributions <https://52north.org/software/contribute/>`_.
7-
Be aware that we can only consider pull requests of authors who consider 52North's `CLA guidelines <https://52north.org/software/licensing/cla-guidelines/>`_ and, in particular, fill the 52North Contributor License Agreement.
8-
9-
General remarks
10-
---------------
11-
12-
- Please do not ask if you can work on an issue. Contributions are welcome. Remember to read the `CLA guidelines <https://52north.org/software/licensing/cla-guidelines/>`_.
13-
- Be aware that we do not assign issues to contributors we have not worked with yet. If this applies to you please do not ask to be assigned.
1+
.. _coding_guidelines:
142

153
Coding Guidelines
164
=================
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. _contribution_guidelines:
2+
3+
4+
Contribution Guidelines
5+
=======================
6+
7+
Before getting involved please carefully read our `documentation for Open Source Software contributions <https://52north.org/software/contribute/>`_.
8+
Be aware that we can only consider pull requests of authors who consider 52North's `CLA guidelines <https://52north.org/software/licensing/cla-guidelines/>`_ and, in particular, fill the 52North Contributor License Agreement.
9+
10+
General remarks
11+
---------------
12+
13+
- Please do not ask if you can work on an issue. Contributions are welcome. Remember to read the `CLA guidelines <https://52north.org/software/licensing/cla-guidelines/>`_.
14+
- Be aware that we do not assign issues to contributors we have not worked with yet. If this applies to you please do not ask to be assigned.

docs/source/guidelines/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. guidelines:
2+
3+
Guidelines
4+
==========
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:caption: Contents:
9+
10+
contribution_guidelines
11+
coding_guidelines
12+
software_profiling
13+
tests
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. _software_profiling:
2+
3+
4+
Software profiling
5+
==================
6+
7+
8+
Runtime monitoring
9+
------------------
10+
11+
The runtime can be analyzed using `cProfile <https://docs.python.org/3/library/profile.html#module-cProfile>`_ from Python's standard library.
12+
13+
To do this add the following code lines in `execute_routing.py <https://github.com/52North/WeatherRoutingTool/blob/main/WeatherRoutingTool/execute_routing.py>`_:
14+
15+
.. code-block:: python
16+
17+
import cProfile
18+
19+
def execute_routing(config, ship_config):
20+
prof = cProfile.Profile()
21+
prof.enable()
22+
23+
...
24+
25+
prof.disable()
26+
prof.dump_stats('wrt_run.prof')
27+
28+
The result can be visualized using `snakeviz <https://jiffyclub.github.io/snakeviz/>`_:
29+
30+
.. code-block:: shell
31+
32+
snakeviz wrt_run.prof
33+
34+
Memory monitoring
35+
-----------------
36+
37+
TBD

docs/source/guidelines/tests.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _tests:
2+
3+
4+
Tests
5+
=====
6+
7+
Install test dependencies:
8+
9+
.. code-block:: shell
10+
11+
pip install -r requirements.test.txt
12+
13+
Run tests with pytest:
14+
15+
.. code-block:: shell
16+
17+
pytest tests/

docs/source/inheritance_diagrams.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Algorithm Classes
1010
The routing algorithms follow a clear inheritance pattern with ``RoutingAlg`` as the base class:
1111

1212
.. inheritance-diagram::
13+
WeatherRoutingTool.algorithms.dijkstra
14+
WeatherRoutingTool.algorithms.gcrslider
1315
WeatherRoutingTool.algorithms.genetic
1416
WeatherRoutingTool.algorithms.isobased
1517
WeatherRoutingTool.algorithms.isochrone

0 commit comments

Comments
 (0)