Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: btschwertfeger/python-cmethods
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.5.4
Choose a base ref
...
head repository: btschwertfeger/python-cmethods
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 9, 2022

  1. fixed missing netCDF4 import; fixed 'cannot pickle' on adjust_3d func…

    …tions; adjusted filenames in examples and readme;
    btschwertfeger committed Nov 9, 2022
    Copy the full SHA
    9a52b98 View commit details

Commits on Nov 13, 2022

  1. Copy the full SHA
    36f42cd View commit details

Commits on Nov 14, 2022

  1. adjusted requirements.txt; disabled other adjustment kinds except '+'…

    … for variance_scaling; minor changes in readme
    btschwertfeger committed Nov 14, 2022
    Copy the full SHA
    b253fd4 View commit details

Commits on Nov 28, 2022

  1. Copy the full SHA
    eacda23 View commit details
  2. actions > workflows

    btschwertfeger committed Nov 28, 2022
    Copy the full SHA
    77490c2 View commit details
  3. Copy the full SHA
    687e55f View commit details
  4. Copy the full SHA
    a70b13e View commit details
  5. Copy the full SHA
    6124c80 View commit details
  6. Copy the full SHA
    87277de View commit details

Commits on Dec 2, 2022

  1. Copy the full SHA
    051b649 View commit details
  2. adjusted workflow

    btschwertfeger committed Dec 2, 2022
    Copy the full SHA
    a9f8356 View commit details

Commits on Feb 27, 2023

  1. added DOI in README

    btschwertfeger committed Feb 27, 2023
    Copy the full SHA
    ac0db0e View commit details
  2. extended typing

    btschwertfeger committed Feb 27, 2023
    Copy the full SHA
    2a0aa86 View commit details
  3. added unittests

    btschwertfeger committed Feb 27, 2023
    Copy the full SHA
    464fe8d View commit details
  4. Copy the full SHA
    10393ce View commit details

Commits on Mar 4, 2023

  1. Copy the full SHA
    cf66139 View commit details
  2. added unittests

    btschwertfeger committed Mar 4, 2023
    Copy the full SHA
    8536683 View commit details
  3. Copy the full SHA
    e5f4870 View commit details
  4. Copy the full SHA
    48e698c View commit details
  5. Copy the full SHA
    de6030c View commit details
  6. Copy the full SHA
    01844d9 View commit details
  7. fixed workflows #4

    btschwertfeger committed Mar 4, 2023
    Copy the full SHA
    18c84cb View commit details
  8. added codecov badge

    btschwertfeger committed Mar 4, 2023
    Copy the full SHA
    3d5aced View commit details

Commits on Mar 5, 2023

  1. Copy the full SHA
    e343631 View commit details
  2. extended tests

    btschwertfeger committed Mar 5, 2023
    Copy the full SHA
    3e220d9 View commit details
  3. added test

    btschwertfeger committed Mar 5, 2023
    Copy the full SHA
    e8ff733 View commit details

Commits on Mar 11, 2023

  1. Copy the full SHA
    e045c32 View commit details
  2. edited readme

    btschwertfeger committed Mar 11, 2023
    Copy the full SHA
    d941f19 View commit details

Commits on Mar 14, 2023

  1. added pre-commit

    btschwertfeger committed Mar 14, 2023
    Copy the full SHA
    32d796e View commit details
  2. updated pylintrc

    btschwertfeger committed Mar 14, 2023
    Copy the full SHA
    19eb121 View commit details
  3. added encoding

    btschwertfeger committed Mar 14, 2023
    Copy the full SHA
    4dff316 View commit details
  4. removed run_pylint.sh

    btschwertfeger committed Mar 14, 2023
    Copy the full SHA
    1caf69f View commit details
  5. adjusted workflows

    btschwertfeger committed Mar 14, 2023
    Copy the full SHA
    365468a View commit details
  6. misc

    btschwertfeger committed Mar 14, 2023
    Copy the full SHA
    8f05e3e View commit details
  7. create v0.6.2

    btschwertfeger committed Mar 14, 2023
    Copy the full SHA
    9a90fe1 View commit details
  8. Merge pull request #1 from btschwertfeger/dev

    Added pre-commit workflow to standardize the code base
    btschwertfeger authored Mar 14, 2023
    Copy the full SHA
    f21ae59 View commit details

Commits on Mar 22, 2023

  1. Copy the full SHA
    0d7f661 View commit details
  2. fixed tests

    btschwertfeger committed Mar 22, 2023
    Copy the full SHA
    ac138a6 View commit details
  3. Merge pull request #4 from btschwertfeger/dev

    Removed forced 'time.month' grouping in `adjust_3d` when no group was specified
    btschwertfeger authored Mar 22, 2023
    Copy the full SHA
    e72fc40 View commit details
  4. Copy the full SHA
    1203a06 View commit details

Commits on Apr 10, 2023

  1. Copy the full SHA
    c9c6aac View commit details
  2. Copy the full SHA
    4fffe21 View commit details
  3. Copy the full SHA
    aa784cb View commit details
  4. fix workflow

    btschwertfeger committed Apr 10, 2023
    Copy the full SHA
    4154c72 View commit details
  5. Merge pull request #11 from btschwertfeger/7-move-from-setuppy-to-pyp…

    …rojecttoml
    
    Move from setup.py to pyproject.toml
    btschwertfeger authored Apr 10, 2023
    Copy the full SHA
    9179527 View commit details
  6. Copy the full SHA
    eaa20a0 View commit details
  7. Merge pull request #12 from btschwertfeger/8-create-a-release-workflo…

    …w-for-dev-and-production-releases
    
    Improving workflows - adding release workflow
    btschwertfeger authored Apr 10, 2023
    Copy the full SHA
    41e37c1 View commit details
  8. Copy the full SHA
    f1ae182 View commit details
  9. Copy the full SHA
    5ffeb13 View commit details
  10. adjusted the readme

    btschwertfeger committed Apr 10, 2023
    Copy the full SHA
    cabb3b4 View commit details
Showing with 8,257 additions and 2,161 deletions.
  1. +8 −0 .gitattributes
  2. +1 −0 .github/CODEOWNERS
  3. +40 −0 .github/ISSUE_TEMPLATE/bug_report.md
  4. +19 −0 .github/ISSUE_TEMPLATE/feature_request.md
  5. +21 −0 .github/SECURITY.md
  6. +23 −0 .github/codecov.yml
  7. +10 −0 .github/dependabot.yaml
  8. +39 −0 .github/release.yaml
  9. +104 −0 .github/workflows/_build.yaml
  10. +44 −0 .github/workflows/_build_doc.yaml
  11. +64 −0 .github/workflows/_codecov.yaml
  12. +74 −0 .github/workflows/_codeql.yaml
  13. +23 −0 .github/workflows/_pre_commit.yaml
  14. +44 −0 .github/workflows/_pypi_publish.yaml
  15. +41 −0 .github/workflows/_pypi_test_publish.yaml
  16. +44 −0 .github/workflows/_test.yaml
  17. +124 −0 .github/workflows/cicd.yaml
  18. +41 −0 .github/workflows/dependabot_auto_approve.yaml
  19. +72 −0 .github/workflows/scorecard.yml
  20. +87 −4 .gitignore
  21. +88 −0 .pre-commit-config.yaml
  22. +22 −0 .readthedocs.yaml
  23. +345 −0 CHANGELOG.md
  24. +9 −0 CITATION
  25. +1 −1 LICENSE
  26. +13 −0 MANIFEST.in
  27. +117 −0 Makefile
  28. +267 −82 README.md
  29. +0 −704 cmethods/CMethods.py
  30. +209 −0 cmethods/__init__.py
  31. +0 −2 cmethods/__version__.py
  32. +197 −0 cmethods/core.py
  33. +272 −0 cmethods/distribution.py
  34. +0 −3 cmethods/requirements.txt
  35. +156 −0 cmethods/scaling.py
  36. +40 −0 cmethods/static.py
  37. +0 −128 cmethods/tests/testing.py
  38. +20 −0 cmethods/types.py
  39. +257 −0 cmethods/utils.py
  40. +23 −0 doc/Makefile
  41. BIN { → doc/_static}/images/biasCdiagram.png
  42. BIN { → doc/_static}/images/dm-doy-plot.png
  43. BIN doc/_static/images/qm-cdf-plot-1.png
  44. BIN doc/_static/images/qm-cdf-plot-2.png
  45. +43 −0 doc/cli.rst
  46. +24 −0 doc/cmethods.rst
  47. +69 −0 doc/conf.py
  48. +189 −0 doc/getting_started.rst
  49. +22 −0 doc/index.rst
  50. +115 −0 doc/introduction.rst
  51. +18 −0 doc/issues.rst
  52. +13 −0 doc/license.rst
  53. +51 −0 doc/links.rst
  54. +35 −0 doc/make.bat
  55. +530 −0 doc/methods.rst
  56. +10 −0 doc/requirements.txt
  57. +0 −102 examples/do_bias_correction.py
  58. +622 −127 examples/examples.ipynb
  59. +0 −875 examples/private.test.ipynb
  60. +4 −0 examples/requirements.txt
  61. +318 −0 pyproject.toml
  62. +12 −133 setup.py
  63. +10 −0 tests/README.rst
  64. +8 −0 tests/__init__.py
  65. +100 −0 tests/conftest.py
  66. +1 −0 tests/fixture/precipitation_obsh.zarr/.zattrs
  67. +3 −0 tests/fixture/precipitation_obsh.zarr/.zgroup
  68. +117 −0 tests/fixture/precipitation_obsh.zarr/.zmetadata
  69. +20 −0 tests/fixture/precipitation_obsh.zarr/lat/.zarray
  70. +5 −0 tests/fixture/precipitation_obsh.zarr/lat/.zattrs
  71. BIN tests/fixture/precipitation_obsh.zarr/lat/0
  72. +20 −0 tests/fixture/precipitation_obsh.zarr/lon/.zarray
  73. +5 −0 tests/fixture/precipitation_obsh.zarr/lon/.zattrs
  74. BIN tests/fixture/precipitation_obsh.zarr/lon/0
  75. +24 −0 tests/fixture/precipitation_obsh.zarr/pr/.zarray
  76. +7 −0 tests/fixture/precipitation_obsh.zarr/pr/.zattrs
  77. BIN tests/fixture/precipitation_obsh.zarr/pr/0.0.0
  78. BIN tests/fixture/precipitation_obsh.zarr/pr/0.1.0
  79. BIN tests/fixture/precipitation_obsh.zarr/pr/1.0.0
  80. BIN tests/fixture/precipitation_obsh.zarr/pr/1.1.0
  81. +20 −0 tests/fixture/precipitation_obsh.zarr/time/.zarray
  82. +7 −0 tests/fixture/precipitation_obsh.zarr/time/.zattrs
  83. BIN tests/fixture/precipitation_obsh.zarr/time/0
  84. +1 −0 tests/fixture/precipitation_obsp.zarr/.zattrs
  85. +3 −0 tests/fixture/precipitation_obsp.zarr/.zgroup
  86. +117 −0 tests/fixture/precipitation_obsp.zarr/.zmetadata
  87. +20 −0 tests/fixture/precipitation_obsp.zarr/lat/.zarray
  88. +5 −0 tests/fixture/precipitation_obsp.zarr/lat/.zattrs
  89. BIN tests/fixture/precipitation_obsp.zarr/lat/0
  90. +20 −0 tests/fixture/precipitation_obsp.zarr/lon/.zarray
  91. +5 −0 tests/fixture/precipitation_obsp.zarr/lon/.zattrs
  92. BIN tests/fixture/precipitation_obsp.zarr/lon/0
  93. +24 −0 tests/fixture/precipitation_obsp.zarr/pr/.zarray
  94. +7 −0 tests/fixture/precipitation_obsp.zarr/pr/.zattrs
  95. BIN tests/fixture/precipitation_obsp.zarr/pr/0.0.0
  96. BIN tests/fixture/precipitation_obsp.zarr/pr/0.1.0
  97. BIN tests/fixture/precipitation_obsp.zarr/pr/1.0.0
  98. BIN tests/fixture/precipitation_obsp.zarr/pr/1.1.0
  99. +20 −0 tests/fixture/precipitation_obsp.zarr/time/.zarray
  100. +7 −0 tests/fixture/precipitation_obsp.zarr/time/.zattrs
  101. BIN tests/fixture/precipitation_obsp.zarr/time/0
  102. +1 −0 tests/fixture/precipitation_simh.zarr/.zattrs
  103. +3 −0 tests/fixture/precipitation_simh.zarr/.zgroup
  104. +117 −0 tests/fixture/precipitation_simh.zarr/.zmetadata
  105. +20 −0 tests/fixture/precipitation_simh.zarr/lat/.zarray
  106. +5 −0 tests/fixture/precipitation_simh.zarr/lat/.zattrs
  107. BIN tests/fixture/precipitation_simh.zarr/lat/0
  108. +20 −0 tests/fixture/precipitation_simh.zarr/lon/.zarray
  109. +5 −0 tests/fixture/precipitation_simh.zarr/lon/.zattrs
  110. BIN tests/fixture/precipitation_simh.zarr/lon/0
  111. +24 −0 tests/fixture/precipitation_simh.zarr/pr/.zarray
  112. +7 −0 tests/fixture/precipitation_simh.zarr/pr/.zattrs
  113. BIN tests/fixture/precipitation_simh.zarr/pr/0.0.0
  114. BIN tests/fixture/precipitation_simh.zarr/pr/0.1.0
  115. BIN tests/fixture/precipitation_simh.zarr/pr/1.0.0
  116. BIN tests/fixture/precipitation_simh.zarr/pr/1.1.0
  117. +20 −0 tests/fixture/precipitation_simh.zarr/time/.zarray
  118. +7 −0 tests/fixture/precipitation_simh.zarr/time/.zattrs
  119. BIN tests/fixture/precipitation_simh.zarr/time/0
  120. +1 −0 tests/fixture/precipitation_simp.zarr/.zattrs
  121. +3 −0 tests/fixture/precipitation_simp.zarr/.zgroup
  122. +117 −0 tests/fixture/precipitation_simp.zarr/.zmetadata
  123. +20 −0 tests/fixture/precipitation_simp.zarr/lat/.zarray
  124. +5 −0 tests/fixture/precipitation_simp.zarr/lat/.zattrs
  125. BIN tests/fixture/precipitation_simp.zarr/lat/0
  126. +20 −0 tests/fixture/precipitation_simp.zarr/lon/.zarray
  127. +5 −0 tests/fixture/precipitation_simp.zarr/lon/.zattrs
  128. BIN tests/fixture/precipitation_simp.zarr/lon/0
  129. +24 −0 tests/fixture/precipitation_simp.zarr/pr/.zarray
  130. +7 −0 tests/fixture/precipitation_simp.zarr/pr/.zattrs
  131. BIN tests/fixture/precipitation_simp.zarr/pr/0.0.0
  132. BIN tests/fixture/precipitation_simp.zarr/pr/0.1.0
  133. BIN tests/fixture/precipitation_simp.zarr/pr/1.0.0
  134. BIN tests/fixture/precipitation_simp.zarr/pr/1.1.0
  135. +20 −0 tests/fixture/precipitation_simp.zarr/time/.zarray
  136. +7 −0 tests/fixture/precipitation_simp.zarr/time/.zattrs
  137. BIN tests/fixture/precipitation_simp.zarr/time/0
  138. +1 −0 tests/fixture/temperature_obsh.zarr/.zattrs
  139. +3 −0 tests/fixture/temperature_obsh.zarr/.zgroup
  140. +117 −0 tests/fixture/temperature_obsh.zarr/.zmetadata
  141. +20 −0 tests/fixture/temperature_obsh.zarr/lat/.zarray
  142. +5 −0 tests/fixture/temperature_obsh.zarr/lat/.zattrs
  143. BIN tests/fixture/temperature_obsh.zarr/lat/0
  144. +20 −0 tests/fixture/temperature_obsh.zarr/lon/.zarray
  145. +5 −0 tests/fixture/temperature_obsh.zarr/lon/.zattrs
  146. BIN tests/fixture/temperature_obsh.zarr/lon/0
  147. +24 −0 tests/fixture/temperature_obsh.zarr/tas/.zarray
  148. +7 −0 tests/fixture/temperature_obsh.zarr/tas/.zattrs
  149. BIN tests/fixture/temperature_obsh.zarr/tas/0.0.0
  150. BIN tests/fixture/temperature_obsh.zarr/tas/0.1.0
  151. BIN tests/fixture/temperature_obsh.zarr/tas/1.0.0
  152. BIN tests/fixture/temperature_obsh.zarr/tas/1.1.0
  153. +20 −0 tests/fixture/temperature_obsh.zarr/time/.zarray
  154. +7 −0 tests/fixture/temperature_obsh.zarr/time/.zattrs
  155. BIN tests/fixture/temperature_obsh.zarr/time/0
  156. +1 −0 tests/fixture/temperature_obsp.zarr/.zattrs
  157. +3 −0 tests/fixture/temperature_obsp.zarr/.zgroup
  158. +117 −0 tests/fixture/temperature_obsp.zarr/.zmetadata
  159. +20 −0 tests/fixture/temperature_obsp.zarr/lat/.zarray
  160. +5 −0 tests/fixture/temperature_obsp.zarr/lat/.zattrs
  161. BIN tests/fixture/temperature_obsp.zarr/lat/0
  162. +20 −0 tests/fixture/temperature_obsp.zarr/lon/.zarray
  163. +5 −0 tests/fixture/temperature_obsp.zarr/lon/.zattrs
  164. BIN tests/fixture/temperature_obsp.zarr/lon/0
  165. +24 −0 tests/fixture/temperature_obsp.zarr/tas/.zarray
  166. +7 −0 tests/fixture/temperature_obsp.zarr/tas/.zattrs
  167. BIN tests/fixture/temperature_obsp.zarr/tas/0.0.0
  168. BIN tests/fixture/temperature_obsp.zarr/tas/0.1.0
  169. BIN tests/fixture/temperature_obsp.zarr/tas/1.0.0
  170. BIN tests/fixture/temperature_obsp.zarr/tas/1.1.0
  171. +20 −0 tests/fixture/temperature_obsp.zarr/time/.zarray
  172. +7 −0 tests/fixture/temperature_obsp.zarr/time/.zattrs
  173. BIN tests/fixture/temperature_obsp.zarr/time/0
  174. +1 −0 tests/fixture/temperature_simh.zarr/.zattrs
  175. +3 −0 tests/fixture/temperature_simh.zarr/.zgroup
  176. +117 −0 tests/fixture/temperature_simh.zarr/.zmetadata
  177. +20 −0 tests/fixture/temperature_simh.zarr/lat/.zarray
  178. +5 −0 tests/fixture/temperature_simh.zarr/lat/.zattrs
  179. BIN tests/fixture/temperature_simh.zarr/lat/0
  180. +20 −0 tests/fixture/temperature_simh.zarr/lon/.zarray
  181. +5 −0 tests/fixture/temperature_simh.zarr/lon/.zattrs
  182. BIN tests/fixture/temperature_simh.zarr/lon/0
  183. +24 −0 tests/fixture/temperature_simh.zarr/tas/.zarray
  184. +7 −0 tests/fixture/temperature_simh.zarr/tas/.zattrs
  185. BIN tests/fixture/temperature_simh.zarr/tas/0.0.0
  186. BIN tests/fixture/temperature_simh.zarr/tas/0.1.0
  187. BIN tests/fixture/temperature_simh.zarr/tas/1.0.0
  188. BIN tests/fixture/temperature_simh.zarr/tas/1.1.0
  189. +20 −0 tests/fixture/temperature_simh.zarr/time/.zarray
  190. +7 −0 tests/fixture/temperature_simh.zarr/time/.zattrs
  191. BIN tests/fixture/temperature_simh.zarr/time/0
  192. +1 −0 tests/fixture/temperature_simp.zarr/.zattrs
  193. +3 −0 tests/fixture/temperature_simp.zarr/.zgroup
  194. +117 −0 tests/fixture/temperature_simp.zarr/.zmetadata
  195. +20 −0 tests/fixture/temperature_simp.zarr/lat/.zarray
  196. +5 −0 tests/fixture/temperature_simp.zarr/lat/.zattrs
  197. BIN tests/fixture/temperature_simp.zarr/lat/0
  198. +20 −0 tests/fixture/temperature_simp.zarr/lon/.zarray
  199. +5 −0 tests/fixture/temperature_simp.zarr/lon/.zattrs
  200. BIN tests/fixture/temperature_simp.zarr/lon/0
  201. +24 −0 tests/fixture/temperature_simp.zarr/tas/.zarray
  202. +7 −0 tests/fixture/temperature_simp.zarr/tas/.zattrs
  203. BIN tests/fixture/temperature_simp.zarr/tas/0.0.0
  204. BIN tests/fixture/temperature_simp.zarr/tas/0.1.0
  205. BIN tests/fixture/temperature_simp.zarr/tas/1.0.0
  206. BIN tests/fixture/temperature_simp.zarr/tas/1.1.0
  207. +20 −0 tests/fixture/temperature_simp.zarr/time/.zarray
  208. +7 −0 tests/fixture/temperature_simp.zarr/time/.zattrs
  209. BIN tests/fixture/temperature_simp.zarr/time/0
  210. +128 −0 tests/helper.py
  211. +103 −0 tests/test_cli.py
  212. +295 −0 tests/test_methods.py
  213. +260 −0 tests/test_methods_different_input_shape.py
  214. +132 −0 tests/test_misc.py
  215. +257 −0 tests/test_utils.py
  216. +98 −0 tests/test_zarr_dask_compatibility.py
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tests/fixture/temperature_simh.zarr filter=lfs diff=lfs merge=lfs -text
tests/fixture/temperature_simp.zarr filter=lfs diff=lfs merge=lfs -text
tests/fixture/precipitation_obsh.zarr filter=lfs diff=lfs merge=lfs -text
tests/fixture/precipitation_obsp.zarr filter=lfs diff=lfs merge=lfs -text
tests/fixture/precipitation_simh.zarr filter=lfs diff=lfs merge=lfs -text
tests/fixture/precipitation_simp.zarr filter=lfs diff=lfs merge=lfs -text
tests/fixture/temperature_obsh.zarr filter=lfs diff=lfs merge=lfs -text
tests/fixture/temperature_obsp.zarr filter=lfs diff=lfs merge=lfs -text
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @btschwertfeger
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: "Bug"
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: "Feature"
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
21 changes: 21 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Reporting Security Vulnerabilities

