gators 1.4.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 (199) hide show
  1. gators-1.4.0/.gitattributes +6 -0
  2. gators-1.4.0/.github/workflows/auto-release.yml +87 -0
  3. gators-1.4.0/.github/workflows/build.yml +110 -0
  4. gators-1.4.0/.github/workflows/publish.yml +42 -0
  5. gators-1.4.0/.gitignore +148 -0
  6. gators-1.4.0/.pre-commit-config.yaml +32 -0
  7. gators-1.4.0/CHANGELOG.md +105 -0
  8. gators-1.4.0/CITATION.cff +17 -0
  9. gators-1.4.0/CLAUDE.md +180 -0
  10. gators-1.4.0/CONTRIBUTING.md +334 -0
  11. gators-1.4.0/LICENSE +201 -0
  12. gators-1.4.0/Licence.txt +176 -0
  13. gators-1.4.0/PKG-INFO +449 -0
  14. gators-1.4.0/README.md +370 -0
  15. gators-1.4.0/ROADMAP.md +249 -0
  16. gators-1.4.0/coverage.svg +21 -0
  17. gators-1.4.0/gators/__init__.py +6 -0
  18. gators-1.4.0/gators/clippers/__init__.py +18 -0
  19. gators-1.4.0/gators/clippers/_base_clipper.py +67 -0
  20. gators-1.4.0/gators/clippers/custom_clipper.py +213 -0
  21. gators-1.4.0/gators/clippers/gaussian_clipper.py +191 -0
  22. gators-1.4.0/gators/clippers/iqr_clipper.py +148 -0
  23. gators-1.4.0/gators/clippers/mad_clipper.py +152 -0
  24. gators-1.4.0/gators/clippers/outlier_trimmer.py +126 -0
  25. gators-1.4.0/gators/clippers/quantile_clipper.py +170 -0
  26. gators-1.4.0/gators/data_cleaning/__init__.py +40 -0
  27. gators-1.4.0/gators/data_cleaning/cast_columns.py +267 -0
  28. gators-1.4.0/gators/data_cleaning/correlation_filter.py +195 -0
  29. gators-1.4.0/gators/data_cleaning/drop_columns.py +80 -0
  30. gators-1.4.0/gators/data_cleaning/drop_constant_columns.py +187 -0
  31. gators-1.4.0/gators/data_cleaning/drop_duplicate_columns.py +236 -0
  32. gators-1.4.0/gators/data_cleaning/drop_duplicate_rows.py +187 -0
  33. gators-1.4.0/gators/data_cleaning/drop_high_nan_ratio.py +104 -0
  34. gators-1.4.0/gators/data_cleaning/drop_low_cardinality.py +112 -0
  35. gators-1.4.0/gators/data_cleaning/drop_missing_rows.py +150 -0
  36. gators-1.4.0/gators/data_cleaning/drop_near_constant_columns.py +174 -0
  37. gators-1.4.0/gators/data_cleaning/high_cardinality_filter.py +197 -0
  38. gators-1.4.0/gators/data_cleaning/rename_columns.py +80 -0
  39. gators-1.4.0/gators/data_cleaning/replace.py +140 -0
  40. gators-1.4.0/gators/data_cleaning/round_digits.py +59 -0
  41. gators-1.4.0/gators/data_cleaning/round_significant_digits.py +161 -0
  42. gators-1.4.0/gators/data_cleaning/select_columns.py +74 -0
  43. gators-1.4.0/gators/data_cleaning/sentinel_to_null.py +145 -0
  44. gators-1.4.0/gators/data_cleaning/util.py +72 -0
  45. gators-1.4.0/gators/data_cleaning/variance_filter.py +126 -0
  46. gators-1.4.0/gators/decomposition/__init__.py +7 -0
  47. gators-1.4.0/gators/decomposition/_base_decomposition.py +162 -0
  48. gators-1.4.0/gators/decomposition/pca.py +124 -0
  49. gators-1.4.0/gators/decomposition/truncated_svd.py +87 -0
  50. gators-1.4.0/gators/discretizers/__init__.py +18 -0
  51. gators-1.4.0/gators/discretizers/_base_discretizer.py +298 -0
  52. gators-1.4.0/gators/discretizers/custom_discretizer.py +161 -0
  53. gators-1.4.0/gators/discretizers/equal_length_discretizer.py +199 -0
  54. gators-1.4.0/gators/discretizers/equal_size_discretizer.py +197 -0
  55. gators-1.4.0/gators/discretizers/geometric_discretizer.py +222 -0
  56. gators-1.4.0/gators/discretizers/kmeans_discretizer.py +199 -0
  57. gators-1.4.0/gators/discretizers/quantile_discretizer.py +218 -0
  58. gators-1.4.0/gators/discretizers/tree_based_discretizer.py +225 -0
  59. gators-1.4.0/gators/encoders/__init__.py +38 -0
  60. gators-1.4.0/gators/encoders/_base_encoder.py +416 -0
  61. gators-1.4.0/gators/encoders/_table_encoder.py +147 -0
  62. gators-1.4.0/gators/encoders/base_n_encoder.py +64 -0
  63. gators-1.4.0/gators/encoders/binary_encoder.py +136 -0
  64. gators-1.4.0/gators/encoders/catboost_encoder.py +218 -0
  65. gators-1.4.0/gators/encoders/contrast_encoders.py +215 -0
  66. gators-1.4.0/gators/encoders/count_encoder.py +168 -0
  67. gators-1.4.0/gators/encoders/hash_encoder.py +141 -0
  68. gators-1.4.0/gators/encoders/label_encoder.py +236 -0
  69. gators-1.4.0/gators/encoders/leave_one_out_encoder.py +252 -0
  70. gators-1.4.0/gators/encoders/onehot_encoder.py +490 -0
  71. gators-1.4.0/gators/encoders/ordinal_encoder.py +177 -0
  72. gators-1.4.0/gators/encoders/rare_category_encoder.py +169 -0
  73. gators-1.4.0/gators/encoders/target_encoder.py +450 -0
  74. gators-1.4.0/gators/encoders/util.py +30 -0
  75. gators-1.4.0/gators/encoders/woe_encoder.py +210 -0
  76. gators-1.4.0/gators/exceptions.py +7 -0
  77. gators-1.4.0/gators/feature_generation/__init__.py +54 -0
  78. gators-1.4.0/gators/feature_generation/_window_utils.py +50 -0
  79. gators-1.4.0/gators/feature_generation/asymmetry_index_features.py +224 -0
  80. gators-1.4.0/gators/feature_generation/comparison_features.py +256 -0
  81. gators-1.4.0/gators/feature_generation/concentration_index_features.py +292 -0
  82. gators-1.4.0/gators/feature_generation/condition_features.py +493 -0
  83. gators-1.4.0/gators/feature_generation/distance_features.py +277 -0
  84. gators-1.4.0/gators/feature_generation/entropy_features.py +196 -0
  85. gators-1.4.0/gators/feature_generation/ewm_features.py +193 -0
  86. gators-1.4.0/gators/feature_generation/expanding_window_features.py +168 -0
  87. gators-1.4.0/gators/feature_generation/fourier_features.py +184 -0
  88. gators-1.4.0/gators/feature_generation/function_transformer.py +234 -0
  89. gators-1.4.0/gators/feature_generation/generalized_ratio_features.py +355 -0
  90. gators-1.4.0/gators/feature_generation/group_lag_features.py +247 -0
  91. gators-1.4.0/gators/feature_generation/group_statistics_features.py +413 -0
  92. gators-1.4.0/gators/feature_generation/hhi_features.py +187 -0
  93. gators-1.4.0/gators/feature_generation/is_null.py +98 -0
  94. gators-1.4.0/gators/feature_generation/math_features.py +184 -0
  95. gators-1.4.0/gators/feature_generation/plan_rotation_features.py +123 -0
  96. gators-1.4.0/gators/feature_generation/polynomial_features.py +143 -0
  97. gators-1.4.0/gators/feature_generation/ratio_features.py +254 -0
  98. gators-1.4.0/gators/feature_generation/rolling_statistics_features.py +202 -0
  99. gators-1.4.0/gators/feature_generation/row_statistics_features.py +235 -0
  100. gators-1.4.0/gators/feature_generation/rule_features.py +412 -0
  101. gators-1.4.0/gators/feature_generation/scalar_math_features.py +352 -0
  102. gators-1.4.0/gators/feature_generation/spline_features.py +338 -0
  103. gators-1.4.0/gators/feature_generation/weighted_sum_features.py +249 -0
  104. gators-1.4.0/gators/feature_generation_dt/__init__.py +21 -0
  105. gators-1.4.0/gators/feature_generation_dt/business_time_features.py +257 -0
  106. gators-1.4.0/gators/feature_generation_dt/cyclic_features.py +248 -0
  107. gators-1.4.0/gators/feature_generation_dt/diff_features.py +234 -0
  108. gators-1.4.0/gators/feature_generation_dt/duration_to_datetime.py +241 -0
  109. gators-1.4.0/gators/feature_generation_dt/holiday_features.py +269 -0
  110. gators-1.4.0/gators/feature_generation_dt/ordinal_features.py +210 -0
  111. gators-1.4.0/gators/feature_generation_dt/time_bin_features.py +268 -0
  112. gators-1.4.0/gators/feature_generation_dt/time_window_features.py +432 -0
  113. gators-1.4.0/gators/feature_generation_str/__init__.py +42 -0
  114. gators-1.4.0/gators/feature_generation_str/character_statistics.py +242 -0
  115. gators-1.4.0/gators/feature_generation_str/combine_features.py +209 -0
  116. gators-1.4.0/gators/feature_generation_str/contains.py +89 -0
  117. gators-1.4.0/gators/feature_generation_str/endswith.py +89 -0
  118. gators-1.4.0/gators/feature_generation_str/extract_substring.py +63 -0
  119. gators-1.4.0/gators/feature_generation_str/interaction_features.py +149 -0
  120. gators-1.4.0/gators/feature_generation_str/length.py +114 -0
  121. gators-1.4.0/gators/feature_generation_str/lower.py +116 -0
  122. gators-1.4.0/gators/feature_generation_str/ngram.py +327 -0
  123. gators-1.4.0/gators/feature_generation_str/occurrences.py +226 -0
  124. gators-1.4.0/gators/feature_generation_str/pattern_detector.py +245 -0
  125. gators-1.4.0/gators/feature_generation_str/regex_extract_features.py +135 -0
  126. gators-1.4.0/gators/feature_generation_str/split.py +137 -0
  127. gators-1.4.0/gators/feature_generation_str/split_extract.py +128 -0
  128. gators-1.4.0/gators/feature_generation_str/startswith.py +90 -0
  129. gators-1.4.0/gators/feature_generation_str/string_similarity.py +192 -0
  130. gators-1.4.0/gators/feature_generation_str/tfidf_features.py +297 -0
  131. gators-1.4.0/gators/feature_generation_str/upper.py +146 -0
  132. gators-1.4.0/gators/feature_generation_str/word_statistics.py +183 -0
  133. gators-1.4.0/gators/feature_selection/__init__.py +30 -0
  134. gators-1.4.0/gators/feature_selection/_base_selector.py +116 -0
  135. gators-1.4.0/gators/feature_selection/correlation_selector.py +157 -0
  136. gators-1.4.0/gators/feature_selection/feature_stability_index.py +73 -0
  137. gators-1.4.0/gators/feature_selection/feature_stability_selector.py +111 -0
  138. gators-1.4.0/gators/feature_selection/information_value.py +69 -0
  139. gators-1.4.0/gators/feature_selection/information_value_selector.py +112 -0
  140. gators-1.4.0/gators/feature_selection/mutual_information_selector.py +195 -0
  141. gators-1.4.0/gators/feature_selection/permutation_importance_selector.py +116 -0
  142. gators-1.4.0/gators/feature_selection/psi_filter.py +164 -0
  143. gators-1.4.0/gators/feature_selection/recursive_feature_elimination.py +248 -0
  144. gators-1.4.0/gators/feature_selection/select_from_model.py +153 -0
  145. gators-1.4.0/gators/feature_selection/select_k_best_stable_features.py +74 -0
  146. gators-1.4.0/gators/feature_selection/univariate_selector.py +194 -0
  147. gators-1.4.0/gators/imputers/__init__.py +16 -0
  148. gators-1.4.0/gators/imputers/boolean_imputer.py +166 -0
  149. gators-1.4.0/gators/imputers/groupby_imputer.py +178 -0
  150. gators-1.4.0/gators/imputers/iterative_imputer.py +291 -0
  151. gators-1.4.0/gators/imputers/knn_imputer.py +291 -0
  152. gators-1.4.0/gators/imputers/numeric_imputer.py +392 -0
  153. gators-1.4.0/gators/imputers/string_imputer.py +160 -0
  154. gators-1.4.0/gators/onnx_converters/__init__.py +73 -0
  155. gators-1.4.0/gators/onnx_converters/_clipper_converters.py +67 -0
  156. gators-1.4.0/gators/onnx_converters/_converters.py +238 -0
  157. gators-1.4.0/gators/onnx_converters/_data_cleaning_converters.py +741 -0
  158. gators-1.4.0/gators/onnx_converters/_decomposition_converters.py +101 -0
  159. gators-1.4.0/gators/onnx_converters/_discretizer_converters.py +169 -0
  160. gators-1.4.0/gators/onnx_converters/_encoder_converters.py +642 -0
  161. gators-1.4.0/gators/onnx_converters/_exceptions.py +3 -0
  162. gators-1.4.0/gators/onnx_converters/_export.py +641 -0
  163. gators-1.4.0/gators/onnx_converters/_feature_generation_converters.py +1859 -0
  164. gators-1.4.0/gators/onnx_converters/_feature_generation_dt_converters.py +1651 -0
  165. gators-1.4.0/gators/onnx_converters/_feature_generation_str_converters.py +1141 -0
  166. gators-1.4.0/gators/onnx_converters/_feature_selection_converters.py +45 -0
  167. gators-1.4.0/gators/onnx_converters/_imputer_converters.py +696 -0
  168. gators-1.4.0/gators/onnx_converters/_output_columns.py +803 -0
  169. gators-1.4.0/gators/onnx_converters/_scaler_converters.py +649 -0
  170. gators-1.4.0/gators/pipeline/__init__.py +4 -0
  171. gators-1.4.0/gators/pipeline/pipeline.py +829 -0
  172. gators-1.4.0/gators/py.typed +0 -0
  173. gators-1.4.0/gators/scalers/__init__.py +28 -0
  174. gators-1.4.0/gators/scalers/_power_lambda.py +77 -0
  175. gators-1.4.0/gators/scalers/arcsin_squareroot_scaler.py +161 -0
  176. gators-1.4.0/gators/scalers/arcsinh_scaler.py +165 -0
  177. gators-1.4.0/gators/scalers/box_cox.py +220 -0
  178. gators-1.4.0/gators/scalers/log1p_scaler.py +243 -0
  179. gators-1.4.0/gators/scalers/max_abs_scaler.py +146 -0
  180. gators-1.4.0/gators/scalers/minmax_scaler.py +194 -0
  181. gators-1.4.0/gators/scalers/normalizer.py +121 -0
  182. gators-1.4.0/gators/scalers/power_scaler.py +178 -0
  183. gators-1.4.0/gators/scalers/quantile_transformer.py +263 -0
  184. gators-1.4.0/gators/scalers/robust_scaler.py +185 -0
  185. gators-1.4.0/gators/scalers/standard_scaler.py +169 -0
  186. gators-1.4.0/gators/scalers/yeo_johnson.py +228 -0
  187. gators-1.4.0/gators/tests/__init__.py +0 -0
  188. gators-1.4.0/gators/tests/test_docstring_examples.py +37 -0
  189. gators-1.4.0/gators/transformer/__init__.py +1 -0
  190. gators-1.4.0/gators/transformer/_base_transformer.py +753 -0
  191. gators-1.4.0/gators_paper_joss.zip +0 -0
  192. gators-1.4.0/paper_joss/paper.bib +116 -0
  193. gators-1.4.0/paper_joss/paper.md +167 -0
  194. gators-1.4.0/paper_joss/paper.tex +336 -0
  195. gators-1.4.0/paper_softwarex/figures/onnx_vs_native_throughput.png +0 -0
  196. gators-1.4.0/paper_softwarex/paper.bib +123 -0
  197. gators-1.4.0/paper_softwarex/paper.md +362 -0
  198. gators-1.4.0/paper_softwarex/softwarex-osp-template.docx +0 -0
  199. gators-1.4.0/pyproject.toml +203 -0
