aberrant 0.5.0__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 (162) hide show
  1. aberrant-0.5.0/.editorconfig +17 -0
  2. aberrant-0.5.0/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
  3. aberrant-0.5.0/.github/ISSUE_TEMPLATE/config.yml +1 -0
  4. aberrant-0.5.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  5. aberrant-0.5.0/.github/dependabot.yml +10 -0
  6. aberrant-0.5.0/.github/pull_request_template.md +15 -0
  7. aberrant-0.5.0/.github/workflows/ci.yml +108 -0
  8. aberrant-0.5.0/.github/workflows/docs.yml +58 -0
  9. aberrant-0.5.0/.github/workflows/release.yml +54 -0
  10. aberrant-0.5.0/.github/workflows/security.yml +68 -0
  11. aberrant-0.5.0/.gitignore +181 -0
  12. aberrant-0.5.0/.pre-commit-config.yaml +76 -0
  13. aberrant-0.5.0/CHANGELOG.md +33 -0
  14. aberrant-0.5.0/CODE_OF_CONDUCT.md +28 -0
  15. aberrant-0.5.0/CONTRIBUTING.md +49 -0
  16. aberrant-0.5.0/LICENSE +21 -0
  17. aberrant-0.5.0/PKG-INFO +168 -0
  18. aberrant-0.5.0/README.md +88 -0
  19. aberrant-0.5.0/SECURITY.md +24 -0
  20. aberrant-0.5.0/aberrant/__init__.py +15 -0
  21. aberrant-0.5.0/aberrant/base/__init__.py +46 -0
  22. aberrant-0.5.0/aberrant/base/architecture.py +76 -0
  23. aberrant-0.5.0/aberrant/base/exceptions.py +51 -0
  24. aberrant-0.5.0/aberrant/base/model.py +48 -0
  25. aberrant-0.5.0/aberrant/base/pipeline.py +127 -0
  26. aberrant-0.5.0/aberrant/base/similarity.py +48 -0
  27. aberrant-0.5.0/aberrant/base/transformer.py +56 -0
  28. aberrant-0.5.0/aberrant/drift/__init__.py +13 -0
  29. aberrant-0.5.0/aberrant/drift/adwin.py +297 -0
  30. aberrant-0.5.0/aberrant/drift/base.py +54 -0
  31. aberrant-0.5.0/aberrant/drift/kswin.py +151 -0
  32. aberrant-0.5.0/aberrant/drift/page_hinkley.py +172 -0
  33. aberrant-0.5.0/aberrant/model/__init__.py +40 -0
  34. aberrant-0.5.0/aberrant/model/deep/__init__.py +16 -0
  35. aberrant-0.5.0/aberrant/model/deep/autoencoder.py +116 -0
  36. aberrant-0.5.0/aberrant/model/distance/__init__.py +20 -0
  37. aberrant-0.5.0/aberrant/model/distance/knn.py +62 -0
  38. aberrant-0.5.0/aberrant/model/distance/lof.py +256 -0
  39. aberrant-0.5.0/aberrant/model/iforest/__init__.py +40 -0
  40. aberrant-0.5.0/aberrant/model/iforest/asd.py +226 -0
  41. aberrant-0.5.0/aberrant/model/iforest/halfspace.py +321 -0
  42. aberrant-0.5.0/aberrant/model/iforest/mondrian.py +427 -0
  43. aberrant-0.5.0/aberrant/model/iforest/online.py +760 -0
  44. aberrant-0.5.0/aberrant/model/iforest/rand_hist.py +114 -0
  45. aberrant-0.5.0/aberrant/model/iforest/random_cut.py +461 -0
  46. aberrant-0.5.0/aberrant/model/iforest/xstream.py +424 -0
  47. aberrant-0.5.0/aberrant/model/null.py +50 -0
  48. aberrant-0.5.0/aberrant/model/quantile_threshold.py +149 -0
  49. aberrant-0.5.0/aberrant/model/random.py +57 -0
  50. aberrant-0.5.0/aberrant/model/stat/__init__.py +35 -0
  51. aberrant-0.5.0/aberrant/model/stat/multi.py +317 -0
  52. aberrant-0.5.0/aberrant/model/stat/uni.py +780 -0
  53. aberrant-0.5.0/aberrant/model/svm/__init__.py +20 -0
  54. aberrant-0.5.0/aberrant/model/svm/adaptive.py +293 -0
  55. aberrant-0.5.0/aberrant/model/svm/gadget.py +144 -0
  56. aberrant-0.5.0/aberrant/model/svm/todo.txt +3 -0
  57. aberrant-0.5.0/aberrant/model/threshold.py +99 -0
  58. aberrant-0.5.0/aberrant/stream/__init__.py +46 -0
  59. aberrant-0.5.0/aberrant/stream/dataset/__init__.py +205 -0
  60. aberrant-0.5.0/aberrant/stream/dataset/loader.py +362 -0
  61. aberrant-0.5.0/aberrant/stream/dataset/registry.py +402 -0
  62. aberrant-0.5.0/aberrant/stream/dataset/streamers.py +260 -0
  63. aberrant-0.5.0/aberrant/stream/streamer.py +135 -0
  64. aberrant-0.5.0/aberrant/transform/__init__.py +11 -0
  65. aberrant-0.5.0/aberrant/transform/preprocessing/__init__.py +8 -0
  66. aberrant-0.5.0/aberrant/transform/preprocessing/scaler.py +182 -0
  67. aberrant-0.5.0/aberrant/transform/projection/__init__.py +9 -0
  68. aberrant-0.5.0/aberrant/transform/projection/incremental_pca.py +269 -0
  69. aberrant-0.5.0/aberrant/transform/projection/random_projection.py +110 -0
  70. aberrant-0.5.0/aberrant/utils/__init__.py +0 -0
  71. aberrant-0.5.0/aberrant/utils/deep/__init__.py +0 -0
  72. aberrant-0.5.0/aberrant/utils/deep/architecture.py +91 -0
  73. aberrant-0.5.0/aberrant/utils/deep/loss_func.py +28 -0
  74. aberrant-0.5.0/aberrant/utils/similar/__init__.py +0 -0
  75. aberrant-0.5.0/aberrant/utils/similar/faiss_engine.py +172 -0
  76. aberrant-0.5.0/docs/api/base.md +15 -0
  77. aberrant-0.5.0/docs/api/drift.md +7 -0
  78. aberrant-0.5.0/docs/api/index.md +28 -0
  79. aberrant-0.5.0/docs/api/models/core.md +8 -0
  80. aberrant-0.5.0/docs/api/models/distance.md +6 -0
  81. aberrant-0.5.0/docs/api/models/iforest.md +14 -0
  82. aberrant-0.5.0/docs/api/models/index.md +9 -0
  83. aberrant-0.5.0/docs/api/models/stat.md +9 -0
  84. aberrant-0.5.0/docs/api/models/svm.md +6 -0
  85. aberrant-0.5.0/docs/api/stream.md +13 -0
  86. aberrant-0.5.0/docs/api/transform.md +10 -0
  87. aberrant-0.5.0/docs/changelog.md +3 -0
  88. aberrant-0.5.0/docs/contributing.md +10 -0
  89. aberrant-0.5.0/docs/examples/index.md +23 -0
  90. aberrant-0.5.0/docs/index.md +53 -0
  91. aberrant-0.5.0/docs/installation.md +45 -0
  92. aberrant-0.5.0/docs/mkdocs.yml +69 -0
  93. aberrant-0.5.0/docs/quickstart.md +59 -0
  94. aberrant-0.5.0/docs/user_guide/best_practices.md +31 -0
  95. aberrant-0.5.0/docs/user_guide/evaluation.md +33 -0
  96. aberrant-0.5.0/docs/user_guide/index.md +30 -0
  97. aberrant-0.5.0/docs/user_guide/models.md +80 -0
  98. aberrant-0.5.0/docs/user_guide/pipelines.md +34 -0
  99. aberrant-0.5.0/docs/user_guide/streaming.md +40 -0
  100. aberrant-0.5.0/docs/user_guide/transformers.md +33 -0
  101. aberrant-0.5.0/examples/models/adaptive_svm.py +35 -0
  102. aberrant-0.5.0/examples/models/asd_iforest.py +25 -0
  103. aberrant-0.5.0/examples/models/autoencoder.py +32 -0
  104. aberrant-0.5.0/examples/models/gadget_svm.py +22 -0
  105. aberrant-0.5.0/examples/models/knn.py +27 -0
  106. aberrant-0.5.0/examples/models/mondrian_iforest.py +23 -0
  107. aberrant-0.5.0/examples/models/online_iforest.py +32 -0
  108. aberrant-0.5.0/examples/models/random_cut_forest.py +30 -0
  109. aberrant-0.5.0/examples/models/streamRHF.py +26 -0
  110. aberrant-0.5.0/examples/models/xstream.py +32 -0
  111. aberrant-0.5.0/examples/pipeline.py +46 -0
  112. aberrant-0.5.0/pyproject.toml +130 -0
  113. aberrant-0.5.0/tests/__init__.py +0 -0
  114. aberrant-0.5.0/tests/drift/__init__.py +1 -0
  115. aberrant-0.5.0/tests/drift/test_adwin.py +270 -0
  116. aberrant-0.5.0/tests/drift/test_kswin.py +181 -0
  117. aberrant-0.5.0/tests/drift/test_page_hinkley.py +261 -0
  118. aberrant-0.5.0/tests/integration/__init__.py +1 -0
  119. aberrant-0.5.0/tests/integration/_settings.py +12 -0
  120. aberrant-0.5.0/tests/integration/conftest.py +31 -0
  121. aberrant-0.5.0/tests/integration/test_deep_autoencoder.py +87 -0
  122. aberrant-0.5.0/tests/integration/test_distance_knn.py +69 -0
  123. aberrant-0.5.0/tests/integration/test_iforest_asd.py +67 -0
  124. aberrant-0.5.0/tests/integration/test_iforest_mondrian.py +69 -0
  125. aberrant-0.5.0/tests/integration/test_iforest_online.py +78 -0
  126. aberrant-0.5.0/tests/integration/test_iforest_rand_hist.py +69 -0
  127. aberrant-0.5.0/tests/integration/test_iforest_random_cut.py +67 -0
  128. aberrant-0.5.0/tests/integration/test_iforest_xstream.py +69 -0
  129. aberrant-0.5.0/tests/integration/test_null.py +65 -0
  130. aberrant-0.5.0/tests/integration/test_random.py +70 -0
  131. aberrant-0.5.0/tests/integration/test_stat_multi.py +115 -0
  132. aberrant-0.5.0/tests/integration/test_stat_uni.py +82 -0
  133. aberrant-0.5.0/tests/integration/test_svm_adaptive.py +69 -0
  134. aberrant-0.5.0/tests/integration/test_svm_gadget.py +66 -0
  135. aberrant-0.5.0/tests/models/__init__.py +0 -0
  136. aberrant-0.5.0/tests/models/test_deep_autoencoder.py +279 -0
  137. aberrant-0.5.0/tests/models/test_distance_knn.py +222 -0
  138. aberrant-0.5.0/tests/models/test_distance_lof.py +183 -0
  139. aberrant-0.5.0/tests/models/test_iforest_asd.py +375 -0
  140. aberrant-0.5.0/tests/models/test_iforest_halfspace.py +278 -0
  141. aberrant-0.5.0/tests/models/test_iforest_mondrian.py +321 -0
  142. aberrant-0.5.0/tests/models/test_iforest_online.py +247 -0
  143. aberrant-0.5.0/tests/models/test_iforest_rand_hist.py +168 -0
  144. aberrant-0.5.0/tests/models/test_iforest_random_cut.py +186 -0
  145. aberrant-0.5.0/tests/models/test_iforest_xstream.py +222 -0
  146. aberrant-0.5.0/tests/models/test_null.py +125 -0
  147. aberrant-0.5.0/tests/models/test_quantile_threshold.py +206 -0
  148. aberrant-0.5.0/tests/models/test_random.py +230 -0
  149. aberrant-0.5.0/tests/models/test_stat_multi.py +239 -0
  150. aberrant-0.5.0/tests/models/test_stat_uni.py +615 -0
  151. aberrant-0.5.0/tests/models/test_svm_adaptive.py +92 -0
  152. aberrant-0.5.0/tests/models/test_svm_gadget.py +378 -0
  153. aberrant-0.5.0/tests/models/test_threshold.py +357 -0
  154. aberrant-0.5.0/tests/test_public_imports.py +65 -0
  155. aberrant-0.5.0/tests/transformers/__init__.py +0 -0
  156. aberrant-0.5.0/tests/transformers/reference/reference_pca_1.R +74 -0
  157. aberrant-0.5.0/tests/transformers/reference/reference_pca_2.R +46 -0
  158. aberrant-0.5.0/tests/transformers/test_pca.py +265 -0
  159. aberrant-0.5.0/tests/transformers/test_pca_pipeline.py +177 -0
  160. aberrant-0.5.0/tests/transformers/test_preprocessing.py +473 -0
  161. aberrant-0.5.0/tests/utils.py +268 -0
  162. aberrant-0.5.0/uv.lock +2316 -0