At python-cmethods, we take security seriously. We welcome and encourage
responsible disclosure of security vulnerabilities. If you believe you've found
a security vulnerability within our project, please report it immediately.

## How to Report a Security Vulnerability

To report a security vulnerability, please send an email to
[contact@b-schwertfeger.de](mailto:contact@b-schwertfeger.de) with a detailed
description of the vulnerability. We kindly request that you refrain from
disclosing the vulnerability publicly until we have had an opportunity to
address it.

## Our Commitment

We are committed to promptly addressing and resolving any security
vulnerabilities reported to us. We will investigate all reports and take
appropriate action to protect the security of our users and their data.
23 changes: 23 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
coverage:
## Status checks in PR
##
status:
project:
default:
informational: true
## Target coverage is the last one
##
target: auto
## this allows a 2% drop from the previous base commit coverage
##
threshold: 2%
patch:
default:
informational: true

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: true # if false: post the comment even if coverage don't change
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: yaml; coding: utf-8 -*-
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
all:
dependency-type: production
39 changes: 39 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- mode: yaml; coding: utf-8 -*-
#
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# All rights reserved.
# https://github.com/btschwertfeger
#
# Config file to auto-generate release notes based on
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

changelog:
exclude:
# labels:
# - ignore-for-release
# authors:
# - john-doe
categories:
- title: Breaking Changes ⚠️
labels:
- Breaking
- breaking
- title: Implemented Enhancements 🎉
labels:
- Feature
- enhancement
- title: Fixed Bugs 🪲
labels:
- Bug
- bug
- title: Other Changes
labels:
- "*"
exclude:
labels:
- dependencies
- github_actions
- title: 👒 Dependencies
labels:
- dependencies
- github_actions
104 changes: 104 additions & 0 deletions .github/workflows/_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# -*- mode: yaml; coding: utf-8 -*-
#
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# All rights reserved.
# https://github.com/btschwertfeger
#
# Template workflow to build the project for a specific os
# and Python version.
#