@@ -0,0 +1,6 @@
1
+ # Excluded from `git archive` and GitHub release source archives (e.g. the
2
+ # tarball reviewers download for a JOSS/MLOSS submission), while remaining
3
+ # tracked in git history for contributors who clone the repo.
4
+ paper_joss/ export-ignore
5
+ gators_paper_joss.zip export-ignore
6
+ CLAUDE.md export-ignore
@@ -0,0 +1,87 @@
1
+ name: Auto Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+
9
+ jobs:
10
+ auto-release:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write # Required to create tags and releases
14
+ id-token: write # Required for trusted publishing to PyPI
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v5
19
+ with:
20
+ fetch-depth: 0 # Fetch all history for tag detection
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v6
24
+ with:
25
+ python-version: '3.14'
26
+
27
+ - name: Get version
28
+ id: get_version
29
+ run: |
30
+ # Tag from the version already set in gators/__init__.py, so the tag
31
+ # always matches the reviewed/released source instead of an
32
+ # auto-incremented counter.
33
+ PYTHON_VERSION=$(python -c "import re; print(re.search(r'__version__ = \"([^\"]+)\"', open('gators/__init__.py').read()).group(1))")
34
+ NEW_VERSION="v$PYTHON_VERSION"
35
+
36
+ echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
37
+ echo "Next version: $NEW_VERSION"
38
+
39
+ - name: Check if tag already exists
40
+ id: check_tag
41
+ run: |
42
+ if git ls-remote --tags origin | grep -q "refs/tags/${{ steps.get_version.outputs.new_version }}$"; then
43
+ echo "exists=true" >> $GITHUB_OUTPUT
44
+ else
45
+ echo "exists=false" >> $GITHUB_OUTPUT
46
+ fi
47
+
48
+ - name: Install build dependencies
49
+ if: steps.check_tag.outputs.exists == 'false'
50
+ run: |
51
+ python -m pip install --upgrade pip
52
+ pip install build twine
53
+
54
+ - name: Build package
55
+ if: steps.check_tag.outputs.exists == 'false'
56
+ run: python -m build
57
+
58
+ - name: Check package
59
+ if: steps.check_tag.outputs.exists == 'false'
60
+ run: twine check dist/*
61
+
62
+ - name: Create and push tag
63
+ if: steps.check_tag.outputs.exists == 'false'
64
+ run: |
65
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
66
+ git config --local user.name "github-actions[bot]"
67
+ git tag ${{ steps.get_version.outputs.new_version }}
68
+ git push origin ${{ steps.get_version.outputs.new_version }}
69
+
70
+ - name: Create GitHub Release
71
+ if: steps.check_tag.outputs.exists == 'false'
72
+ uses: softprops/action-gh-release@v2
73
+ with:
74
+ tag_name: ${{ steps.get_version.outputs.new_version }}
75
+ name: Release ${{ steps.get_version.outputs.new_version }}
76
+ draft: false
77
+ prerelease: false
78
+ files: dist/*
79
+ generate_release_notes: true
80
+
81
+ # Uncomment to auto-publish to PyPI
82
+ # - name: Publish to PyPI
83
+ # uses: pypa/gh-action-pypi-publish@release/v1
84
+ # with:
85
+ # skip-existing: true
86
+ # # Use trusted publishing or add:
87
+ # # password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,110 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ - develop
9
+ pull_request:
10
+ branches:
11
+ - main
12
+ - master
13
+ - develop
14
+
15
+ jobs:
16
+ lint:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v5
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v6
24
+ with:
25
+ python-version: "3.14"
26
+ allow-prereleases: true
27
+ cache: 'pip'
28
+
29
+ - name: Install linting tools
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install -e ".[all]"
33
+ pip install ruff mypy
34
+
35
+ - name: Lint with ruff
36
+ run: ruff check gators/
37
+
38
+ - name: Type check with mypy
39
+ run: mypy gators/
40
+
41
+ test:
42
+ runs-on: ${{ matrix.os }}
43
+ permissions:
44
+ contents: write # to commit the generated coverage badge
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
49
+ os: [ubuntu-latest]
50
+ include:
51
+ - python-version: "3.13"
52
+ os: macos-latest
53
+
54
+ steps:
55
+ - name: Checkout code
56
+ uses: actions/checkout@v5
57
+
58
+ - name: Set up Python ${{ matrix.python-version }}
59
+ uses: actions/setup-python@v6
60
+ with:
61
+ python-version: ${{ matrix.python-version }}
62
+ cache: 'pip'
63
+
64
+ - name: Install libomp on macOS
65
+ if: runner.os == 'macOS'
66
+ run: brew install libomp
67
+
68
+ - name: Install dependencies
69
+ run: |
70
+ python -m pip install --upgrade pip
71
+ pip install -e ".[all]"
72
+
73
+ - name: Run tests with coverage
74
+ run: |
75
+ pytest
76
+
77
+ - name: Generate coverage badge
78
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
79
+ run: |
80
+ # coverage-badge imports pkg_resources, which recent setuptools no
81
+ # longer ships (removed in newer releases) - pin to a version that
82
+ # still includes it just for this step.
83
+ pip install "setuptools<81" coverage-badge
84
+ coverage-badge -f -o coverage.svg
85
+ echo "### Coverage" >> $GITHUB_STEP_SUMMARY
86
+ coverage report --format=markdown >> $GITHUB_STEP_SUMMARY || true
87
+
88
+ - name: Commit coverage badge
89
+ if: github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
90
+ run: |
91
+ git config user.name "github-actions[bot]"
92
+ git config user.email "github-actions[bot]@users.noreply.github.com"
93
+ git add coverage.svg
94
+ if ! git diff --cached --quiet; then
95
+ git commit -m "chore: update coverage badge [skip ci]"
96
+ git push origin HEAD:${{ github.ref_name }}
97
+ fi
98
+
99
+ - name: Build wheel
100
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
101
+ run: |
102
+ python -m pip install build
103
+ python -m build
104
+
105
+ - name: Upload wheel
106
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
107
+ uses: actions/upload-artifact@v5
108
+ with:
109
+ name: dist-packages
110
+ path: dist/
@@ -0,0 +1,42 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch: # Allow manual trigger
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write # Required for trusted publishing
13
+ contents: read
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v5
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v6
21
+ with:
22
+ python-version: '3.14'
23
+
24
+ - name: Install build dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install build twine
28
+
29
+ - name: Build package
30
+ run: python -m build
31
+
32
+ - name: Check package
33
+ run: twine check dist/*
34
+
35
+ - name: Publish to PyPI
36
+ uses: pypa/gh-action-pypi-publish@release/v1
37
+ with:
38
+ # Uses trusted publishing by default (recommended)
39
+ # No token needed if you configure trusted publishing at PyPI
40
+ # Alternatively, use a token:
41
+ # password: ${{ secrets.PYPI_API_TOKEN }}
42
+ skip-existing: true
@@ -0,0 +1,148 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ .pypirc
7
+
8
+ # C extensions
9
+ *.so
10
+ .DS_Store
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ # dist/
17
+ build/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ doc/
27
+ wheels/
28
+ pip-wheel-metadata/
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
+
59
+ # Translations
60
+ *.mo
61
+ *.pot
62
+
63
+ # Django stuff:
64
+ *.log
65
+ local_settings.py
66
+ db.sqlite3
67
+ db.sqlite3-journal
68
+
69
+ # Flask stuff:
70
+ instance/
71
+ .webassets-cache
72
+
73
+ # Scrapy stuff:
74
+ .scrapy
75
+
76
+ # Sphinx documentation
77
+ doc
78
+
79
+ # PyBuilder
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+ notebooks/
85
+
86
+ # IPython
87
+ profile_default/
88
+ ipython_config.py
89
+
90
+ # pyenv
91
+ .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
101
+ __pypackages__/
102
+
103
+ # Celery stuff
104
+ celerybeat-schedule
105
+ celerybeat.pid
106
+
107
+ # SageMath parsed files
108
+ *.sage.py
109
+
110
+ # Environments
111
+ .env
112
+ .venv
113
+ env/
114
+ venv/
115
+ ENV/
116
+ env.bak/
117
+ venv.bak/
118
+
119
+ # Spyder project settings
120
+ .spyderproject
121
+ .spyproject
122
+
123
+ # Rope project settings
124
+ .ropeproject
125
+
126
+ # mkdocs documentation
127
+ /site
128
+
129
+ # mypy
130
+ .mypy_cache/
131
+ .dmypy.json
132
+ dmypy.json
133
+
134
+ # Pyre type checker
135
+ .pyre/
136
+
137
+ tst*/
138
+
139
+ dist/dist/
140
+ build/
141
+ dist/
142
+ build/
143
+ htmlcov/
144
+ docs/build/
145
+
146
+ # Data files for examples
147
+ docs/source/examples/*.csv
148
+ docs/source/examples/*.zip
@@ -0,0 +1,32 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ - id: check-toml
11
+ - id: check-added-large-files
12
+ - id: check-merge-conflict
13
+ - id: mixed-line-ending
14
+
15
+ - repo: https://github.com/astral-sh/ruff-pre-commit
16
+ rev: v0.8.0
17
+ hooks:
18
+ # Lint + auto-fix. The "I" rule set (isort-equivalent import sorting) is already
19
+ # enabled in pyproject.toml's [tool.ruff.lint], so this replaces isort too.
20
+ - id: ruff
21
+ args: [--fix]
22
+ # Format. ruff format is a black-compatible formatter, so this replaces black.
23
+ - id: ruff-format
24
+
25
+ - repo: local
26
+ hooks:
27
+ - id: mypy
28
+ name: mypy
29
+ entry: mypy gators/
30
+ language: system
31
+ pass_filenames: false
32
+ types: [python]
@@ -0,0 +1,105 @@
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](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.4.0] - 2026-12-01
11
+
12
+ ### Added
13
+ - **Lazy execution**: `transform` accepts a `pl.LazyFrame` and returns a `pl.LazyFrame`, so a
14
+ fitted transformer or `Pipeline` becomes part of one Polars query that runs on `collect()`,
15
+ including `collect(engine="streaming")` and `sink_parquet`. Schema validation reads only the
16
+ frame's schema. `KNNImputer` and `IterativeImputer` compute with NumPy and collect the frame
17
+ at their step (A4).
18
+ - **Column selectors**: `subset` accepts a `polars.selectors` selector (`cs.numeric() - cs.by_name("id")`,
19
+ `cs.starts_with("amt_")`); the resolved columns are exposed as `subset_` (A1).
20
+ - **sklearn meta-estimators**: `clone`, `check_is_fitted`, `cross_val_score` and `GridSearchCV` work
21
+ with gators transformers and `Pipeline`, fitted or not (A5).
22
+ - **Schema validation**: `transform` raises `SchemaError` naming each missing column or changed dtype;
23
+ `align_schema(X, fill_missing=False)` reorders, drops extra columns and casts back to the fitted
24
+ schema (A6).
25
+ - **`y`-aware pipelines**: `transform_x_y(X, y)` on every transformer and `Pipeline`; row-removing
26
+ steps drop the same rows from `y`, and `Pipeline.fit` fits later steps on the realigned `y` (F1).
27
+ - `inverse_transform` for `Pipeline`, the discretizers and the ordinal, one-hot, binary, base-N,
28
+ contrast, target, WOE and count encoders (A3).
29
+ - New transformers (23):
30
+ - Data cleaning: `DropMissingRows` (F1), `SentinelToNull` (F4).
31
+ - Clippers: `OutlierTrimmer` (F2).
32
+ - Encoders: `LabelEncoder` for the target `y` (B6); `BaseNEncoder`, `SumEncoder`, `HelmertEncoder`,
33
+ `BackwardDifferenceEncoder`, `PolynomialEncoder` (B7).
34
+ - Feature generation: `FunctionTransformer` (E1), `ExpandingWindowFeatures`, `EWMFeatures` (E3),
35
+ `SplineFeatures` (E4).
36
+ - Scalers: `MaxAbsScaler` (C3), `QuantileTransformer` (C2), `Normalizer` (C4).
37
+ - Decomposition, a new module: `PCA`, `TruncatedSVD` (E2).
38
+ - Feature selection: `SelectKBest`, `SelectPercentile` (D1), `SelectFromModel` (D2), `RFE`,
39
+ `RFECV` (D3).
40
+ - New parameters:
41
+ - Encoders: `handle_unknown` / `handle_missing` (B2) and an output `dtype` (B8);
42
+ `OneHotEncoder(drop=, max_categories=)` (B1); `OrdinalEncoder` explicit category order and
43
+ `encoding_method="ordered"` (B3); `CountEncoder(normalize=)` (B5); `TargetEncoder(smooth=, cv=,
44
+ shuffle=, random_state=, target_type=)` with out-of-fold `fit_transform` and multiclass targets (B4).
45
+ - `IsNull(dtype=)` (B8).
46
+ - `BoxCox` and `YeoJohnson` estimate missing `lambdas` in `fit`, exposed as `lambdas_` (C1).
47
+ - `MinmaxScaler(feature_range=)` (C3).
48
+ - `NumericImputer` strategies `gaussian_tail`, `iqr_tail` (F3) and `interpolate` (F6).
49
+ - `RollingStatisticsFeatures(shift=)` (E3).
50
+ - `CastColumns` and `OrdinalFeatures` take `format`, `time_zone` and `source_time_zone` (E5);
51
+ `OrdinalFeatures` adds `month_start`, `month_end`, `quarter_start`, `quarter_end`,
52
+ `year_start`, `year_end` and `days_in_month` (E6).
53
+ - `TfidfFeatures(ngram_range=, stop_words=, max_df=, mode=)` with `tf`, `count` and `binary`
54
+ output modes; `NGram(ngram_range=)` (E7).
55
+ - ONNX converters for the six original feature selectors, `DropLowCardinality`,
56
+ `HighCardinalityFilter`, `Replace`, `KNNImputer`, a nested `Pipeline` (G1), and for every new
57
+ transformer that maps rows one by one.
58
+
59
+ ### Changed
60
+ - **Breaking:** `transform` and `fit_transform` on a `LazyFrame` return a `LazyFrame`; they used to
61
+ collect and return a `DataFrame`. Call `.collect()` on the result to get the previous output.
62
+ `align_schema` likewise keeps a `LazyFrame` lazy.
63
+ - `fit` no longer overwrites `subset`: `get_params` and `clone` return the parameters as given, and a
64
+ refit on a frame with other columns detects its columns again. `OneHotEncoder` keeps learned
65
+ categories in `column_categories_` instead of overwriting `column_categories`.
66
+ - Imputer auto-detection (`subset=None`) handles Categorical, Enum and temporal columns:
67
+ `StringImputer` picks up Categorical and Enum columns, and `NumericImputer` selects numeric
68
+ columns only instead of raising on a Categorical column or turning a Date into a Datetime.
69
+ Temporal columns named in `NumericImputer(subset=)` keep their dtype (F5).
70
+
71
+ ### Fixed
72
+ - `get_feature_names_out` returns the exact output columns for every transformer and `Pipeline`;
73
+ about 45 transformers used to return their input columns (A2).
74
+ - `CyclicFeatures` no longer raises on a `Date` column; it tried to parse it as a string.
75
+ - `CustomDiscretizer` accepts `-inf` / `inf` bin edges, as its documentation says, instead of
76
+ raising a `ShapeError`.
77
+ - `KNNImputer(subset=None)` no longer raises when fitted on a frame without nulls.
78
+ - `compute_iv` returns the features in input column order instead of a random order.
79
+ - Docstring examples run and show the actual output; a test now runs them all.
80
+ - `Pipeline.get_initial_features()` and `trim_to()` work without the `onnx` extra; the
81
+ column tracing they rely on no longer imports onnx (#30).
82
+ - `TreeBasedDiscretizer` no longer needs pandas; it reads the split thresholds from
83
+ `booster_.dump_model()` (#29).
84
+ - `TargetEncoder` encodes a column whose categories `min_count` all dropped as unknown instead
85
+ of leaving it unencoded.
86
+ - The clippers and `OutlierTrimmer` pass a frame with no numeric column through unchanged.
87
+
88
+ ## [1.0.1] - 2026-03-13
89
+
90
+ ### Added
91
+ - Initial public release of Gators
92
+ - 60+ preprocessing transformers across multiple categories:
93
+ - Data cleaning (13 transformers)
94
+ - Categorical encoding (9 encoders)
95
+ - Feature generation for numeric, string, and datetime data (29 generators)
96
+ - Missing value imputation (4 imputers)
97
+ - Discretization (6 discretizers)
98
+ - Feature scaling (3 scalers)
99
+ - Pipeline support for chaining transformers
100
+ - Comprehensive test suite with 867 tests and 87% coverage
101
+ - CI/CD with GitHub Actions
102
+ - MIT License
103
+
104
+ [Unreleased]: https://github.com/paypal/gators/compare/v1.0.1...HEAD
105
+ [1.0.1]: https://github.com/paypal/gators/releases/tag/v1.0.1
@@ -0,0 +1,17 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: "Poli"
5
+ given-names: "Charles"
6
+ email: "cpoli@paypal.com"
7
+ title: "Gators: Lightning-Fast ML Preprocessing with Polars"
8
+ version: 1.0.0
9
+ date-released: 2026-01-01
10
+ url: "https://github.com/paypal/gators"
11
+ repository-code: "https://github.com/paypal/gators"
12
+ license: Apache-2.0
13
+ keywords:
14
+ - machine-learning
15
+ - preprocessing
16
+ - feature-engineering
17
+ - polars