Skip to content

Commit

Permalink
Merge branch 'master' into feat/slice_intersect_multi_series
Browse files Browse the repository at this point in the history
  • Loading branch information
ymatzkevich committed Nov 12, 2024
2 parents 9be5adb + d909589 commit b6f6812
Show file tree
Hide file tree
Showing 178 changed files with 4,963 additions and 2,681 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[bumpversion]
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)|dev
current_version = 0.30.0
current_version = 0.31.0

[bumpversion:file:setup.py]

Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
38cc6712a6f701703074a7a7c82ce0252fe869ee
# Fix last isort issues and update Black to 22.1.0
8158d3eaef9d9f6e04f219b029e306d1f1be46d5
# Change Python target-version to 3.9 and update Ruff to 0.7.2
18e2e3fd7d82d239ab24807fcc1033094ea09940
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Steps to reproduce the behavior, preferably code snippet.
A clear and concise description of what you expected to happen.

**System (please complete the following information):**
- Python version: [e.g. 3.8]
- darts version [e.g. 0.24.0]
- Python version: [e.g. 3.10]
- darts version [e.g. 0.31.0]

**Additional context**
Add any other context about the problem here.
202 changes: 111 additions & 91 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,75 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "Clone repository"
uses: actions/checkout@v4

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "Install Dev Dependencies"
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: "4. Lint"
- name: "Lint"
run: |
./gradlew lint
pre-commit run --all-files
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ['3.9']
python-version: ['3.10']
flavour: ['all']

steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "Clone repository"
uses: actions/checkout@v4

- name: "2. Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v1
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
if [ "${{ matrix.os }}" == "macos-13" ]; then
source $HOME/.local/bin/env
fi
uv pip compile requirements/dev-all.txt > requirements-latest.txt
- name: "Cache python environment"
uses: actions/cache@v4
id: pythonenv-cache
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt', 'requirements-latest.txt') }}

- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "Setup Pip"
run: |
python -m pip install --upgrade pip
- name: "4. Setup pip"
- name: "Install Dependencies"
run: |
./gradlew installPipLatest
# install latest dependencies (potentially updating cached dependencies)
pip install -U -r requirements/dev-all.txt
- name: "5. Install libomp (for LightGBM)"
- name: "Install libomp (for LightGBM)"
run: |
./.github/scripts/libomp-${{ runner.os }}.sh
- name: "6. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: tests-${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements-latest.txt') }}

- name: "7. Tests"
- name: "Run tests"
run: |
./gradlew "test_${{matrix.flavour}}"
pytest --durations=50 --cov=darts --cov-config=.coveragerc --cov-report=xml darts/tests
- name: "8. Codecov upload"
- name: "Codecov upload"
if: ${{ matrix.flavour == 'all' }}
uses: codecov/codecov-action@v4
with:
Expand All @@ -93,73 +87,99 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "Clone repository"
uses: actions/checkout@v4

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

- name: "3. Install pandoc"
# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
run: |
sudo apt-get install -y pandoc
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip compile requirements/dev-all.txt > requirements-latest.txt
# downloading gradle multiple times in parallel can yield to connection errors
- name: "4. Cache gradle distribution"
uses: actions/cache@v2
# only restore cache but do not upload
- name: "Restore cached python environment"
uses: actions/cache/restore@v4
id: pythonenv-cache
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt', 'requirements-latest.txt') }}

- name: "4.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "Install pandoc"
run: |
sudo apt-get install -y pandoc
- name: "5. Setup pip"
- name: "Setup Pip"
run: |
./gradlew setupPip
python -m pip install --upgrade pip
- name: "6. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: tests-${{ runner.os }}-3.9-pip-${{ hashFiles('requirements/core.txt', 'requirements/release.txt') }}
- name: "Install Dependencies"
run: |
# install latest dependencies (potentially updating cached dependencies)
pip install -U -r requirements/dev-all.txt
- name: "7. Build docs"
- name: "Install libomp (for LightGBM)"
run: |
./gradlew buildDocs
./.github/scripts/libomp-${{ runner.os }}.sh
- name: "Install Locally"
run: |
pip install .
- name: "Build docs"
run: |
make --directory ./docs build-all-docs
check-examples:
runs-on: ubuntu-latest
strategy:
matrix:
example-name: [03-FFT-examples.ipynb, 04-RNN-examples.ipynb, 00-quickstart.ipynb, 02-data-processing.ipynb, 01-multi-time-series-and-covariates.ipynb]
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "Clone repository"
uses: actions/checkout@v4

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip compile requirements/dev-all.txt > requirements-latest.txt
- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
# only restore cache but do not upload
- name: "Restore cached python environment"
uses: actions/cache/restore@v4
id: pythonenv-cache
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt', 'requirements-latest.txt') }}

- name: "Setup Pip"
run: |
python -m pip install --upgrade pip
- name: "Install Dependencies"
run: |
# install latest dependencies (potentially updating cached dependencies)
pip install -U -r requirements/dev-all.txt
- name: "Install libomp (for LightGBM)"
run: |
./.github/scripts/libomp-${{ runner.os }}.sh
- name: "Install Locally"
run: |
pip install .
- name: "4. Run examples ${{matrix.example-name}}"
- name: "Run example ${{matrix.example-name}}"
working-directory: ./examples
run: |
./gradlew checkExample -PexampleName=${{matrix.example-name}}
papermill ${{matrix.example-name}} ${{matrix.example-name}}
65 changes: 35 additions & 30 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,54 @@ jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "Clone repository"
uses: actions/checkout@v4

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

- name: "3. Install pandoc"
# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
run: |
sudo apt-get install -y pandoc
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip compile requirements/dev-all.txt > requirements-latest.txt
# downloading gradle multiple times in parallel can yield to connection errors
- name: "4. Cache gradle distribution"
uses: actions/cache@v2
# only restore cache but do not upload
- name: "Restore cached python environment"
uses: actions/cache/restore@v4
id: pythonenv-cache
with:
path: ~/.gradle/wrapper/dists
key: release-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt', 'requirements-latest.txt') }}

- name: "4.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: release-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "Install pandoc"
run: |
sudo apt-get install -y pandoc
- name: "5. Setup pip"
- name: "Setup Pip"
run: |
./gradlew setupPip
python -m pip install --upgrade pip
- name: "6. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: release-${{ runner.os }}-pip-${{ hashFiles('requirements/core.txt', 'requirements/release.txt') }}
restore-keys: |
release-${{ runner.os }}-pip-
- name: "Install Dependencies"
run: |
# install latest dependencies (potentially updating cached dependencies)
pip install -U -r requirements/dev-all.txt
- name: "Install libomp (for LightGBM)"
run: |
./.github/scripts/libomp-${{ runner.os }}.sh
- name: "Install Locally"
run: |
pip install .
- name: "7. Build docs"
- name: "Build docs"
run: |
./gradlew buildDocs
make --directory ./docs build-all-docs
- name: "8. Publish documentation to gh-pages"
- name: "Publish documentation to gh-pages"
uses: s0/[email protected]
env:
REPO: self
Expand Down
Loading

0 comments on commit b6f6812

Please sign in to comment.