tsam 2.3.2__tar.gz → 2.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. tsam-2.3.2/.github/workflows/pytest.yml → tsam-2.3.3/.github/workflows/daily_tests.yml +43 -43
  2. tsam-2.3.3/.github/workflows/test_on_push_and_pull.yml +71 -0
  3. {tsam-2.3.2 → tsam-2.3.3}/.gitignore +17 -17
  4. {tsam-2.3.2 → tsam-2.3.3}/.gitlab-ci.yml +11 -11
  5. {tsam-2.3.2 → tsam-2.3.3}/.readthedocs.yml +14 -14
  6. {tsam-2.3.2 → tsam-2.3.3}/LICENSE.txt +20 -20
  7. {tsam-2.3.2 → tsam-2.3.3}/MANIFEST.in +3 -3
  8. tsam-2.3.3/Makefile +27 -0
  9. {tsam-2.3.2 → tsam-2.3.3}/PKG-INFO +168 -168
  10. {tsam-2.3.2 → tsam-2.3.3}/README.md +145 -135
  11. {tsam-2.3.2 → tsam-2.3.3}/docs/Makefile +25 -25
  12. {tsam-2.3.2 → tsam-2.3.3}/docs/make.bat +36 -36
  13. {tsam-2.3.2 → tsam-2.3.3}/docs/source/conf.py +197 -197
  14. {tsam-2.3.2 → tsam-2.3.3}/docs/source/durationRepresentationDoc.rst +15 -15
  15. {tsam-2.3.2 → tsam-2.3.3}/docs/source/exactKmedoidsDoc.rst +15 -15
  16. {tsam-2.3.2 → tsam-2.3.3}/docs/source/furtherReadingDoc.rst +28 -28
  17. {tsam-2.3.2 → tsam-2.3.3}/docs/source/gettingStartedDoc.rst +84 -84
  18. {tsam-2.3.2 → tsam-2.3.3}/docs/source/hypertunedaggregationDoc.rst +20 -20
  19. {tsam-2.3.2 → tsam-2.3.3}/docs/source/index.rst +44 -44
  20. {tsam-2.3.2 → tsam-2.3.3}/docs/source/installationDoc.rst +38 -38
  21. {tsam-2.3.2 → tsam-2.3.3}/docs/source/integratedSoftwareDoc.rst +19 -19
  22. {tsam-2.3.2 → tsam-2.3.3}/docs/source/kmaxoidsDoc.rst +15 -15
  23. {tsam-2.3.2 → tsam-2.3.3}/docs/source/legalNoticeDoc.rst +38 -38
  24. {tsam-2.3.2 → tsam-2.3.3}/docs/source/mathematicalBackgroundDoc.rst +66 -66
  25. {tsam-2.3.2 → tsam-2.3.3}/docs/source/newsDoc.rst +55 -55
  26. {tsam-2.3.2 → tsam-2.3.3}/docs/source/periodAggregationDoc.rst +15 -15
  27. {tsam-2.3.2 → tsam-2.3.3}/docs/source/representationsDoc.rst +15 -15
  28. {tsam-2.3.2 → tsam-2.3.3}/docs/source/segmentationDoc.rst +15 -15
  29. {tsam-2.3.2 → tsam-2.3.3}/docs/source/structureOfTsamDoc.rst +29 -29
  30. {tsam-2.3.2 → tsam-2.3.3}/docs/source/timeseriesaggregationDoc.rst +21 -21
  31. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_example.ipynb +790 -790
  32. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_method_showcase.ipynb +281 -281
  33. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_optiinput.ipynb +480 -480
  34. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_representation.ipynb +1211 -1211
  35. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_segment_period_animation.ipynb +868 -868
  36. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_segment_period_building_timeseries.ipynb +329 -329
  37. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_segment_period_opti.ipynb +249 -249
  38. {tsam-2.3.2 → tsam-2.3.3}/examples/aggregation_segmentation.ipynb +1883 -1883
  39. {tsam-2.3.2 → tsam-2.3.3}/examples/example_k_maxoids.ipynb +674 -674
  40. {tsam-2.3.2 → tsam-2.3.3}/examples/get_clustercenter_indices.py +24 -24
  41. {tsam-2.3.2 → tsam-2.3.3}/examples/predefined_sequence_example.ipynb +1117 -1117
  42. {tsam-2.3.2 → tsam-2.3.3}/examples/results/paretoOptimalAggregation.csv +389 -389
  43. {tsam-2.3.2 → tsam-2.3.3}/examples/results/preprocessed_wind.csv +368 -368
  44. {tsam-2.3.2 → tsam-2.3.3}/examples/results/testperiods_hierarchical.csv +241 -241
  45. {tsam-2.3.2 → tsam-2.3.3}/examples/results/testperiods_kmeans.csv +193 -193
  46. {tsam-2.3.2 → tsam-2.3.3}/examples/results/testperiods_kmedoids.csv +1345 -1345
  47. {tsam-2.3.2 → tsam-2.3.3}/examples/results/testperiods_predefClusterOrder.csv +193 -193
  48. {tsam-2.3.2 → tsam-2.3.3}/examples/results/testperiods_predefClusterOrderAndClusterCenters.csv +193 -193
  49. {tsam-2.3.2 → tsam-2.3.3}/examples/results/testperiods_segmentation.csv +241 -241
  50. {tsam-2.3.2 → tsam-2.3.3}/examples/testdata.csv +8761 -8761
  51. tsam-2.3.3/requirements.txt +7 -0
  52. {tsam-2.3.2 → tsam-2.3.3}/requirements.yml +7 -7
  53. {tsam-2.3.2 → tsam-2.3.3}/requirements_dev.txt +12 -11
  54. tsam-2.3.3/requirements_dev.yml +11 -0
  55. {tsam-2.3.2 → tsam-2.3.3}/setup.cfg +4 -4
  56. {tsam-2.3.2 → tsam-2.3.3}/setup.py +37 -40
  57. {tsam-2.3.2 → tsam-2.3.3}/test/test_accuracyIndicators.py +63 -63
  58. {tsam-2.3.2 → tsam-2.3.3}/test/test_adjacent_periods.py +42 -42
  59. {tsam-2.3.2 → tsam-2.3.3}/test/test_aggregate_hiearchical.py +402 -402
  60. {tsam-2.3.2 → tsam-2.3.3}/test/test_assert_raises.py +234 -234
  61. {tsam-2.3.2 → tsam-2.3.3}/test/test_averaging.py +57 -57
  62. {tsam-2.3.2 → tsam-2.3.3}/test/test_cluster_order.py +132 -132
  63. {tsam-2.3.2 → tsam-2.3.3}/test/test_durationCurve.py +63 -63
  64. {tsam-2.3.2 → tsam-2.3.3}/test/test_durationRepresentation.py +157 -157
  65. {tsam-2.3.2 → tsam-2.3.3}/test/test_extremePeriods.py +93 -93
  66. {tsam-2.3.2 → tsam-2.3.3}/test/test_hierarchical.py +78 -78
  67. {tsam-2.3.2 → tsam-2.3.3}/test/test_hypertuneAggregation.py +170 -169
  68. {tsam-2.3.2 → tsam-2.3.3}/test/test_k_maxoids.py +57 -57
  69. {tsam-2.3.2 → tsam-2.3.3}/test/test_k_medoids.py +53 -53
  70. {tsam-2.3.2 → tsam-2.3.3}/test/test_k_medoids_contiguity.py +83 -83
  71. {tsam-2.3.2 → tsam-2.3.3}/test/test_minmaxRepresentation.py +70 -70
  72. {tsam-2.3.2 → tsam-2.3.3}/test/test_preprocess.py +43 -43
  73. {tsam-2.3.2 → tsam-2.3.3}/test/test_properties.py +190 -190
  74. {tsam-2.3.2 → tsam-2.3.3}/test/test_samemean.py +51 -51
  75. {tsam-2.3.2 → tsam-2.3.3}/test/test_segmentation.py +109 -109
  76. {tsam-2.3.2 → tsam-2.3.3}/test/test_subhourlyResolution.py +54 -54
  77. {tsam-2.3.2 → tsam-2.3.3}/test/test_subhourly_periods.py +41 -41
  78. {tsam-2.3.2 → tsam-2.3.3}/test/test_weightingFactors.py +70 -70
  79. {tsam-2.3.2 → tsam-2.3.3}/tsam/hyperparametertuning.py +245 -245
  80. {tsam-2.3.2 → tsam-2.3.3}/tsam/periodAggregation.py +141 -141
  81. {tsam-2.3.2 → tsam-2.3.3}/tsam/representations.py +167 -167
  82. {tsam-2.3.2 → tsam-2.3.3}/tsam/timeseriesaggregation.py +1345 -1343
  83. tsam-2.3.3/tsam/utils/__init__.py +0 -0
  84. {tsam-2.3.2 → tsam-2.3.3}/tsam/utils/durationRepresentation.py +204 -204
  85. {tsam-2.3.2 → tsam-2.3.3}/tsam/utils/k_maxoids.py +145 -145
  86. {tsam-2.3.2 → tsam-2.3.3}/tsam/utils/k_medoids_contiguity.py +140 -133
  87. {tsam-2.3.2 → tsam-2.3.3}/tsam/utils/k_medoids_exact.py +239 -234
  88. {tsam-2.3.2 → tsam-2.3.3}/tsam/utils/segmentation.py +118 -118
  89. {tsam-2.3.2 → tsam-2.3.3}/tsam.egg-info/PKG-INFO +168 -168
  90. {tsam-2.3.2 → tsam-2.3.3}/tsam.egg-info/SOURCES.txt +2 -1
  91. {tsam-2.3.2 → tsam-2.3.3}/tsam.egg-info/requires.txt +2 -2
  92. tsam-2.3.2/Makefile +0 -14
  93. tsam-2.3.2/requirements.txt +0 -7
  94. tsam-2.3.2/requirements_dev.yml +0 -8
  95. tsam-2.3.2/tsam/__init__.py +0 -11
  96. {tsam-2.3.2 → tsam-2.3.3}/docs/source/_static/logo.png +0 -0
  97. {tsam-2.3.2 → tsam-2.3.3}/docs/source/_static/tsam-logo.png +0 -0
  98. {tsam-2.3.2/tsam/utils → tsam-2.3.3/tsam}/__init__.py +0 -0
  99. {tsam-2.3.2 → tsam-2.3.3}/tsam.egg-info/dependency_links.txt +0 -0
  100. {tsam-2.3.2 → tsam-2.3.3}/tsam.egg-info/top_level.txt +0 -0
@@ -1,43 +1,43 @@
1
- # This workflow will install Python dependencies and run tests and lint with a single version of Python
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
-
4
- # Based on David Neuroth pylpg
5
-
6
- name: pytest
7
-
8
- on:
9
- push:
10
- pull_request:
11
- branches: [ master ]
12
- #if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
13
-
14
- jobs:
15
- build:
16
- runs-on: ${{matrix.os}}
17
- strategy:
18
- fail-fast: false
19
- matrix:
20
- os: ["ubuntu-latest","ubuntu-20.04", "macos-latest","macos-13","macos-12", "windows-latest","windows-2019"]
21
- # os: ["ubuntu-latest"]
22
- python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
23
-
24
- steps:
25
- - uses: actions/checkout@v2
26
- - name: Set up Python 3.10
27
- uses: actions/setup-python@v2
28
- with:
29
- python-version: ${{matrix.python-version}}
30
- - name: Install dependencies
31
- run: |
32
- python -m pip install --upgrade pip
33
- pip install pytest
34
- pip install pytest-cov
35
- pip install codecov
36
- pip install -r requirements.txt
37
- pip install --no-cache-dir -e .
38
-
39
- - name: Test with pytest
40
- working-directory: ./test/
41
- run: |
42
- pytest
43
- codecov
1
+ # This tests are run daily to check incompatibilties introduced by new versions of dependencies
2
+ name: Daily tsam tests
3
+ on:
4
+ schedule:
5
+ # * is a special character in YAML so you have to quote this string
6
+ # Some Examples for cron syntax https://crontab.guru/examples.html
7
+ # Schedules job at any point after 12 pm
8
+ - cron: '0 0 * * *'
9
+ # Weekly after sunday
10
+ # - cron: 0 0 * * 0
11
+
12
+ jobs:
13
+ PythonAndOsTest:
14
+ name: Test for Python ${{matrix.python-version}} on ${{matrix.os}}
15
+ runs-on: ${{matrix.os}}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ os: ["ubuntu-latest","ubuntu-20.04", "macos-latest","macos-13","macos-12", "windows-latest","windows-2019"]
20
+ # os: ["ubuntu-latest"]
21
+ python-version: [ "3.9", "3.10", "3.11", "3.12"]
22
+
23
+ steps:
24
+ - uses: actions/checkout@v2
25
+ - name: Set up Python 3.10
26
+ uses: actions/setup-python@v2
27
+ with:
28
+ python-version: ${{matrix.python-version}}
29
+ - name: Install dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install pytest
33
+ pip install pytest-cov
34
+ pip install codecov
35
+ pip install -r requirements.txt
36
+ pip install --no-cache-dir -e .
37
+
38
+ - name: Test with pytest
39
+ working-directory: ./test/
40
+ run: |
41
+ pytest
42
+ codecov
43
+
@@ -0,0 +1,71 @@
1
+ # This workflow will install Python dependencies and run tests and lint with a single version of Python
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ # Based on David Neuroth pylpg
5
+
6
+ name: Test on Push and Pull
7
+
8
+ on:
9
+ push:
10
+ pull_request:
11
+ branches: [ master ]
12
+
13
+ jobs:
14
+ PythonAndOsTest:
15
+ name: Test for Python ${{matrix.python-version}} on ${{matrix.os}}
16
+ runs-on: ${{matrix.os}}
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ os: ["ubuntu-latest","ubuntu-20.04", "macos-latest","macos-13","macos-12", "windows-latest","windows-2019"]
21
+ python-version: [ "3.9", "3.10", "3.11", "3.12"]
22
+
23
+ steps:
24
+ - uses: actions/checkout@v2
25
+ - name: Set up Python 3.10
26
+ uses: actions/setup-python@v2
27
+ with:
28
+ python-version: ${{matrix.python-version}}
29
+ - name: Install dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install pytest
33
+ pip install pytest-cov
34
+ pip install codecov
35
+ pip install -r requirements.txt
36
+ pip install --no-cache-dir -e .
37
+
38
+ - name: Test with pytest
39
+ working-directory: ./test/
40
+ run: |
41
+ pytest
42
+ codecov
43
+
44
+ NumpyTest:
45
+ name: Test for numpy ${{matrix.python-numpy-version.numpy}} and python ${{matrix.python-numpy-version.python}}
46
+ runs-on: ${{matrix.os}}
47
+ strategy:
48
+ fail-fast: false
49
+ matrix:
50
+ os: ["ubuntu-latest","ubuntu-20.04", "macos-latest","macos-13","macos-12", "windows-latest","windows-2019"]
51
+ python-numpy-version: [ {python : 3.9,numpy : 1.25}, {python : 3.9,numpy : 1.26},{python : 3.9,numpy : 2.0}]
52
+ steps:
53
+ - uses: actions/checkout@v2
54
+ - name: Set up Python 3.10
55
+ uses: actions/setup-python@v2
56
+ with:
57
+ python-version: ${{matrix.python-numpy-version.python}}
58
+ - name: Install dependencies
59
+ run: |
60
+ python -m pip install numpy==${{matrix.python-numpy-version.numpy}} --upgrade pip
61
+ pip install pytest
62
+ pip install pytest-cov
63
+ pip install codecov
64
+ pip install -r requirements.txt
65
+ pip install --no-cache-dir -e .
66
+
67
+ - name: Test with pytest
68
+ working-directory: ./test/
69
+ run: |
70
+ pytest
71
+ codecov
@@ -1,17 +1,17 @@
1
- # directories
2
- .idea/
3
- .vscode/
4
- __pycache__/
5
- trash/
6
- *.pytest_cache/
7
- *ipynb_checkpoints/
8
- *.eggs/
9
- docs/build
10
-
11
- # file types to ignore
12
- *.pyc
13
- *.egg-info
14
- *.log
15
- *.lp
16
- *.glp
17
- *.mp4
1
+ # directories
2
+ .idea/
3
+ .vscode/
4
+ __pycache__/
5
+ trash/
6
+ *.pytest_cache/
7
+ *ipynb_checkpoints/
8
+ *.eggs/
9
+ docs/build
10
+
11
+ # file types to ignore
12
+ *.pyc
13
+ *.egg-info
14
+ *.log
15
+ *.lp
16
+ *.glp
17
+ *.mp4
@@ -1,11 +1,11 @@
1
- conda:
2
- image: continuumio/miniconda:latest
3
- tags:
4
- - linux
5
-
6
- script:
7
- - conda env update -q --file=requirements.yml
8
- - conda env update -q --file=requirements_dev.yml
9
- - source activate tsam
10
- - pip install -e .
11
- - pytest --cov=tsam test/
1
+ conda:
2
+ image: continuumio/miniconda:latest
3
+ tags:
4
+ - linux
5
+
6
+ script:
7
+ - conda env update -q --file=requirements.yml
8
+ - conda env update -q --file=requirements_dev.yml
9
+ - source activate tsam
10
+ - pip install -e .
11
+ - pytest --cov=tsam test/
@@ -1,15 +1,15 @@
1
- version: 2
2
-
3
- build:
4
- os: ubuntu-22.04
5
- tools:
6
- python: "3.11"
7
- apt_packages:
8
- - texlive-latex-base
9
- - texlive-latex-extra
10
- - dvipng
11
-
12
- python:
13
- install:
14
- - requirements: requirements_dev.txt
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.11"
7
+ apt_packages:
8
+ - texlive-latex-base
9
+ - texlive-latex-extra
10
+ - dvipng
11
+
12
+ python:
13
+ install:
14
+ - requirements: requirements_dev.txt
15
15
  system_packages: false
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2017 Leander Kotzur (FZJ IEK-3), Maximilian Hoffmann (FZJ IEK-3), Peter Markewitz (FZJ IEK-3), Martin Robinius (FZJ IEK-3), Detlef Stolten (FZJ IEK-3)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Leander Kotzur (FZJ IEK-3), Maximilian Hoffmann (FZJ IEK-3), Peter Markewitz (FZJ IEK-3), Martin Robinius (FZJ IEK-3), Detlef Stolten (FZJ IEK-3)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
@@ -1,3 +1,3 @@
1
- include examples/testdata.csv
2
- include examples/results/*.csv
3
- include requirements.yml
1
+ include examples/testdata.csv
2
+ include examples/results/*.csv
3
+ include requirements.yml
tsam-2.3.3/Makefile ADDED
@@ -0,0 +1,27 @@
1
+ #!make
2
+ LOCAL_VENVS_DIR=~/.virtualenvs
3
+ PROJECT_NAME=tsam
4
+ PYTHON=python3.11
5
+ LOCAL_VENV_DIR := ${LOCAL_VENVS_DIR}/${PROJECT_NAME}
6
+
7
+
8
+ test:
9
+ . ${LOCAL_VENV_DIR}/bin/activate; pytest
10
+
11
+ sdist:
12
+ . ${LOCAL_VENV_DIR}/bin/activate; ${PYTHON} setup.py sdist
13
+
14
+ upload:
15
+ twine upload dist/*
16
+
17
+ clean:
18
+ rm dist/*
19
+
20
+ dist: sdist upload clean
21
+
22
+
23
+
24
+ setup_venv:
25
+ mkdir -p ${LOCAL_VENVS_DIR}
26
+ ${PYTHON} -m venv ${LOCAL_VENV_DIR}
27
+ . ${LOCAL_VENV_DIR}/bin/activate; pip install -r requirements.txt; pip install -e .