drizzle 1.15.1__tar.gz → 1.15.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of drizzle might be problematic. Click here for more details.

Files changed (61) hide show
  1. drizzle-1.15.3/.github/dependabot.yml +11 -0
  2. {drizzle-1.15.1 → drizzle-1.15.3}/.github/workflows/build.yml +1 -0
  3. {drizzle-1.15.1 → drizzle-1.15.3}/.github/workflows/ci.yml +1 -2
  4. {drizzle-1.15.1 → drizzle-1.15.3}/CHANGES.rst +13 -0
  5. {drizzle-1.15.1 → drizzle-1.15.3}/PKG-INFO +3 -3
  6. {drizzle-1.15.1 → drizzle-1.15.3}/README.rst +1 -1
  7. {drizzle-1.15.1 → drizzle-1.15.3}/docs/conf.py +0 -1
  8. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/tests/test_drizzle.py +36 -0
  9. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/tests/test_overlap_calc.py +1 -1
  10. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle.egg-info/PKG-INFO +3 -3
  11. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle.egg-info/SOURCES.txt +1 -0
  12. {drizzle-1.15.1 → drizzle-1.15.3}/pyproject.toml +6 -4
  13. {drizzle-1.15.1 → drizzle-1.15.3}/setup.py +2 -0
  14. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzleapi.c +8 -6
  15. {drizzle-1.15.1 → drizzle-1.15.3}/tox.ini +1 -1
  16. {drizzle-1.15.1 → drizzle-1.15.3}/.coveragerc +0 -0
  17. {drizzle-1.15.1 → drizzle-1.15.3}/.flake8 +0 -0
  18. {drizzle-1.15.1 → drizzle-1.15.3}/.github/CODEOWNERS +0 -0
  19. {drizzle-1.15.1 → drizzle-1.15.3}/.gitignore +0 -0
  20. {drizzle-1.15.1 → drizzle-1.15.3}/.readthedocs.yaml +0 -0
  21. {drizzle-1.15.1 → drizzle-1.15.3}/CODE_OF_CONDUCT.md +0 -0
  22. {drizzle-1.15.1 → drizzle-1.15.3}/LICENSE.rst +0 -0
  23. {drizzle-1.15.1 → drizzle-1.15.3}/MANIFEST.in +0 -0
  24. {drizzle-1.15.1 → drizzle-1.15.3}/docs/Makefile +0 -0
  25. {drizzle-1.15.1 → drizzle-1.15.3}/docs/_templates/autosummary/base.rst +0 -0
  26. {drizzle-1.15.1 → drizzle-1.15.3}/docs/_templates/autosummary/class.rst +0 -0
  27. {drizzle-1.15.1 → drizzle-1.15.3}/docs/_templates/autosummary/module.rst +0 -0
  28. {drizzle-1.15.1 → drizzle-1.15.3}/docs/drizzle/api.rst +0 -0
  29. {drizzle-1.15.1 → drizzle-1.15.3}/docs/drizzle/index.rst +0 -0
  30. {drizzle-1.15.1 → drizzle-1.15.3}/docs/drizzle/user.rst +0 -0
  31. {drizzle-1.15.1 → drizzle-1.15.3}/docs/index.rst +0 -0
  32. {drizzle-1.15.1 → drizzle-1.15.3}/docs/make.bat +0 -0
  33. {drizzle-1.15.1 → drizzle-1.15.3}/docs/rtd_environment.yaml +0 -0
  34. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/__init__.py +0 -0
  35. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/calc_pixmap.py +0 -0
  36. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/doblot.py +0 -0
  37. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/dodrizzle.py +0 -0
  38. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/drizzle.py +0 -0
  39. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/tests/__init__.py +0 -0
  40. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/tests/test_cdrizzle.py +0 -0
  41. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/tests/test_file_io.py +0 -0
  42. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/tests/test_pixmap.py +0 -0
  43. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle/util.py +0 -0
  44. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle.egg-info/dependency_links.txt +0 -0
  45. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle.egg-info/not-zip-safe +0 -0
  46. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle.egg-info/requires.txt +0 -0
  47. {drizzle-1.15.1 → drizzle-1.15.3}/drizzle.egg-info/top_level.txt +0 -0
  48. {drizzle-1.15.1 → drizzle-1.15.3}/setup.cfg +0 -0
  49. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzleblot.c +0 -0
  50. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzleblot.h +0 -0
  51. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzlebox.c +0 -0
  52. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzlebox.h +0 -0
  53. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzlemap.c +0 -0
  54. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzlemap.h +0 -0
  55. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzleutil.c +0 -0
  56. {drizzle-1.15.1 → drizzle-1.15.3}/src/cdrizzleutil.h +0 -0
  57. {drizzle-1.15.1 → drizzle-1.15.3}/src/driz_portability.h +0 -0
  58. {drizzle-1.15.1 → drizzle-1.15.3}/src/tests/drizzletest.h +0 -0
  59. {drizzle-1.15.1 → drizzle-1.15.3}/src/tests/fct.h +0 -0
  60. {drizzle-1.15.1 → drizzle-1.15.3}/src/tests/pandokia_fct.h +0 -0
  61. {drizzle-1.15.1 → drizzle-1.15.3}/src/tests/utest_cdrizzle.c +0 -0
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+
4
+ # Maintain dependencies for GitHub Actions
5
+ - package-ecosystem: "github-actions"
6
+ directory: "/"
7
+ target-branch: "main"
8
+ schedule:
9
+ interval: monthly
10
+ time: "03:00"
11
+
@@ -22,6 +22,7 @@ jobs:
22
22
  - cp3*-win32
