Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Nov 23, 2023
2 parents 7dfff7f + 86c373a commit 32fea60
Show file tree
Hide file tree
Showing 681 changed files with 3,554 additions and 1,622 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check links in documentation

on:
push:
paths:
- '.github/workflows/check-links.yml'
- 'lychee.toml'
- '**/*.md'
schedule:
# Run on the first of each month at 9:00 AM
- cron: "0 9 1 * *"
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref }}"
cancel-in-progress: true

jobs:
lychee:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Check links
id: lychee
uses: lycheeverse/[email protected]
with:
fail: true
args: --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md'
2 changes: 1 addition & 1 deletion .github/workflows/java-ea-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 20 ]
java: [ 21 ]
os: [ ubuntu-latest ]

name: JDK${{ matrix.java }} on ${{ matrix.os }}
Expand Down
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.2.0] - 2023-11-23

### Changed

- ![STAT] Move seasonal component from incubator to main
- ![OTHER] Set explicit declaration of extension points
- ![OTHER] Set explicit declaration of interchangeable processors

### Fixed

- ![STAT] Fix TsData aggregation on limited data
- ![STAT] Correct raw figures for trading days effects
- ![UI] Fix action IDs to prevent conflicts
- ![IO] Fix date format in multi-document export to VTable CSV [#156](https://github.com/jdemetra/jdplus-main/issues/156)

### Added

- ![STAT] Generate forecasts in univariate state space models
- ![OTHER] Add R facilities for time series providers

## [3.1.1] - 2023-10-11

### Fixed
Expand Down Expand Up @@ -70,7 +90,8 @@ Install instructions are available at https://github.com/jdemetra/jdplus-main#in
This is the **initial release** of JDemetra+ v3.0.0.
[Java SE 17 or later](https://whichjdk.com/) version is required to run it.

[Unreleased]: https://github.com/jdemetra/jd3-main/compare/v3.1.1...HEAD
[Unreleased]: https://github.com/jdemetra/jd3-main/compare/v3.2.0...HEAD
[3.2.0]: https://github.com/jdemetra/jd3-main/compare/v3.1.1...v3.2.0
[3.1.1]: https://github.com/jdemetra/jd3-main/compare/v3.1.0...v3.1.1
[3.1.0]: https://github.com/jdemetra/jd3-main/compare/v3.0.2...v3.1.0
[3.0.2]: https://github.com/jdemetra/jd3-main/compare/v3.0.1...v3.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import nbbrd.design.Development;
import nbbrd.design.RepresentableAsInt;
import org.checkerframework.checker.nullness.qual.NonNull;
import lombok.NonNull;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package jdplus.sa.base.api;

import jdplus.toolkit.base.api.design.ExtensionPoint;
import jdplus.toolkit.base.api.processing.ProcDiagnostic;
import java.util.Comparator;
import java.util.List;
Expand All @@ -32,6 +33,7 @@
* @param <C> Configuration
* @param <R> Result
*/
@ExtensionPoint
@ServiceDefinition(quantifier = Quantifier.MULTIPLE, mutability = Mutability.NONE, singleton = true)
public interface SaDiagnosticsFactory<C extends DiagnosticsConfiguration, R> extends DiagnosticsFactory<C, R> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package jdplus.sa.base.api;

import jdplus.toolkit.base.api.design.ExtensionPoint;
import jdplus.toolkit.base.api.information.Explorable;
import jdplus.toolkit.base.api.processing.OutputFactory;
import nbbrd.service.Mutability;
Expand All @@ -27,6 +28,7 @@
* @author PALATEJ
* @param <R> Output
*/
@ExtensionPoint
@ServiceDefinition(quantifier = Quantifier.MULTIPLE, mutability = Mutability.NONE, singleton = true)
public interface SaOutputFactory<R extends Explorable> extends OutputFactory<R> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package jdplus.sa.base.api;

import jdplus.toolkit.base.api.design.ExtensionPoint;
import jdplus.toolkit.base.api.processing.ProcDiagnostic;
import jdplus.toolkit.base.api.timeseries.TsDomain;
import java.util.List;
Expand All @@ -32,6 +33,7 @@
* @param <I> Specification
* @param <R> Output
*/
@ExtensionPoint
@ServiceDefinition(quantifier = Quantifier.MULTIPLE, mutability = Mutability.NONE, singleton = true)
public interface SaProcessingFactory<I extends SaSpecification, R extends Explorable> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import jdplus.toolkit.base.api.arima.SarimaOrders;
import jdplus.toolkit.base.api.data.DoubleSeq;
import jdplus.toolkit.base.api.design.Algorithm;
import jdplus.toolkit.base.api.design.InterchangeableProcessor;
import jdplus.toolkit.base.api.stats.OneWayAnova;
import jdplus.toolkit.base.api.stats.StatisticalTest;
import nbbrd.service.Mutability;
Expand Down Expand Up @@ -69,6 +70,7 @@ public StatisticalTest fTest(DoubleSeq data, int period, SarimaOrders.Prespecifi
return getFactory().fTest(data, period, model);
}

@InterchangeableProcessor
@Algorithm
@ServiceDefinition(quantifier = Quantifier.SINGLE, mutability = Mutability.CONCURRENT, noFallback = true)
public static interface Factory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import jdplus.toolkit.base.core.ssf.univariate.ISsf;
import jdplus.toolkit.base.core.ssf.univariate.SsfData;
import static jdplus.toolkit.base.core.timeseries.simplets.TsDataToolkit.multiply;
import org.checkerframework.checker.nullness.qual.NonNull;
import lombok.NonNull;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.checkerframework.checker.nullness.qual.NonNull;
import lombok.NonNull;
import jdplus.toolkit.base.api.processing.Diagnostics;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.checkerframework.checker.nullness.qual.NonNull;
import lombok.NonNull;
import jdplus.toolkit.base.api.processing.Diagnostics;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import jdplus.toolkit.base.core.regarima.diagnostics.OutOfSampleDiagnosticsConfiguration;
import jdplus.toolkit.base.core.regarima.diagnostics.OutOfSampleDiagnosticsFactory;
import jdplus.toolkit.base.core.regarima.tests.OneStepAheadForecastingTest;
import org.checkerframework.checker.nullness.qual.NonNull;
import lombok.NonNull;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
import jdplus.toolkit.base.core.regsarima.regular.IModelBuilder;
import jdplus.toolkit.base.core.regsarima.regular.ModelDescription;
import jdplus.toolkit.base.core.timeseries.simplets.TsDataToolkit;
import org.checkerframework.checker.nullness.qual.NonNull;
import lombok.NonNull;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-csv</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public boolean write(List<TsData> coll, List<String> names, Writer writer) throw
}

for (int j = 0; j < ndata; ++j) {
writer.write(domain.get(j).toString());
writer.write(domain.get(j).start().toLocalDate().format(DateTimeFormatter.ISO_DATE));
for (int i = 0; i < nseries; ++i) {
writer.write(comma);
cursor.moveTo(j, i);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package jdplus.sa.base.csv;

import jdplus.toolkit.base.api.timeseries.TsData;
import nbbrd.design.MightBePromoted;
import nbbrd.io.function.IOConsumer;
import org.junit.jupiter.api.Test;
import tck.demetra.data.DataGenerator;

import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.util.List;

import static org.assertj.core.api.Assertions.assertThat;

public class TsCollectionCsvFormatterTest {

@Test
public void testWriteVTable() throws IOException {
TsCollectionCsvFormatter x = new TsCollectionCsvFormatter();
x.setPresentation(CsvLayout.VTable);

assertThat(writeToString(w -> x.write(List.of(), List.of(), w)))
.isEmpty();

assertThat(writeToString(w -> x.write(List.of(TsData.empty("no data")), List.of("S1"), w)))
.isEmpty();

assertThat(writeToString(w -> x.write(DataGenerator.BY_INDEX.listOfTsData("R0/2010-01-01T00:00:00/P1M", "R3/2010-01-01T00:00:00/P1M", "R1/2010-01-01T00:00:00/P3M"), List.of("S1", "S2", "S3"), w)))
.isEqualToNormalizingNewlines(
"""
,S1,S2,S3
2010-01-01,,1.1,
2010-02-01,,2.2,
2010-03-01,,3.3,1.1
"""
);
}

@Test
public void testWriteHTable() throws IOException {
TsCollectionCsvFormatter x = new TsCollectionCsvFormatter();
x.setPresentation(CsvLayout.HTable);

assertThat(writeToString(w -> x.write(List.of(), List.of(), w)))
.isEmpty();

assertThat(writeToString(w -> x.write(List.of(TsData.empty("no data")), List.of("S1"), w)))
.isEmpty();

assertThat(writeToString(w -> x.write(DataGenerator.BY_INDEX.listOfTsData("R0/2010-01-01T00:00:00/P1M", "R3/2010-01-01T00:00:00/P1M", "R1/2010-01-01T00:00:00/P3M"), List.of("S1", "S2", "S3"), w)))
.isEqualToNormalizingNewlines(
"""
,2010-01-01,2010-02-01,2010-03-01
S1,,,
S2,1.1,2.2,3.3
S3,,,1.1
"""
);
}

@Test
public void testWriteList() throws IOException {
TsCollectionCsvFormatter x = new TsCollectionCsvFormatter();
x.setPresentation(CsvLayout.List);

assertThat(writeToString(w -> x.write(List.of(), List.of(), w)))
.isEmpty();

assertThat(writeToString(w -> x.write(List.of(TsData.empty("no data")), List.of("S1"), w)))
.isEqualToIgnoringNewLines("S1,1,1970,1,0");

assertThat(writeToString(w -> x.write(DataGenerator.BY_INDEX.listOfTsData("R0/2010-01-01T00:00:00/P1M", "R3/2010-01-01T00:00:00/P1M", "R1/2010-01-01T00:00:00/P3M"), List.of("S1", "S2", "S3"), w)))
.isEqualToNormalizingNewlines(
"""
S1,12,2010,1,0
S2,12,2010,1,3,1.1,2.2,3.3
S3,4,2010,1,1,1.1
"""
);
}

@MightBePromoted
private static String writeToString(IOConsumer<? super Writer> consumer) throws IOException {
StringWriter writer = new StringWriter();
consumer.acceptWithIO(writer);
return writer.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-information</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package jdplus.sa.base.information;

import jdplus.toolkit.base.api.DemetraVersion;
import jdplus.toolkit.base.api.design.ExtensionPoint;
import jdplus.toolkit.base.api.information.InformationSet;
import jdplus.sa.base.api.SaSpecification;
import jdplus.toolkit.base.api.timeseries.TsDomain;
Expand All @@ -18,6 +19,7 @@
*
* @author PALATEJ
*/
@ExtensionPoint
@ServiceDefinition(quantifier = Quantifier.MULTIPLE, mutability = Mutability.NONE, singleton = true)
public interface SaSpecificationMapping{
SaSpecification read(InformationSet info, TsDomain context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-protobuf</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-r</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-workspace</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>eu.europa.ec.joinup.sat</groupId>
<artifactId>jdplus-sa-base-parent</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</parent>

<artifactId>jdplus-sa-base-xml</artifactId>
Expand Down
Loading

0 comments on commit 32fea60

Please sign in to comment.