@@ -0,0 +1,17 @@
1
+ root = true
2
+
3
+ [*.py]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ indent_style = space
8
+ indent_size = 4
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.{md,yml,yaml,toml}]
12
+ charset = utf-8
13
+ end_of_line = lf
14
+ insert_final_newline = true
15
+ indent_style = space
16
+ indent_size = 2
17
+ trim_trailing_whitespace = true
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a reproducible problem in ABERRANT
4
+ title: "[Bug] "
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ Describe the bug clearly.
12
+
13
+ ## Reproduction
14
+
15
+ 1. Environment (OS, Python version, ABERRANT version)
16
+ 2. Exact steps
17
+ 3. Minimal code snippet
18
+
19
+ ## Expected behavior
20
+
21
+ What should happen.
22
+
23
+ ## Actual behavior
24
+
25
+ What happened instead.
26
+
27
+ ## Additional context
28
+
29
+ Logs, traceback, screenshots, or sample data details.
@@ -0,0 +1 @@
1
+ blank_issues_enabled: false
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature request
3
+ about: Propose a new capability or improvement
4
+ title: "[Feature] "
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Problem
10
+
11
+ What problem are you trying to solve?
12
+
13
+ ## Proposal
14
+
15
+ Describe the proposed API or behavior.
16
+
17
+ ## Alternatives considered
18
+
19
+ List alternatives and tradeoffs.
20
+
21
+ ## Additional context
22
+
23
+ Benchmarks, prior art, or related issues.
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ - package-ecosystem: "pip"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
@@ -0,0 +1,15 @@
1
+ ## Summary
2
+
3
+ Describe what changed and why.
4
+
5
+ ## Checklist
6
+
7
+ - [ ] Tests added/updated for behavior changes
8
+ - [ ] `ruff` passes locally
9
+ - [ ] `mypy` passes for touched modules
10
+ - [ ] Docs updated for user-facing changes
11
+ - [ ] `CHANGELOG.md` updated under `Unreleased`
12
+
13
+ ## Risk
14
+
15
+ Describe rollout risk and potential regressions.
@@ -0,0 +1,108 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ lint-type-test:
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os: [ubuntu-latest, windows-latest]
18
+ python-version: ["3.10", "3.11", "3.12"]
19
+ runs-on: ${{ matrix.os }}
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v6
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v7
26
+
27
+ - name: Install Python
28
+ run: uv python install ${{ matrix.python-version }}
29
+
30
+ - name: Install dependencies
31
+ run: uv sync --extra dev
32
+
33
+ - name: Ruff
34
+ run: uv run python -m ruff check .
35
+
36
+ - name: Mypy
37
+ run: >
38
+ uv run python -m mypy
39
+ aberrant/base/model.py
40
+ aberrant/base/transformer.py
41
+ aberrant/base/pipeline.py
42
+ aberrant/model/threshold.py
43
+ aberrant/model/quantile_threshold.py
44
+ aberrant/model/__init__.py
45
+ aberrant/model/iforest/__init__.py
46
+ aberrant/model/distance/__init__.py
47
+ aberrant/model/svm/__init__.py
48
+ aberrant/model/deep/__init__.py
49
+
50
+ - name: Unit tests
51
+ run: uv run python -m pytest tests/models tests/drift tests/transformers -q
52
+
53
+ integration-smoke:
54
+ runs-on: ubuntu-latest
55
+ steps:
56
+ - name: Checkout
57
+ uses: actions/checkout@v6
58
+
59
+ - name: Install uv
60
+ uses: astral-sh/setup-uv@v7
61
+
62
+ - name: Install Python
63
+ run: uv python install 3.11
64
+
65
+ - name: Install dependencies
66
+ run: uv sync --extra dev
67
+
68
+ - name: Integration smoke
69
+ run: uv run python -m pytest tests/test_public_imports.py tests/integration -q
70
+
71
+ coverage:
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - name: Checkout
75
+ uses: actions/checkout@v6
76
+
77
+ - name: Install uv
78
+ uses: astral-sh/setup-uv@v7
79
+
80
+ - name: Install Python
81
+ run: uv python install 3.11
82
+
83
+ - name: Install dependencies
84
+ run: uv sync --extra dev
85
+
86
+ - name: Coverage
87
+ run: uv run python -m pytest tests/models tests/drift tests/transformers --cov=aberrant --cov-report=xml --cov-report=term-missing -q
88
+
89
+ - name: Upload coverage artifact
90
+ uses: actions/upload-artifact@v7
91
+ with:
92
+ name: coverage-xml
93
+ path: coverage.xml
94
+
95
+ build:
96
+ runs-on: ubuntu-latest
97
+ steps:
98
+ - name: Checkout
99
+ uses: actions/checkout@v6
100
+
101
+ - name: Install uv
102
+ uses: astral-sh/setup-uv@v7
103
+
104
+ - name: Install Python
105
+ run: uv python install 3.11
106
+
107
+ - name: Build sdist and wheel
108
+ run: uv build
@@ -0,0 +1,58 @@
1
+ name: Docs
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+ pages: write
13
+ id-token: write
14
+
15
+ concurrency:
16
+ group: docs-${{ github.ref }}
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Checkout
24
+ uses: actions/checkout@v6
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v7
28
+
29
+ - name: Install Python
30
+ run: uv python install 3.12
31
+
32
+ - name: Install dependencies
33
+ run: uv sync --extra docs
34
+
35
+ - name: Validate docs (strict)
36
+ run: uv run mkdocs build --strict -f docs/mkdocs.yml
37
+
38
+ - name: Setup Pages
39
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
40
+ uses: actions/configure-pages@v5
41
+
42
+ - name: Upload artifact
43
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
44
+ uses: actions/upload-pages-artifact@v4
45
+ with:
46
+ path: site
47
+
48
+ deploy:
49
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
50
+ runs-on: ubuntu-latest
51
+ needs: build
52
+ environment:
53
+ name: github-pages
54
+ url: ${{ steps.deployment.outputs.page_url }}
55
+ steps:
56
+ - name: Deploy to GitHub Pages
57
+ id: deployment
58
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,54 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+ id-token: write
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v6
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v7
22
+
23
+ - name: Install Python
24
+ run: uv python install 3.11
25
+
26
+ - name: Build distributions
27
+ run: uv build
28
+
29
+ - name: Upload distribution artifacts
30
+ uses: actions/upload-artifact@v7
31
+ with:
32
+ name: dist
33
+ path: dist/*
34
+
35
+ publish-pypi:
36
+ needs: build
37
+ runs-on: ubuntu-latest
38
+ if: startsWith(github.ref, 'refs/tags/v')
39
+ environment:
40
+ name: pypi
41
+ url: https://pypi.org/p/aberrant
42
+ permissions:
43
+ id-token: write
44
+ steps:
45
+ - name: Download built artifacts
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ name: dist
49
+ path: dist
50
+
51
+ - name: Publish to PyPI
52
+ uses: pypa/gh-action-pypi-publish@release/v1
53
+ with:
54
+ attestations: true
@@ -0,0 +1,68 @@
1
+ name: Security
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ schedule:
9
+ - cron: "0 4 * * 1"
10
+
11
+ permissions:
12
+ contents: read
13
+ security-events: write
14
+
15
+ jobs:
16
+ dependency-review:
17
+ if: github.event_name == 'pull_request'
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Dependency review
21
+ uses: actions/dependency-review-action@v4
22
+
23
+ pip-audit:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Checkout
27
+ uses: actions/checkout@v6
28
+
29
+ - name: Audit dependencies
30
+ uses: pypa/gh-action-pip-audit@v1.1.0
31
+ with:
32
+ inputs: .
33
+
34
+ codeql:
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - name: Checkout
38
+ uses: actions/checkout@v6
39
+
40
+ - name: Initialize CodeQL
41
+ uses: github/codeql-action/init@v4
42
+ with:
43
+ languages: python
44
+
45
+ - name: Autobuild
46
+ uses: github/codeql-action/autobuild@v4
47
+
48
+ - name: Analyze
49
+ uses: github/codeql-action/analyze@v4
50
+
51
+ sbom:
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - name: Checkout
55
+ uses: actions/checkout@v6
56
+
57
+ - name: Generate SBOM
58
+ uses: anchore/sbom-action@v0
59
+ with:
60
+ path: .
61
+ format: spdx-json
62
+ output-file: sbom.spdx.json
63
+
64
+ - name: Upload SBOM artifact
65
+ uses: actions/upload-artifact@v7
66
+ with:
67
+ name: sbom
68
+ path: sbom.spdx.json
@@ -0,0 +1,181 @@
1
+ # Project
2
+ .idea
3
+ .claude
4
+ nul
5
+ CLAUDE.md
6
+
7
+ # Byte-compiled / optimized / DLL files
8
+ __pycache__/
9
+ *.py[cod]
10
+ *$py.class
11
+
12
+ # C extensions
13
+ *.so
14
+
15
+ # Distribution / packaging
16
+ .Python
17
+ build/
18
+ develop-eggs/
19
+ dist/
20
+ downloads/
21
+ eggs/
22
+ .eggs/
23
+ lib/
24
+ lib64/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ wheels/
29
+ share/python-wheels/
30
+ *.egg-info/
31
+ .installed.cfg
32
+ *.egg
33
+ MANIFEST
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ *.py,cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+ cover/
59
+
60
+ # Translations
61
+ *.mo
62
+ *.pot
63
+
64
+ # Django stuff:
65
+ *.log
66
+ local_settings.py
67
+ db.sqlite3
68
+ db.sqlite3-journal
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ .pybuilder/
82
+ target/
83
+
84
+ # Jupyter Notebook
85
+ .ipynb_checkpoints
86
+
87
+ # IPython
88
+ profile_default/
89
+ ipython_config.py
90
+
91
+ # pyenv
92
+ # For a library or package, you might want to ignore these files since the code is
93
+ # intended to run in multiple environments; otherwise, check them in:
94
+ # .python-version
95
+
96
+ # pipenv
97
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
99
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
100
+ # install all needed dependencies.
101
+ #Pipfile.lock
102
+
103
+ # UV
104
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ #uv.lock
108
+
109
+ # poetry
110
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114
+ #poetry.lock
115
+
116
+ # pdm
117
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118
+ #pdm.lock
119
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
120
+ # in version control.
121
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
122
+ .pdm.toml
123
+ .pdm-python
124
+ .pdm-build/
125
+
126
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
127
+ __pypackages__/
128
+
129
+ # Celery stuff
130
+ celerybeat-schedule
131
+ celerybeat.pid
132
+
133
+ # SageMath parsed files
134
+ *.sage.py
135
+
136
+ # Environments
137
+ .env
138
+ .venv
139
+ env/
140
+ venv/
141
+ ENV/
142
+ env.bak/
143
+ venv.bak/
144
+
145
+ # Spyder project settings
146
+ .spyderproject
147
+ .spyproject
148
+
149
+ # Rope project settings
150
+ .ropeproject
151
+
152
+ # mkdocs documentation
153
+ /site
154
+
155
+ # mypy
156
+ .mypy_cache/
157
+ .dmypy.json
158
+ dmypy.json
159
+
160
+ # Pyre type checker
161
+ .pyre/
162
+
163
+ # pytype static type analyzer
164
+ .pytype/
165
+
166
+ # Cython debug symbols
167
+ cython_debug/
168
+
169
+ # PyCharm
170
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
171
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
172
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
173
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
174
+ #.idea/
175
+
176
+ # PyPI configuration file
177
+ .pypirc
178
+
179
+ # AI coding assistant
180
+ .claude
181
+ /.codex
@@ -0,0 +1,76 @@
1
+ # This file configures the pre-commit hooks for the project.
2
+ # For more information, see https://pre-commit.com
3
+
4
+ default_install_hook_types: [pre-commit, pre-push]
5
+ default_stages: [pre-commit]
6
+
7
+ repos:
8
+ - repo: https://github.com/pre-commit/pre-commit-hooks
9
+ rev: v4.6.0
10
+ hooks:
11
+ - id: trailing-whitespace # Trims trailing whitespace.
12
+ stages: [pre-commit]
13
+ - id: end-of-file-fixer # Ensures files end with a single newline.
14
+ stages: [pre-commit]
15
+ - id: check-yaml # Checks YAML files for parseable syntax.
16
+ stages: [pre-commit]
17
+ - id: check-toml # Checks TOML files for parseable syntax.
18
+ stages: [pre-commit]
19
+ - id: check-json # Checks JSON files for parseable syntax.
20
+ stages: [pre-commit]
21
+ - id: check-added-large-files # Prevents committing large files.
22
+ stages: [pre-commit]
23
+ - id: check-case-conflict # Checks for files that would conflict on case-insensitive filesystems.
24
+ stages: [pre-commit]
25
+ - id: check-merge-conflict # Checks for files that contain merge conflict strings.
26
+ stages: [pre-commit]
27
+ - id: debug-statements # Checks for leftover debugger imports and calls (e.g., pdb, breakpoint()).
28
+ stages: [pre-commit]
29
+
30
+ # Ruff for linting and formatting
31
+ - repo: https://github.com/astral-sh/ruff-pre-commit
32
+ # Check for updates: https://github.com/astral-sh/ruff-pre-commit/releases
33
+ rev: v0.8.5
34
+ hooks:
35
+ # Run the linter
36
+ - id: ruff
37
+ args: [--fix]
38
+ stages: [pre-commit]
39
+ # Run the formatter (replaces Black)
40
+ - id: ruff-format
41
+ stages: [pre-commit]
42
+
43
+ # Type checking with mypy
44
+ - repo: https://github.com/pre-commit/mirrors-mypy
45
+ rev: v1.13.0
46
+ hooks:
47
+ - id: mypy
48
+ additional_dependencies: [types-all]
49
+ args: [--ignore-missing-imports, --strict]
50
+ stages: [pre-commit]
51
+
52
+ # Optional: Run tests before commit
53
+ - repo: local
54
+ hooks:
55
+ - id: ruff-check-pre-push
56
+ name: Ruff check (pre-push)
57
+ entry: uv run ruff check .
58
+ language: system
59
+ pass_filenames: false
60
+ always_run: true
61
+ stages: [pre-push]
62
+ - id: ruff-format-check-pre-push
63
+ name: Ruff format check (pre-push)
64
+ entry: uv run ruff format --check .
65
+ language: system
66
+ pass_filenames: false
67
+ always_run: true
68
+ stages: [pre-push]
69
+ - id: pytest-check
70
+ name: Run tests
71
+ entry: pytest
72
+ language: system
73
+ pass_filenames: false
74
+ always_run: true
75
+ args: [tests/, -v, --tb=short]
76
+ stages: [pre-commit]
@@ -0,0 +1,33 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on Keep a Changelog and the project aims to follow
6
+ Semantic Versioning.
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Public API exports for `aberrant.model.svm`, `aberrant.model.stat`, `aberrant.stream`,
13
+ `aberrant.transform`, and deep lazy exports.
14
+ - Regression tests for feature-order stability in `OnlineIsolationForest`.
15
+ - Regression tests for `keys=` initialization in multivariate statistical models.
16
+ - Optional dependency extras for `parquet` and benchmark tooling.
17
+ - Repository standards and CI/security/release workflows.
18
+
19
+ ### Changed
20
+
21
+ - `OnlineIsolationForest` now enforces deterministic feature ordering and key-set checks.
22
+ - Dataset module version now uses `aberrant.__version__` as single source of truth.
23
+ - Documentation was rewritten to match the current public API.
24
+ - `aberrant[dev]` now includes `torch` and `scikit-learn` so the full test suite can
25
+ run from the dev environment.
26
+ - Integration tests now run by default (no environment-variable gate).
27
+
28
+ ### Fixed
29
+
30
+ - `keys=` initialization path in multivariate statistical detectors.
31
+ - Deep tests now skip gracefully when `torch` is unavailable.
32
+ - Legacy parquet streamer now fails with a clear optional-dependency message.
33
+ - Packaging metadata now correctly declares MIT classifier.