23
23
  - cp3*-win_amd64
24
24
  sdist: true
25
+ test_command: python -c "from drizzle import cdrizzle"
25
26
  secrets:
26
27
  pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
27
28
 
@@ -23,7 +23,6 @@ jobs:
23
23
  - linux: check-style
24
24
  - linux: check-security
25
25
 
26
- - linux: py39-xdist
27
26
  - linux: py310-xdist
28
27
  - linux: py311-xdist
29
28
  - macos: py312-xdist
@@ -44,7 +43,7 @@ jobs:
44
43
  with:
45
44
  fetch-depth: 0
46
45
  - name: Set up Python
47
- uses: actions/setup-python@v4
46
+ uses: actions/setup-python@v5
48
47
  with:
49
48
  python-version: '3.12'
50
49
  - name: Install and build
@@ -4,6 +4,19 @@
4
4
  Release Notes
5
5
  =============
6
6
 
7
+ 1.15.3 (2024-08-19)
8
+ ===================
9
+
10
+ - Fixed return type of ``PyInit_cdrizzle``. [#150]
11
+
12
+ - Allow ``context`` to be ``None`` in ``tdriz``. [#151]
13
+
14
+
15
+ 1.15.2 (2024-06-17)
16
+ ===================
17
+
18
+ - build wheels with Numpy 2.0 release candidate [#149]
19
+
7
20
 
8
21
  1.15.1 (2024-03-05)
9
22
  ===================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: drizzle
3
- Version: 1.15.1
3
+ Version: 1.15.3
4
4
  Summary: A package for combining dithered images into a single image
5
5
  Author-email: STScI <help@stsci.edu>
6
6
  License: Copyright (C) 2011,2014 Association of Universities for Research in
@@ -39,7 +39,7 @@ Project-URL: Homepage, https://github.com/spacetelescope/drizzle
39
39
  Project-URL: Bug Tracker, https://github.com/spacetelescope/drizzle/issues
40
40
  Project-URL: Documentation, http://spacetelescope.github.io/drizzle/
41
41
  Project-URL: Source Code, https://github.com/spacetelescope/drizzle
42
- Requires-Python: >=3.9
42
+ Requires-Python: <3.13,>=3.10
43
43
  Description-Content-Type: text/x-rst
44
44
  License-File: LICENSE.rst
45
45
  Requires-Dist: numpy
@@ -91,7 +91,7 @@ the new GWCS code.
91
91
  Requirements
92
92
  ------------
93
93
 
94
- - Python 3.9 or later
94
+ - Python 3.10 or later
95
95
 
96
96
  - Numpy
97
97
 
@@ -36,7 +36,7 @@ the new GWCS code.
36
36
  Requirements
37
37
  ------------
38
38
 
39
- - Python 3.9 or later
39
+ - Python 3.10 or later
40
40
 
41
41
  - Numpy
42
42
 
@@ -26,7 +26,6 @@
26
26
  # be accessible, and the documentation will not build correctly.
27
27
 
28
28
  import datetime
29
- import os
30
29
  import sys
31
30
  from pathlib import Path
32
31
 
@@ -796,3 +796,39 @@ def test_flux_conservation_distorted(kernel):
796
796
  atol=0.0,
797
797
  rtol=0.0001,
798
798
  )
799
+
800
+
801
+ def test_no_context_array():
802
+ """
803
+ Test that providing None for "outctx" is supported.
804
+ """
805
+ # initialize input:
806
+ insci = np.ones((200, 400), dtype=np.float32)
807
+ inwht = np.ones((200, 400), dtype=np.float32)
808
+ inwht[:, 150:155] = 0
809
+
810
+ # initialize output:
811
+ outsci = np.zeros((210, 410), dtype=np.float32)
812
+ outwht = np.zeros((210, 410), dtype=np.float32)
813
+ outctx = None
814
+
815
+ # define coordinate mapping:
816
+ pixmap = np.moveaxis(np.mgrid[1:201, 1:401][::-1], 0, -1)
817
+
818
+ # resample:
819
+ cdrizzle.tdriz(
820
+ insci, inwht, pixmap,
821
+ outsci, outwht, outctx,
822
+ uniqid=1,
823
+ xmin=0, xmax=400,
824
+ ymin=0, ymax=200,
825
+ pixfrac=1,
826
+ kernel='square',
827
+ in_units='cps',
828
+ expscale=1,
829
+ wtscale=1,
830
+ fillstr='INDEF',
831
+ )
832
+
833
+ # check that no pixel with 0 weight has any counts:
834
+ assert np.sum(np.abs(outsci[(outwht == 0)])) == 0.0
@@ -9,7 +9,7 @@ from drizzle.cdrizzle import clip_polygon, invert_pixmap
9
9
  SQ2 = 1.0 / sqrt(2.0)
10
10
 
11
11
 
12
- def _is_poly_eq(p1, p2, rtol=0, atol=1e-12):
12
+ def _is_poly_eq(p1, p2, rtol=0, atol=4e-12):
13
13
  if len(p1) != len(p2):
14
14
  return False
15
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: drizzle
3
- Version: 1.15.1
3
+ Version: 1.15.3
4
4
  Summary: A package for combining dithered images into a single image
5
5
  Author-email: STScI <help@stsci.edu>
6
6
  License: Copyright (C) 2011,2014 Association of Universities for Research in
@@ -39,7 +39,7 @@ Project-URL: Homepage, https://github.com/spacetelescope/drizzle
39
39
  Project-URL: Bug Tracker, https://github.com/spacetelescope/drizzle/issues
40
40
  Project-URL: Documentation, http://spacetelescope.github.io/drizzle/
41
41
  Project-URL: Source Code, https://github.com/spacetelescope/drizzle
42
- Requires-Python: >=3.9
42
+ Requires-Python: <3.13,>=3.10
43
43
  Description-Content-Type: text/x-rst
44
44
  License-File: LICENSE.rst
45
45
  Requires-Dist: numpy
@@ -91,7 +91,7 @@ the new GWCS code.
91
91
  Requirements
92
92
  ------------
93
93
 
94
- - Python 3.9 or later
94
+ - Python 3.10 or later
95
95
 
96
96
  - Numpy
97
97
 
@@ -11,6 +11,7 @@ pyproject.toml
11
11
  setup.py
12
12
  tox.ini
13
13
  .github/CODEOWNERS
14
+ .github/dependabot.yml
14
15
  .github/workflows/build.yml
15
16
  .github/workflows/ci.yml
16
17
  /home/runner/work/drizzle/drizzle/src/cdrizzleapi.c
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "drizzle"
3
3
  description = "A package for combining dithered images into a single image"
4
- requires-python = ">=3.9"
4
+ requires-python = ">=3.10,<3.13"
5
5
  authors = [
6
6
  { name = "STScI", email = "help@stsci.edu" },
7
7
  ]
@@ -43,7 +43,7 @@ docs = [
43
43
  requires = [
44
44
  "setuptools>=61.2",
45
45
  "setuptools_scm[toml]>=3.4",
46
- "numpy>=1.25",
46
+ "numpy>=2.0.0",
47
47
  ]
48
48
  build-backend = "setuptools.build_meta"
49
49
 
@@ -65,14 +65,16 @@ norecursedirs = [
65
65
 
66
66
  [tool.ruff]
67
67
  line-length = 100
68
- extend-select = [
68
+
69
+ [tool.ruff.lint]
70
+ select = [
69
71
  "F",
70
72
  "W",
71
73
  "E",
72
74
  "C4",
73
75
  "COM",
74
76
  ]
75
- extend-exclude = [
77
+ exclude = [
76
78
  "docs",
77
79
  ".eggs",
78
80
  ".tox",
@@ -32,6 +32,8 @@ def get_extensions():
32
32
  cfg['define_macros'].append(('__STDC__', 1))
33
33
  cfg['define_macros'].append(('_CRT_SECURE_NO_WARNINGS', None))
34
34
 
35
+ # importing these extension modules is tested in `.github/workflows/build.yml`;
36
+ # when adding new modules here, make sure to add them to the `test_command` entry there
35
37
  return [Extension(str('drizzle.cdrizzle'), sources, **cfg)]
36
38
 
37
39
 
@@ -130,11 +130,13 @@ tdriz(PyObject *obj UNUSED_PARAM, PyObject *args, PyObject *keywords)
130
130
  goto _exit;
131
131
  }
132
132
 
133
- con = (PyArrayObject *)PyArray_ContiguousFromAny(ocon, NPY_INT32, 2, 2);
134
- if (!con) {
135
- driz_error_set_message(&error, "Invalid context array");
136
- goto _exit;
137
- }
133
+ if (ocon != Py_None) {
134
+ con = (PyArrayObject *)PyArray_ContiguousFromAny(ocon, NPY_INT32, 2, 2);
135
+ if (!con) {
136
+ driz_error_set_message(&error, "Invalid context array");
137
+ goto _exit;
138
+ }
139
+ };
138
140
 
139
141
  /* Convert t`he fill value string */
140
142
 
@@ -614,7 +616,7 @@ static struct PyModuleDef moduledef = {
614
616
  NULL
615
617
  };
616
618
 
617
- PyMODINIT_FUNC *PyInit_cdrizzle(void)
619
+ PyMODINIT_FUNC PyInit_cdrizzle(void)
618
620
  {
619
621
  PyObject *m;
620
622
  m = PyModule_Create(&moduledef);
@@ -19,7 +19,7 @@ changedir = {toxinidir}
19
19
  deps =
20
20
  ruff
21
21
  commands =
22
- ruff . {posargs}
22
+ ruff check . {posargs}
23
23
 
24
24
  [testenv:check-security]
25
25
  description = run bandit to check security compliance
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes