Skip to content

Commit

Permalink
Merge pull request #1 from ML-KULeuven/setup-github
Browse files Browse the repository at this point in the history
Setup GitHub
  • Loading branch information
LouisCarpentier42 authored Oct 8, 2024
2 parents bcd6aed + 5bb9964 commit 6feb43e
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 218 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
151 changes: 0 additions & 151 deletions .gitlab-ci.yml

This file was deleted.

9 changes: 1 addition & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,15 @@ build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: requirements.txt
- requirements: requirements-dev.txt
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.

## Latest

In this release, all files were transferred from GitLab to GitHub. Therefore,
older links may no longer function as desired.

### Added

### Changed
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Dtaianomaly for Time Series Anomaly Detection

[![pipeline status](https://gitlab.kuleuven.be/u0143709/dtaianomaly/badges/main/pipeline.svg)](https://gitlab.kuleuven.be/u0143709/dtaianomaly/-/pipelines)
[![coverage report](https://gitlab.kuleuven.be/u0143709/dtaianomaly/badges/main/coverage.svg)](https://gitlab.kuleuven.be/u0143709/dtaianomaly/-/commits/main)
[![Latest Release](https://gitlab.kuleuven.be/u0143709/dtaianomaly/-/badges/release.svg)](https://gitlab.kuleuven.be/u0143709/dtaianomaly/-/releases)
[![PyPi Version](https://img.shields.io/pypi/v/dtaianomaly.svg)](https://pypi.org/project/dtaianomaly/)
[![Downloads](https://static.pepy.tech/badge/dtaianomaly)](https://pepy.tech/project/dtaianomaly)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/dtaianomaly)](https://pypi.python.org/pypi/dtaianomaly/)
[![PyPI license](https://img.shields.io/pypi/l/dtaianomaly.svg)](https://pypi.python.org/pypi/dtaianomaly/)

A simple-to-use Python package for the development and analysis of time series anomaly
detection techniques. Here we describe the main usage of `dtaianomaly`, but be sure to
check out the [documentation](https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/index.html)
check out the [documentation](https://dtaianomaly.readthedocs.io/en/stable/index.html)
for more information.

## Installation

The preferred way to install `dtaianomaly` is via PyPi. See the [documentation](https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/installation.html) for more options.
The preferred way to install `dtaianomaly` is via PyPi. See the [documentation](https://dtaianomaly.readthedocs.io/en/stable/index.html)
for more options.
```
pip install dtaianomaly
```
Expand All @@ -23,18 +22,18 @@ pip install dtaianomaly

The three key features of `dtaianomaly` are as follows:
1. State-of-the-art time series anomaly detection via a simple API.
[Learn more!](https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/anomaly_detection.html)
[Learn more!](https://dtaianomaly.readthedocs.io/en/stable/getting_started/anomaly_detection.html)
2. Develop custom models for anomaly detection.
[Learn more!](https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/custom_models.html)
[Learn more!](https://dtaianomaly.readthedocs.io/en/stable/getting_started/custom_models.html)
3. Quantitative evaluation of time series anomaly detection.
[Learn more!](https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/quantitative_evaluation.html)
[Learn more!](https://dtaianomaly.readthedocs.io/en/stable/getting_started/quantitative_evaluation.html)

## Example

Below code shows a simple example of `dtaianomaly`, which is part of the
[anomaly detection notebook](notebooks/Anomaly-detection.ipynb). More examples
are provided in the [other notebooks](notebooks) and in the
[documentation](https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/anomaly_detection.html).
[documentation](https://dtaianomaly.readthedocs.io/en/stable/index.html).

```python
from dtaianomaly.data import demonstration_time_series
Expand All @@ -56,7 +55,7 @@ detector.fit(X_)
decision_scores = detector.decision_function(X_)
anomaly_probabilities = detector.predict_proba(X_)
```
![Anomaly scores](https://gitlab.kuleuven.be/u0143709/dtaianomaly/-/raw/main/notebooks/Demonstration-time-series-detected-anomalies.svg?inline=false)
![Demonstration-time-series-detected-anomalies.svg](notebooks%2FDemonstration-time-series-detected-anomalies.svg)

## Contact

Expand Down
2 changes: 1 addition & 1 deletion data/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ described on this page.

.. note::
You can also read custom data by implementing a custom :py:class:`~dtaianomaly.data.LazyDataLoader`,
as described in the `documentation <https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/custom_models.html#custom-data-loader>`_.
as described in the `documentation <https://dtaianomaly.readthedocs.io/en/stable/index.html>`_.

Synthetic data
--------------
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/anomaly_detection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ be detected in time series using ``dtaianomaly``.

.. note::
Some of the code has not been added to this webpage for clarity reasons. The full
code can be found in the `anomaly detection notebook <https://gitlab.kuleuven.be/u0143709/dtaianomaly/-/raw/main/notebooks/Anomaly-detection.ipynb>`_.
code can be found in the `anomaly detection notebook <https://github.com/ML-KULeuven/dtaianomaly/blob/main/notebooks/Anomaly-detection.ipynb>`_.

Load the data
-------------
Expand Down Expand Up @@ -41,7 +41,7 @@ of the noise from the time series.
from dtaianomaly.preprocessing import MovingAverage
preprocessor = MovingAverage(window_size=10)
In general, `any anomaly detector <https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/api/anomaly_detection.html>`_
In general, `any anomaly detector <https://dtaianomaly.readthedocs.io/en/stable/api/anomaly_detection.html>`_
in ``dtaianomaly`` can be used to detect anomalies in this time series. Here, we use the
:py:class:`~dtaianomaly.anomaly_detection.MatrixProfileDetector`

Expand Down
16 changes: 8 additions & 8 deletions docs/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@ To install version ``X.Y.Z``, use the following command:
pip install dtaianomaly==X.Y.Z
From GitLab
From GitHub
-----------

It is also possible to install ``dtaianomaly`` directly from `GitLab`_:
It is also possible to install ``dtaianomaly`` directly from `GitHub`_:

.. code-block:: bash
pip install git+https://gitlab.kuleuven.be/m-group-campus-brugge/dtai_public/dtaianomaly
pip install git+https://github.com/ML-KULeuven/dtaianomaly
Note that this will install the latest, *unreleased* version. Similarly as installation
through PyPi, it is also possible to install version ``X.Y.Z`` as follows:

.. code-block:: bash
pip install git+https://gitlab.kuleuven.be/m-group-campus-brugge/dtai_public/[email protected]
pip install git+https://github.com/ML-KULeuven/[email protected]
See the `release page <https://gitlab.kuleuven.be/m-group-campus-brugge/dtai_public/dtaianomaly/-/releases>`_
See the `release page <https://github.com/ML-KULeuven/dtaianomaly/releases>`_
for more information regarding the different versions.


From source
-----------

Finally, it is also possible to install ``dtaianomaly`` from the source code. First
download the source from `GitLab`_.
download the source from `GitHub`_.
It is also possible to download the source code for a specific release on
`this webpage <https://gitlab.kuleuven.be/m-group-campus-brugge/dtai_public/dtaianomaly/-/releases>`_.
`this webpage <https://github.com/ML-KULeuven/dtaianomaly/releases>`_.
Unzip the files, and navigate to the root directory of the repository in the terminal.
Then, ``dtaianomaly`` can be installed through the following command:

.. code-block:: bash
pip install .
.. _GitLab: https://gitlab.kuleuven.be/m-group-campus-brugge/dtai_public/dtaianomaly
.. _GitHub: https://github.com/ML-KULeuven/dtaianomaly
4 changes: 2 additions & 2 deletions docs/getting_started/quantitative_evaluation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ There are two ways to run a :py:class:`~dtaianomaly.workflow.Workflow`: from :re
or from a :ref:`configuration file <with-config>`.

.. note::
You can also evaluate `custom components <https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/custom_models.html>`_
You can also evaluate `custom components <https://dtaianomaly.readthedocs.io/en/stable/getting_started/custom_models.html>`_
in ``dtaianomaly`` via a :py:class:`~dtaianomaly.workflow.Workflow` in :ref:`Python <with-code>`. However,
this is not possible via a :ref:`configuration file <with-config>` without extending the functionality of
the :py:func:`~dtaianomaly.workflow.workflow_from_config` function!
Expand Down Expand Up @@ -138,5 +138,5 @@ Below, we show a simplified version of the configuration in `Config.json`_.
:language: json
:tab-width: 4

.. _Config.json: https://gitlab.kuleuven.be/m-group-campus-brugge/dtai_public/dtaianomaly/-/blob/main/notebooks/Config.json
.. _Config.json: https://github.com/ML-KULeuven/dtaianomaly/blob/main/notebooks/Config.json

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ state-of-the-art methods. Additionally, ``dtaianomaly`` provides a benchmark fra
quantitatively evaluate time series anomaly detection methods on a large repository of
time series.

The source is available on `GitLab <https://gitlab.kuleuven.be/m-group-campus-brugge/dtai_public/dtaianomaly>`_.
The source is available on `GitHub <https://github.com/ML-KULeuven/dtaianomaly>`_.

.. toctree::
:maxdepth: 1
Expand Down
2 changes: 1 addition & 1 deletion dtaianomaly/anomaly_detection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>>> from dtaianomaly import anomaly_detection
We refer to the `documentation <https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/anomaly_detection.html>`_
We refer to the `documentation <https://dtaianomaly.readthedocs.io/en/stable/getting_started/anomaly_detection.html>`_
for more information regarding detecting anomalies using ``dtaianomaly``.
"""

Expand Down
2 changes: 1 addition & 1 deletion dtaianomaly/workflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
... metrics=[AreaUnderROC(), AreaUnderPR()]
... )
We refer to the `documentation <https://m-group-campus-brugge.pages.gitlab.kuleuven.be/dtai_public/dtaianomaly/getting_started/quantitative_evaluation.html>`_
We refer to the `documentation <https://dtaianomaly.readthedocs.io/en/stable/getting_started/quantitative_evaluation.html>`_
for more information regarding the configuration and use of a Workflow.
"""

Expand Down
Loading

0 comments on commit 6feb43e

Please sign in to comment.