chemotools 0.1.11__tar.gz → 0.1.16__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 (128) hide show
  1. chemotools-0.1.16/.gitattributes +2 -0
  2. chemotools-0.1.16/.github/dependabot.yml +14 -0
  3. chemotools-0.1.16/.github/labels.yml +1 -0
  4. chemotools-0.1.16/.github/release-drafter.yml +1 -0
  5. chemotools-0.1.16/.github/workflows/ci.yml +68 -0
  6. chemotools-0.1.16/.github/workflows/python-release.yml +47 -0
  7. chemotools-0.1.16/.github/workflows/release-drafter.yml +41 -0
  8. chemotools-0.1.16/.gitignore +138 -0
  9. chemotools-0.1.16/CODE_OF_CONDUCT.md +128 -0
  10. chemotools-0.1.16/CONTRIBUTING.md +82 -0
  11. chemotools-0.1.16/PKG-INFO +104 -0
  12. chemotools-0.1.16/README.md +82 -0
  13. chemotools-0.1.16/SECURITY.md +11 -0
  14. chemotools-0.1.16/Taskfile.yml +91 -0
  15. chemotools-0.1.16/assets/images/banner_dark.png +0 -0
  16. chemotools-0.1.16/assets/images/banner_light.png +0 -0
  17. chemotools-0.1.16/assets/images/logo_pixel.png +0 -0
  18. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/augmentation/_index_shift.py +2 -2
  19. chemotools-0.1.16/pyproject.toml +40 -0
  20. chemotools-0.1.16/tests/__init__.py +0 -0
  21. chemotools-0.1.16/tests/augmentation/test_add_noise.py +54 -0
  22. chemotools-0.1.16/tests/augmentation/test_baseline_shift.py +30 -0
  23. chemotools-0.1.16/tests/augmentation/test_fractional_shift.py +118 -0
  24. chemotools-0.1.16/tests/augmentation/test_gaussian_broadening.py +6 -0
  25. chemotools-0.1.16/tests/augmentation/test_index_shift.py +119 -0
  26. chemotools-0.1.16/tests/augmentation/test_spectrum_scale.py +24 -0
  27. chemotools-0.1.16/tests/baseline/test_air_pls.py +24 -0
  28. chemotools-0.1.16/tests/baseline/test_ar_pls.py +25 -0
  29. chemotools-0.1.16/tests/baseline/test_constant_baseline.py +42 -0
  30. chemotools-0.1.16/tests/baseline/test_cubic_spline_correction.py +15 -0
  31. chemotools-0.1.16/tests/baseline/test_linear_correction.py +24 -0
  32. chemotools-0.1.16/tests/baseline/test_non_negative.py +37 -0
  33. chemotools-0.1.16/tests/baseline/test_polynomial_correction.py +15 -0
  34. chemotools-0.1.16/tests/baseline/test_subtract_reference.py +35 -0
  35. chemotools-0.1.16/tests/conftest.py +157 -0
  36. chemotools-0.1.16/tests/datasets/test_datasets.py +93 -0
  37. chemotools-0.1.16/tests/derivative/test_norris_williams.py +55 -0
  38. chemotools-0.1.16/tests/derivative/test_savitzky_golay.py +54 -0
  39. chemotools-0.1.16/tests/feature_selection/test_index_selector.py +75 -0
  40. chemotools-0.1.16/tests/feature_selection/test_range_cut.py +83 -0
  41. chemotools-0.1.16/tests/feature_selection/test_sr_selector.py +49 -0
  42. chemotools-0.1.16/tests/feature_selection/test_vip_selector.py +25 -0
  43. chemotools-0.1.16/tests/outliers/test_base.py +68 -0
  44. chemotools-0.1.16/tests/outliers/test_leverage.py +23 -0
  45. chemotools-0.1.16/tests/outliers/test_residuals.py +121 -0
  46. chemotools-0.1.16/tests/outliers/test_studentized_residuals.py +30 -0
  47. chemotools-0.1.16/tests/resources/reference_airpls.csv +339 -0
  48. chemotools-0.1.16/tests/resources/reference_arpls.csv +379 -0
  49. chemotools-0.1.16/tests/resources/reference_msc_mean.csv +1 -0
  50. chemotools-0.1.16/tests/resources/reference_msc_median.csv +1 -0
  51. chemotools-0.1.16/tests/resources/reference_sg_15_2.csv +1 -0
  52. chemotools-0.1.16/tests/resources/reference_snv.csv +1 -0
  53. chemotools-0.1.16/tests/resources/reference_whittaker.csv +339 -0
  54. chemotools-0.1.16/tests/resources/spectrum.csv +339 -0
  55. chemotools-0.1.16/tests/resources/spectrum_arpls.csv +379 -0
  56. chemotools-0.1.16/tests/scale/test_min_max_scaler.py +42 -0
  57. chemotools-0.1.16/tests/scale/test_norm_scaler.py +39 -0
  58. chemotools-0.1.16/tests/scale/test_point_scaler.py +38 -0
  59. chemotools-0.1.16/tests/scatter/test_extended_multiplicative_scatter_correction.py +127 -0
  60. chemotools-0.1.16/tests/scatter/test_multiplicative_scatter_correction.py +104 -0
  61. chemotools-0.1.16/tests/scatter/test_robust_normal_variate.py +26 -0
  62. chemotools-0.1.16/tests/scatter/test_standard_normal_variate.py +24 -0
  63. chemotools-0.1.16/tests/smooth/test_mean_filter.py +25 -0
  64. chemotools-0.1.16/tests/smooth/test_median_filter.py +25 -0
  65. chemotools-0.1.16/tests/smooth/test_savitzky_golay_filter.py +15 -0
  66. chemotools-0.1.16/tests/smooth/test_whittaker_smooth.py +24 -0
  67. chemotools-0.1.16/uv.lock +963 -0
  68. chemotools-0.1.11/PKG-INFO +0 -105
  69. chemotools-0.1.11/README.md +0 -85
  70. chemotools-0.1.11/pyproject.toml +0 -38
  71. {chemotools-0.1.11 → chemotools-0.1.16}/LICENSE +0 -0
  72. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/__init__.py +0 -0
  73. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/augmentation/__init__.py +0 -0
  74. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/augmentation/_add_noise.py +0 -0
  75. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/augmentation/_baseline_shift.py +0 -0
  76. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/augmentation/_fractional_shift.py +0 -0
  77. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/augmentation/_gaussian_broadening.py +0 -0
  78. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/augmentation/_spectrum_scale.py +0 -0
  79. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/__init__.py +0 -0
  80. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_air_pls.py +0 -0
  81. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_ar_pls.py +0 -0
  82. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_constant_baseline_correction.py +0 -0
  83. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_cubic_spline_correction.py +0 -0
  84. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_linear_correction.py +0 -0
  85. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_non_negative.py +0 -0
  86. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_polynomial_correction.py +0 -0
  87. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/baseline/_subtract_reference.py +0 -0
  88. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/__init__.py +0 -0
  89. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/_base.py +0 -0
  90. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/data/__init__.py +0 -0
  91. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/data/coffee_labels.csv +0 -0
  92. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/data/coffee_spectra.csv +0 -0
  93. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/data/fermentation_hplc.csv +0 -0
  94. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/data/fermentation_spectra.csv +0 -0
  95. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/data/train_hplc.csv +0 -0
  96. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/datasets/data/train_spectra.csv +0 -0
  97. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/derivative/__init__.py +0 -0
  98. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/derivative/_norris_william.py +0 -0
  99. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/derivative/_savitzky_golay.py +0 -0
  100. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/feature_selection/__init__.py +0 -0
  101. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/feature_selection/_base.py +0 -0
  102. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/feature_selection/_index_selector.py +0 -0
  103. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/feature_selection/_range_cut.py +0 -0
  104. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/feature_selection/_sr_selector.py +0 -0
  105. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/feature_selection/_vip_selector.py +0 -0
  106. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/__init__.py +0 -0
  107. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/_base.py +0 -0
  108. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/dmodx.py +0 -0
  109. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/hotelling_t2.py +0 -0
  110. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/leverage.py +0 -0
  111. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/q_residuals.py +0 -0
  112. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/studentized_residuals.py +0 -0
  113. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/outliers/utils.py +0 -0
  114. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scale/__init__.py +0 -0
  115. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scale/_min_max_scaler.py +0 -0
  116. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scale/_norm_scaler.py +0 -0
  117. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scale/_point_scaler.py +0 -0
  118. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scatter/__init__.py +0 -0
  119. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scatter/_extended_multiplicative_scatter_correction.py +0 -0
  120. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scatter/_multiplicative_scatter_correction.py +0 -0
  121. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scatter/_robust_normal_variate.py +0 -0
  122. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/scatter/_standard_normal_variate.py +0 -0
  123. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/smooth/__init__.py +0 -0
  124. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/smooth/_mean_filter.py +0 -0
  125. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/smooth/_median_filter.py +0 -0
  126. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/smooth/_savitzky_golay_filter.py +0 -0
  127. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/smooth/_whittaker_smooth.py +0 -0
  128. {chemotools-0.1.11 → chemotools-0.1.16}/chemotools/utils/__init__.py +0 -0
