Skip to content
Draft
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
20 changes: 10 additions & 10 deletions .github/workflows/SimPathsBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 19
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '19'
java-version: '25'
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package --file pom.xml
Expand All @@ -33,10 +33,10 @@ jobs:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 19
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '19'
java-version: '25'
distribution: 'temurin'
- name: Run integration tests
run: mvn verify
Expand All @@ -52,10 +52,10 @@ jobs:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 19
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '19'
java-version: '25'
distribution: 'temurin'
- uses: actions/download-artifact@v8
with:
Expand All @@ -74,10 +74,10 @@ jobs:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 19
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '19'
java-version: '25'
distribution: 'temurin'
- uses: actions/download-artifact@v8
with:
Expand All @@ -98,10 +98,10 @@ jobs:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 19
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '19'
java-version: '25'
distribution: 'temurin'
- uses: actions/download-artifact@v8
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up JDK 19
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '19'
java-version: '25'
distribution: 'temurin'
cache: maven

Expand All @@ -36,7 +36,7 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-version: 19
java-version: 25
target-folder: javadoc
project: maven

54 changes: 1 addition & 53 deletions documentation/wiki/developer-guide/internals/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,7 @@ To update the API documentation, add or modify Javadoc comments in the source co

[The workflow](https://github.com/simpaths/SimPaths/blob/develop/.github/workflows/publish-javadoc.yml) automates the generation and publishing of HTML documentation from Javadoc comments whenever changes are pushed to the `develop` branch.

```
on:
push:
branches:
- develop # Only publish when pushing to develop branch
```

The code is checked out from the `develop` branch, Java 19 is installed, and SimPaths is compiled.


```
jobs:
publish-javadoc:
runs-on: ubuntu-latest
permissions:
contents: write # Needed to push to the javadoc branch

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 19
uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'temurin'
cache: maven

- name: Build (optional if Javadoc needs compiled sources)
run: mvn -B compile --file pom.xml
```

The documentation is then generated from the Javadoc comments in the code.


```
- name: Generate Javadoc
run: mvn javadoc:javadoc --file pom.xml
```

Finally, the generated documentation is deployed to the `javadoc` branch of the SimPaths repository.


```
- name: Deploy Javadoc to branch
uses: MathieuSoysal/Javadoc-publisher.yml@v3.0.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-version: 19
target-folder: javadoc # Specifies the folder in which the documentation is saved
project: maven
```
The generated documentation is deployed to the `javadoc` branch of the SimPaths repository.

The published documentation is hosted using [GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site). GitHub Pages is a service that hosts static websites directly from a GitHub repository.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

### Prerequisites

- Java 19
- Maven 3.8+
- a [working environment](../../getting-started/environment-setup.md)
- Optional IDE: IntelliJ IDEA (import as a Maven project)

### Build and run
Expand Down Expand Up @@ -139,4 +138,4 @@ In our open-source project, we follow a clear and consistent branch naming conve
- `docs/documentation-topic`: Prefix documentation branches with `docs` for updating or creating documentation. For example, `docs/update-readme`.

These branch naming conventions are designed to make it easy for our contributors to understand the purpose of each branch and maintain consistency within our repository. Please adhere to these conventions when creating branches for your contributions.
-->
-->
2 changes: 1 addition & 1 deletion documentation/wiki/developer-guide/working-in-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
In this page, the various steps that are necessary to make changes to SimPaths and for them to be correctly implemented in the code and committed via GitHub (_i.e._, made available to other users) are explained.

**Requirements**
- a [working environment](../getting-started/environment-setup.md)
- GitHub account
- Java Development Kit (JDK)
- IDE (Integrated Development Environment)

In the following sections, explanatory screenshots are presented from both the GitHub browser and GitHub Desktop. While the latter is not required, GitHub Desktop provides a very user-friendly graphical user interface (GUI). It clearly visualises commits, branches, changes, and merge conflicts, and it is ideal for beginners or those who prefer not to use the command line. Additionally, it is designed for a quick setup and a seamless GitHub account integration. Thus, for the sake of contributing to SimPaths development, GitHub Desktop is a complete tool. However, it is not necessary; the user can entirely operate with the browser version in combination with the IDE or any other Git-integrated tool, _e.g._, GitKraken (GUI) or Git CLI (Command Line).
Expand Down
4 changes: 2 additions & 2 deletions documentation/wiki/getting-started/environment-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

## Requirements

- Java Development Kit (JDK) 19 (the project targets Java 19 — earlier versions will not compile)
- Apache Maven 3.8 or later
- Java Development Kit (JDK) 25 or later
- Apache Maven 3.9.16 or later
- Git

## Cloning the repository
Expand Down
11 changes: 2 additions & 9 deletions documentation/wiki/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@

This section walks you through everything needed to run SimPaths for the first time.

## Prerequisites

SimPaths is a Java project. Before running simulations you need:

- Java Development Kit (JDK) 19 or later
- Maven (for dependency management)
- The required input data files (see [Input Data](data/index.md))

## Steps
SimPaths is a Java project. Follow these steps to setup a working environment
and run simulations:

1. [Environment Setup](environment-setup.md) — install dependencies and clone the repository
2. [Input Data](data/index.md) — obtain the required UK input datasets
Expand Down
40 changes: 17 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,20 @@
<artifactId>model</artifactId>
<version>1.0.0</version>
<properties>
<maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>19</source>
<target>19</target>
</configuration>
<version>3.15.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<version>3.5.6</version>
<configuration>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
Expand All @@ -30,7 +27,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.2</version>
<version>3.5.6</version>
<configuration>
<includes>
<include>**/*IntegrationTest.java</include>
Expand All @@ -48,7 +45,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<version>3.6.2</version>
<executions>
<execution>
<id>build-single</id>
Expand Down Expand Up @@ -108,27 +105,25 @@
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version> <!-- Use the latest version available -->
<version>1.11.0</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.29</version> <!-- Use the latest version available -->
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.github.jasmineRepo</groupId>
<artifactId>JAS-mine-core</artifactId>
<version>4.3.25</version>
<version>d179a02f8e5c2c00009ec812a09e383f5a5285c4</version> <!--JASMINE-->
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -148,7 +143,6 @@
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.miglayout/miglayout -->
<dependency>
<groupId>com.miglayout</groupId>
<artifactId>miglayout</artifactId>
Expand All @@ -157,52 +151,52 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.1.0</version>
<version>26.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.1</version>
<version>6.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.10.0</version>
<version>1.14.1</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.9</version>
<version>5.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.17.1</version>
<version>2.26.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
<version>2.26.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.10.0</version>
<version>5.23.0</version>
<scope>test</scope>
</dependency>
<!-- Mockito JUnit 5 Integration (Required for @Mock and extensions) -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.10.0</version>
<version>5.23.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.17.8</version> <!-- Latest available -->
<version>1.18.10</version>
</dependency>
</dependencies>
<repositories>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/simpaths/experiment/SimPathsCollector.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
import microsim.statistics.functions.*;
// import plug-in packages
import org.apache.commons.math3.util.Pair;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

// import JAS-mine packages
import microsim.annotation.GUIparameter;
Expand Down Expand Up @@ -48,7 +49,7 @@
public class SimPathsCollector extends AbstractSimulationCollectorManager implements EventListener {

// default simulation parameters
private static Logger log = Logger.getLogger(SimPathsCollector.class);
private static Logger log = LogManager.getLogger(SimPathsCollector.class);

@GUIparameter(description="Calculate the Gini coefficients of income (also displayed in charts)")
private boolean calculateGiniCoefficients = false;
Expand Down
Loading
Loading