Skip to content

Commit 6d8a543

Browse files
Julien RousselJulien Roussel
authored andcommitted
merged
2 parents ac1460a + 6172129 commit 6d8a543

38 files changed

+1843
-427
lines changed

.bumpversion.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[bumpversion]
2+
current_version = 0.0.5
3+
commit = True
4+
tag = True
5+
6+
[bumpversion:file:setup.py]
7+
search = VERSION = "{current_version}"
8+
replace = VERSION = "{new_version}"
9+
10+
[bumpversion:file:qolmat/_version.py]
11+
search = __version__ = "{current_version}"
12+
replace = __version__ = "{new_version}"
13+
14+
[bumpversion:file:docs/conf.py]
15+
search = version = "{current_version}"
16+
replace = version = "{new_version}"

.flake8

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[flake8]
2+
exclude = .git,__pycache__,.vscode,tests
3+
max-line-length=99
4+
ignore=E302,E305,W503,E203,E731,E402,E501,E266,E712,F401,F821
5+
indent-size = 4
6+
per-file-ignores=
7+
qolmat/imputations/imputers.py:F401
8+
*/__init__.py:F401
9+
examples/test.py:F401

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Package on PYPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
8+
jobs:
9+
deploy:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v3
17+
with:
18+
python-version: '3.10'
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install setuptools wheel twine
23+
- name: Build package
24+
run: python setup.py sdist bdist_wheel
25+
- name: Publish package
26+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Unit test Qolmat
2+
3+
on: [push, pull_request,workflow_dispatch]
4+
5+
6+
jobs:
7+
build-linux:
8+
runs-on: ${{matrix.os}}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest,windows-latest]
12+
python-version: [3.8,3.9]
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
steps:
18+
- name: Git clone
19+
uses: actions/checkout@v3
20+
- name: Set up venv for ci
21+
uses: conda-incubator/setup-miniconda@v2
22+
with:
23+
python-version: ${{matrix.python-version}}
24+
channels: default, conda-forge
25+
- name: Lint with flake8
26+
run: |
27+
conda install flake8
28+
flake8
29+
- name: Test with pytest
30+
run: |
31+
conda install pytest
32+
#pytest
33+
echo you should uncomment pytest and delete this line
34+
- name: typing with mypy
35+
run: |
36+
#mypy qolmat
37+
echo you should uncomment mypy qolmat and delete this line

.gitignore

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,67 @@
1-
__pycache__/
2-
.pyc
3-
.DS_Store
4-
.ipynb_checkpoints
1+
#Ignore Data file
52
/data
3+
4+
# Figures
65
/figures
76
qolmat/notebooks/figures
7+
8+
# Byte-compiled / optimized / DLL files
9+
__pycache__/
10+
*.py[cod]
11+
*$py.class
12+
.pyc
13+
.DS_Store
14+
.mypy*
15+
16+
17+
18+
# Distribution / packaging
19+
20+
.Python
21+
env/
22+
build/
23+
develop-eggs/
24+
dist/
25+
eggs/
26+
.eggs/
27+
lib/
28+
lib64/
29+
parts/
30+
sdist/
31+
var/
32+
*.egg-info/
33+
.installed.cfg
34+
*.egg
35+
36+
# PyInstaller
37+
# Usually these files are written by a python script from a template
38+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
39+
*.manifest
40+
*.spec
41+
VERSION
42+
43+
# Installer logs
44+
pip-log.txt
45+
pip-delete-this-directory.txt
46+
47+
# Unit test / coverage reports
48+
htmlcov/
49+
.tox/
50+
.coverage
51+
.coverage.*
52+
.cache
53+
nosetests.xml
54+
coverage.xml
55+
*,cover
56+
.hypothesis/
57+
qolmat/.converge
58+
59+
60+
# Notebooks
61+
**.ipynb_checkpoints
862
qolmat/notebooks/*.ipynb
963
qolmat/examples/*.ipynb
10-
*.ipynb
11-
*.egg-info
12-
/dist
13-
/build
14-
*SOURCES.txt
15-
TimeSynth*
16-
/scripts
64+
65+
66+
# VSCode
67+
.vscode

.pre-commit-config.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,7 @@ repos:
1616
args:
1717
- "-l 99"
1818
# Flake8
19-
- repo: https://gitlab.com/pycqa/flake8
19+
- repo: https://github.com/PyCQA/flake8
2020
rev: 4.0.1
2121
hooks:
2222
- id: flake8
23-
exclude: (tests/)
24-
args:
25-
- --max-line-length=99
26-
- --ignore=E302,E305,W503,E203,E203,E731,E402
27-
- --per-file-ignores=
28-
- */__init__.py:F401
29-
- qolmat/imputations/models.py:F401

.readthedocs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
3+
build:
4+
image: latest
5+
6+
python:
7+
version: 3.8
8+
install:
9+
- method: pip
10+
path: .
11+
12+
conda:
13+
environment: environment.doc.yml
14+
15+
sphinx:
16+
builder: html
17+
configuration: docs/conf.py
18+
fail_on_warning: false

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ On each sample, different imputation models are tested and reconstruction errors
4848
<img src="docs/images/comparator.png" alt="comparator" width="60%"/>
4949
</p>
5050

51-
### **Installation**
51+
### **Installation for conda user**
5252

5353
```
54-
conda env create -f conda.yml
55-
conda activate env_qolmat
54+
cconda env create -f environment.dev.yml
55+
conda activate env_qolmat_dev
5656
```
57+
5758
### Install pre-commit
5859

5960
Once the environment is installed, pre-commit is installed, but need to be activated using the following command:

README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
##############################################
23
RPCA for anomaly detection and data imputation
34
##############################################
@@ -71,7 +72,7 @@ What’s in this repo?
7172

7273
Some classes are implemented:
7374

74-
* :class:`RPCA` class (see p.29 of this `paper <https://arxiv.org/abs/0912.3599>`__). The optimisation problem is the following
75+
**RPCA** class based on `RPCA <https://arxiv.org/abs/0912.3599>`_ p.29.
7576

7677
.. math::
7778
@@ -80,7 +81,7 @@ Some classes are implemented:
8081
& \text{s.t.} \quad \mathbf{D} = \mathbf{X} + \mathbf{A}
8182
\end{align*}
8283
83-
* :class:`GraphRPCA` class (based on this `paper <https://arxiv.org/abs/1507.08173>`__). The optimisation problem is the following
84+
**GraphRPCA** class based on `GraphRPCA <https://arxiv.org/abs/1507.08173>`_.
8485

8586
.. math::
8687
@@ -89,7 +90,7 @@ Some classes are implemented:
8990
& \text{s.t.} \quad \mathbf{D} = \mathbf{X} + \mathbf{A}
9091
\end{align*}
9192
92-
* :class:`TemporalRPCA` class (based on this `paper <https://arxiv.org/abs/2001.05484>`__ and this `paper <https://www.hindawi.com/journals/jat/2018/7191549/>`__). The optimisation problem is the following
93+
**TemporalRPCA** class based on `Link 1 <https://arxiv.org/abs/2001.05484>`__ and this `Link 2 <https://www.hindawi.com/journals/jat/2018/7191549/>`__). The optimisation problem is the following
9394

9495
.. math::
9596

0 commit comments

Comments
 (0)