@@ -0,0 +1,2 @@
1
+ # make language python
2
+ *.html linguist-language=Python
@@ -0,0 +1,14 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "pip"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "daily"
12
+ commit-message:
13
+ prefix: "chore"
14
+ include: "scope"
@@ -0,0 +1 @@
1
+ _extends: .github
@@ -0,0 +1 @@
1
+ _extends: .github
@@ -0,0 +1,68 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '**'
7
+ pull_request:
8
+
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ build-linux:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ python-version: ['3.10', '3.11', '3.12', '3.13']
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v6
28
+
29
+ - name: Install Task
30
+ uses: arduino/setup-task@v2
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+
34
+ - name: Print versions
35
+ run: |
36
+ python --version
37
+ uv --version
38
+ task --version
39
+
40
+ # 1. Install dependencies
41
+ - name: Install dependencies
42
+ run: task install
43
+
44
+ # 2. Format (check-only)
45
+ - name: Check formatting
46
+ run: task format-check
47
+
48
+ # 3. Lint
49
+ - name: Run linting
50
+ run: task lint
51
+
52
+ # 4. Type-check
53
+ - name: Run type checking
54
+ run: task type-check
55
+
56
+ # 5. Tests with coverage
57
+ - name: Run tests with coverage
58
+ run: task coverage
59
+
60
+ # 6. Upload coverage reports to Codecov
61
+ - name: Upload coverage reports to Codecov
62
+ uses: codecov/codecov-action@v3
63
+ with:
64
+ token: ${{ secrets.CODECOV_TOKEN }}
65
+
66
+ # 7. Build package
67
+ - name: Build package
68
+ run: task build
@@ -0,0 +1,47 @@
1
+ name: Publish Python 🐍 distributions 📦 to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ release:
9
+ runs-on: ubuntu-latest
10
+ environment: release
11
+ permissions:
12
+ id-token: write
13
+
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v6
25
+
26
+ - name: Install Task
27
+ uses: arduino/setup-task@v2
28
+ env:
29
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30
+
31
+ - name: Print versions
32
+ run: |
33
+ python --version
34
+ uv --version
35
+ task --version
36
+
37
+ # 1. Install dependencies
38
+ - name: Install dependencies
39
+ run: task install
40
+
41
+ # 2. Build package
42
+ - name: Build package
43
+ run: task build
44
+
45
+ # 3. Publish to PyPI
46
+ - name: Publish package distributions to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,41 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ # branches to consider in the event; optional, defaults to all
6
+ branches:
7
+ - master
8
+ # pull_request event is required only for autolabeler
9
+ pull_request:
10
+ # Only following types are handled by the action, but one can default to all as well
11
+ types: [opened, reopened, synchronize]
12
+ # pull_request_target event is required for autolabeler to support PRs from forks
13
+ # pull_request_target:
14
+ # types: [opened, reopened, synchronize]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ update_release_draft:
21
+ permissions:
22
+ # write permission is required to create a github release
23
+ contents: write
24
+ # write permission is required for autolabeler
25
+ # otherwise, read permission is required at least
26
+ pull-requests: write
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ # (Optional) GitHub Enterprise requires GHE_HOST variable set
30
+ #- name: Set GHE_HOST
31
+ # run: |
32
+ # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
33
+
34
+ # Drafts your next Release notes as Pull Requests are merged into "master"
35
+ - uses: release-drafter/release-drafter@v5
36
+ # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
37
+ # with:
38
+ # config-name: my-config.yml
39
+ # disable-autolabeler: true
40
+ env:
41
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,138 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv*
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Notebooks
129
+ *.ipynb
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # VScode
135
+ .vscode/
136
+
137
+ # Task files
138
+ *.task
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ .
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,82 @@
1
+ # Contributing to chemotools
2
+
3
+ Thanks for your interest in contributing to **`chemotools`** 🎉
4
+ We welcome bug reports, feature ideas, code improvements, and documentation updates. Every contribution helps!
5
+
6
+ You can also check the [Project Board](https://github.com/users/paucablop/projects/4) to see what’s currently in progress.
7
+
8
+ ---
9
+
10
+ ## Guidelines
11
+
12
+ `chemotools` is designed for production use, with a focus on **quality and consistency**.
13
+ When contributing, please keep in mind:
14
+
15
+ - ✅ **Follow the Scikit-Learn API**
16
+ All transformers must implement the [scikit-learn API](https://scikit-learn.org/stable/developers/develop.html) for interoperability.
17
+
18
+ - ✅ **Avoid redundancy**
19
+ Don’t re-implement functionality already available in other libraries that follow the same API.
20
+
21
+ - ✅ **Write tests**
22
+ Every new function or fix must include unit tests to ensure reliability.
23
+
24
+ - ✅ **Maintain quality**
25
+ Use the provided tooling (formatting, linting, typing, tests) to keep the codebase consistent.
26
+
27
+ ---
28
+
29
+ ## How to Contribute
30
+
31
+ 1. **Report issues**
32
+ - For bugs: open an [issue](https://github.com/paucablop/chemotools/issues) with steps to reproduce and sample code/data if possible.
33
+ - For enhancements: describe the idea, its benefits, and example usage.
34
+
35
+ 2. **Propose changes**
36
+ - Open an issue first so we can discuss scope.
37
+ - Create a new branch for your contribution.
38
+ - Make your changes, including tests and documentation updates if needed.
39
+ - Branches should be shor-lived with a well defined scope, follwoing a [truck-based development](https://trunkbaseddevelopment.com/) philosophy.
40
+
41
+ 3. **Check your work**
42
+ Use the [Taskfile](./Taskfile.yml) for a quick workflow:
43
+
44
+ ```bash
45
+ task install # install dependencies
46
+ task check # run formatting, linting, typing, tests
47
+ task coverage # run tests with coverage
48
+ task build # build the package
49
+ ```
50
+
51
+ 4. **Open a Pull Request (PR)**
52
+
53
+ * Explain what the change does and why.
54
+ * Ensure CI checks pass (formatting, lint, type checks, tests).
55
+ * Be responsive to feedback.
56
+
57
+
58
+ ## Code Style
59
+
60
+ * Code is automatically formatted and linted using [Ruff](https://docs.astral.sh/ruff/).
61
+ * Type checking is done with [MyPy](http://mypy-lang.org/).
62
+ * Follow general Python best practices: descriptive names, no magic numbers, clear docstrings.
63
+
64
+
65
+
66
+ ## Testing & Coverage
67
+
68
+ * Run tests with:
69
+
70
+ ```bash
71
+ task test
72
+ ```
73
+
74
+ * Coverage is tracked with [Codecov](https://codecov.io/). PRs should not reduce coverage.
75
+
76
+ ---
77
+
78
+ ## License
79
+
80
+ By contributing, you agree that your contributions will be licensed under the project’s [MIT License](LICENSE).
81
+
82
+
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: chemotools
3
+ Version: 0.1.16
4
+ Summary: chemotools: A Python Package that Integrates Chemometrics and scikit-learn
5
+ Author: Pau Cabaneros
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.10
9
+ Requires-Dist: numpy<3,>=2.0.0
10
+ Requires-Dist: pandas<3,>=2.0.0
11
+ Requires-Dist: polars<2,>=1.17.0
12
+ Requires-Dist: pyarrow<21,>=18
13
+ Requires-Dist: scikit-learn<2,>=1.4.0
14
+ Provides-Extra: dev
15
+ Requires-Dist: mypy<2,>=1.13.0; extra == 'dev'
16
+ Requires-Dist: pandas-stubs<3,>=2.2.3.241126; extra == 'dev'
17
+ Requires-Dist: pytest-cov>=6.3.0; extra == 'dev'
18
+ Requires-Dist: pytest<9,>=8.3.0; extra == 'dev'
19
+ Requires-Dist: ruff<0.9,>=0.8.0; extra == 'dev'
20
+ Requires-Dist: scipy-stubs<2,>=1.15.1.0; extra == 'dev'
21
+ Description-Content-Type: text/markdown
22
+
23
+ ![chemotools](assets/images/banner_dark.png)
24
+
25
+ # chemotools
26
+
27
+
28
+ [![PyPI](https://img.shields.io/pypi/v/chemotools)](https://pypi.org/project/chemotools)
29
+ [![Python Versions](https://img.shields.io/pypi/pyversions/chemotools)](https://pypi.org/project/chemotools)
30
+ [![License](https://img.shields.io/pypi/l/chemotools)](https://github.com/paucablop/chemotools/blob/main/LICENSE)
31
+ [![Coverage](https://codecov.io/github/paucablop/chemotools/branch/main/graph/badge.svg?token=D7JUJM89LN)](https://codecov.io/github/paucablop/chemotools)
32
+ [![Downloads](https://static.pepy.tech/badge/chemotools)](https://pepy.tech/project/chemotools)
33
+ [![DOI](https://joss.theoj.org/papers/10.21105/joss.06802/status.svg)](https://doi.org/10.21105/joss.06802)
34
+
35
+ ---
36
+
37
+ `chemotools` is a Python library that brings **chemometric preprocessing tools** into the [`scikit-learn`](https://scikit-learn.org/) ecosystem.
38
+
39
+ It provides modular transformers for spectral data, designed to plug seamlessly into your ML workflows.
40
+
41
+ ## Features
42
+
43
+ - Preprocessing for spectral data (baseline correction, smoothing, scaling, derivatization, scatter correction).
44
+ - Fully compatible with `scikit-learn` pipelines and transformers.
45
+ - Simple, modular API for flexible workflows.
46
+ - Open-source, actively maintained, and published on [PyPI](https://pypi.org/project/chemotools/) and [Conda](https://anaconda.org/conda-forge/chemotools).
47
+
48
+ ## Installation
49
+
50
+ Install from PyPI:
51
+
52
+ ```bash
53
+ pip install chemotools
54
+ ````
55
+
56
+ Install from Conda:
57
+
58
+ ```bash
59
+ conda install -c conda-forge chemotools
60
+ ```
61
+
62
+ ## Usage
63
+
64
+ Example: preprocessing pipeline with scikit-learn:
65
+
66
+ ```python
67
+ from sklearn.preprocessing import StandardScaler
68
+ from sklearn.pipeline import make_pipeline
69
+
70
+ from chemotools.baseline import AirPls
71
+ from chemotools.scatter import MultiplicativeScatterCorrection
72
+
73
+ preprocessing = make_pipeline(
74
+ AirPls(),
75
+ MultiplicativeScatterCorrection(),
76
+ StandardScaler(with_std=False),
77
+ )
78
+
79
+ spectra_transformed = preprocessing.fit_transform(spectra)
80
+ ```
81
+
82
+ ➡️ See the [documentation](https://paucablop.github.io/chemotools/) for full details.
83
+
84
+ ## Development
85
+
86
+ This project uses [uv](https://github.com/astral-sh/uv) for dependency management and [Task](https://taskfile.dev) to simplify common development workflows.
87
+ You can get started quickly by using the predefined [Taskfile](./Taskfile.yml), which provides handy shortcuts such as:
88
+
89
+ ```bash
90
+ task install # install all dependencies
91
+ task check # run formatting, linting, typing, and tests
92
+ task coverage # run tests with coverage reporting
93
+ task build # build the package for distribution
94
+ ```
95
+
96
+ ## Contributing
97
+
98
+ Contributions are welcome!
99
+ Check out the [contributing guide](CONTRIBUTING.md) and the [project board](https://github.com/users/paucablop/projects/4).
100
+
101
+ ## License
102
+
103
+ Released under the [MIT License](LICENSE).
104
+