name: Build

on:
workflow_call:
inputs:
os:
type: string
required: true
python-version:
type: string
required: true

permissions: read-all

jobs:
Build:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # IMPORTANT: otherwise the current tag does not get fetched and the build version gets worse

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ inputs.python-version }}

- name: Install dependencies
run: |
python -m pip install --user --upgrade pip
python -m pip install --user build
- name: Install hdf5 and netcdf (macOS)
if: runner.os == 'macOS'
run: brew install hdf5 netcdf

- name: Check git status (not Windows)
if: runner.os != 'Windows'
run: |
if [[ -z "$(git status --porcelain)" ]]; then
echo "No changes found."
else
echo "Changes detected. Please commit or discard changes before publishing."
git status --porcelain
exit 1
fi
- name: Check git status (Windows)
if: runner.os == 'Windows'
run: |
if (-not (git status --porcelain)) {
Write-Output "No changes found."
} else {
Write-Output "Changes detected. Please commit or discard changes before publishing."
git status --porcelain
exit 1
}
- name: Build Linux
if: runner.os == 'linux'
run: python -m build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
# upload artifacts with the oldest supported version
if: runner.os == 'linux' && inputs.python-version == '3.9'
with:
name: python-package-distributions
path: dist/

- name: Build macOS
if: runner.os == 'macOS'
run: python -m build

- name: Build Windows
if: runner.os == 'Windows'
# put it here to avoid more filtering
run: python -m build -o .

- name: Install the package on Linux or MacOS
if: runner.os != 'Windows'
run: python -m pip install --user dist/python_cmethods*.whl

- name: Install the package on Windows
if: runner.os == 'Windows'
run: |
try {
$WHEEL = Get-ChildItem -Path . -Filter "python_cmethods*.whl" -ErrorAction Stop
python -m pip install --user $WHEEL
} catch {
Write-Error "Error: .whl file not found in the current directory."
exit 1
}
44 changes: 44 additions & 0 deletions .github/workflows/_build_doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- mode: yaml; coding: utf-8 -*-
#
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# All rights reserved.
# https://github.com/btschwertfeger
#
# Template workflow to build documentation.
#

name: Build Doc

on:
workflow_call:
inputs:
os:
type: string
required: true
python-version:
type: string
required: true

permissions: read-all

jobs:
Build:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ inputs.python-version }}

- name: Install dependencies
run: |
python -m pip install --user --upgrade pip
python -m pip install --user .
python -m pip install --user -r doc/requirements.txt
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y pandoc
- name: Build the documentation
run: cd doc && make html
64 changes: 64 additions & 0 deletions .github/workflows/_codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# -*- mode: yaml; coding: utf-8 -*-
#
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# All rights reserved.
# https://github.com/btschwertfeger
#
# Template workflow to build the project for a specific os
# and Python version, run the tests and upload the results to codecov.
#

name: CodeCov

on:
workflow_call:
inputs:
os:
type: string
required: true
python-version:
type: string
required: true

permissions: read-all

concurrency:
group: codecov-${{ github.ref }}
cancel-in-progress: true

jobs:
codecov:
name: Coverage
runs-on: ${{ inputs.os }}
env:
OS: ${{ inputs.os }}
PYTHON: ${{ inputs.python-version }}

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ inputs.python-version }}

- name: Install dependencies
run: python -m pip install --upgrade pip

- name: Install package
run: python -m pip install ".[dev,test]"

- name: Generate coverage report
run: pytest --retries 1 --cov --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 #v5.4.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true
Loading