caom2 2.6__tar.gz → 2.6.2__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 (76) hide show
  1. {caom2-2.6/caom2.egg-info → caom2-2.6.2}/PKG-INFO +10 -3
  2. {caom2-2.6 → caom2-2.6.2}/caom2/chunk.py +52 -24
  3. {caom2-2.6 → caom2-2.6.2}/caom2/obs_reader_writer.py +1 -4
  4. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_checksum.py +2 -2
  5. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_chunk.py +6 -3
  6. caom2-2.6.2/caom2/version.py +1 -0
  7. {caom2-2.6 → caom2-2.6.2/caom2.egg-info}/PKG-INFO +10 -3
  8. {caom2-2.6 → caom2-2.6.2}/caom2.egg-info/requires.txt +0 -1
  9. {caom2-2.6 → caom2-2.6.2}/setup.cfg +1 -2
  10. {caom2-2.6 → caom2-2.6.2}/setup.py +3 -8
  11. caom2-2.6/caom2/version.py +0 -1
  12. {caom2-2.6 → caom2-2.6.2}/LICENSE +0 -0
  13. {caom2-2.6 → caom2-2.6.2}/MANIFEST.in +0 -0
  14. {caom2-2.6 → caom2-2.6.2}/README.rst +0 -0
  15. {caom2-2.6 → caom2-2.6.2}/caom2/__init__.py +0 -0
  16. {caom2-2.6 → caom2-2.6.2}/caom2/artifact.py +0 -0
  17. {caom2-2.6 → caom2-2.6.2}/caom2/caom_util.py +0 -0
  18. {caom2-2.6 → caom2-2.6.2}/caom2/checksum.py +0 -0
  19. {caom2-2.6 → caom2-2.6.2}/caom2/common.py +0 -0
  20. {caom2-2.6 → caom2-2.6.2}/caom2/data/CAOM-2.2.xsd +0 -0
  21. {caom2-2.6 → caom2-2.6.2}/caom2/data/CAOM-2.3.xsd +0 -0
  22. {caom2-2.6 → caom2-2.6.2}/caom2/data/CAOM-2.4.xsd +0 -0
  23. {caom2-2.6 → caom2-2.6.2}/caom2/diff.py +0 -0
  24. {caom2-2.6 → caom2-2.6.2}/caom2/observation.py +0 -0
  25. {caom2-2.6 → caom2-2.6.2}/caom2/part.py +0 -0
  26. {caom2-2.6 → caom2-2.6.2}/caom2/plane.py +0 -0
  27. {caom2-2.6 → caom2-2.6.2}/caom2/shape.py +0 -0
  28. {caom2-2.6 → caom2-2.6.2}/caom2/tests/__init__.py +0 -0
  29. {caom2-2.6 → caom2-2.6.2}/caom2/tests/caom_test_instances.py +0 -0
  30. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteCompositeCircle-CAOM-2.2.xml +0 -0
  31. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteCompositeCircle-CAOM-2.3.xml +0 -0
  32. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteCompositePolygon-CAOM-2.2.xml +0 -0
  33. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteCompositePolygon-CAOM-2.3.xml +0 -0
  34. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteSimpleCircle-CAOM-2.2.xml +0 -0
  35. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteSimpleCircle-CAOM-2.3.xml +0 -0
  36. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteSimplePolygon-CAOM-2.2.xml +0 -0
  37. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/CompleteSimplePolygon-CAOM-2.3.xml +0 -0
  38. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalCompositeCircle-CAOM-2.2.xml +0 -0
  39. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalCompositeCircle-CAOM-2.3.xml +0 -0
  40. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalCompositePolygon-CAOM-2.2.xml +0 -0
  41. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalCompositePolygon-CAOM-2.3.xml +0 -0
  42. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalSimpleCircle-CAOM-2.2.xml +0 -0
  43. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalSimpleCircle-CAOM-2.3.xml +0 -0
  44. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalSimplePolygon-CAOM-2.2.xml +0 -0
  45. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/MinimalSimplePolygon-CAOM-2.3.xml +0 -0
  46. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/SampleComposite-CAOM-2.3.xml +0 -0
  47. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/SampleDerived-CAOM-2.4.xml +0 -0
  48. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/SampleSimple-CAOM-2.3.xml +0 -0
  49. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/diff-actual-CAOM-2.3.xml +0 -0
  50. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/diff-actual-CAOM-2.4.xml +0 -0
  51. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/diff-expected-CAOM-2.3.xml +0 -0
  52. {caom2-2.6 → caom2-2.6.2}/caom2/tests/data/diff-expected-CAOM-2.4.xml +0 -0
  53. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_artifact.py +0 -0
  54. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_caom_util.py +0 -0
  55. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_common.py +0 -0
  56. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_diffs.py +0 -0
  57. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_obs_reader_writer.py +0 -0
  58. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_observation.py +0 -0
  59. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_part.py +0 -0
  60. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_plane.py +0 -0
  61. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_shape.py +0 -0
  62. {caom2-2.6 → caom2-2.6.2}/caom2/tests/test_wcs.py +0 -0
  63. {caom2-2.6 → caom2-2.6.2}/caom2/tests/xml_compare.py +0 -0
  64. {caom2-2.6 → caom2-2.6.2}/caom2/wcs.py +0 -0
  65. {caom2-2.6 → caom2-2.6.2}/caom2.egg-info/SOURCES.txt +0 -0
  66. {caom2-2.6 → caom2-2.6.2}/caom2.egg-info/dependency_links.txt +0 -0
  67. {caom2-2.6 → caom2-2.6.2}/caom2.egg-info/entry_points.txt +0 -0
  68. {caom2-2.6 → caom2-2.6.2}/caom2.egg-info/not-zip-safe +0 -0
  69. {caom2-2.6 → caom2-2.6.2}/caom2.egg-info/top_level.txt +0 -0
  70. {caom2-2.6 → caom2-2.6.2}/docs/Makefile +0 -0
  71. {caom2-2.6 → caom2-2.6.2}/docs/_templates/autosummary/base.rst +0 -0
  72. {caom2-2.6 → caom2-2.6.2}/docs/_templates/autosummary/class.rst +0 -0
  73. {caom2-2.6 → caom2-2.6.2}/docs/_templates/autosummary/module.rst +0 -0
  74. {caom2-2.6 → caom2-2.6.2}/docs/conf.py +0 -0
  75. {caom2-2.6 → caom2-2.6.2}/docs/index.rst +0 -0
  76. {caom2-2.6 → caom2-2.6.2}/docs/make.bat +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: caom2
3
- Version: 2.6
3
+ Version: 2.6.2
4
4
  Summary: CAOM-2.4 library
5
5
  Home-page: http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2
6
6
  Author: Canadian Astronomy Data Centre
@@ -10,9 +10,16 @@ Classifier: Natural Language :: English
10
10
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3
11
11
  Classifier: Programming Language :: Python
12
12
  Classifier: Programming Language :: Python :: 3
13
- Requires-Python: >=3.7, <4
14
- Provides-Extra: test
13
+ Requires-Python: >=3.8, <4
15
14
  License-File: LICENSE
15
+ Requires-Dist: aenum
16
+ Requires-Dist: deprecated
17
+ Requires-Dist: lxml>=3.7.0
18
+ Provides-Extra: test
19
+ Requires-Dist: pytest>=4.6; extra == "test"
20
+ Requires-Dist: pytest-cov>=2.5.1; extra == "test"
21
+ Requires-Dist: flake8>=3.4.1; extra == "test"
22
+ Requires-Dist: funcsigs>=1.0.2; extra == "test"
16
23
 
17
24
  caom2
18
25
  =====
@@ -2,7 +2,7 @@
2
2
  # ****************** CANADIAN ASTRONOMY DATA CENTRE *******************
3
3
  # ************* CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES **************
4
4
  #
5
- # (c) 2022. (c) 2022.
5
+ # (c) 2024. (c) 2024.
6
6
  # Government of Canada Gouvernement du Canada
7
7
  # National Research Council Conseil national de recherches
8
8
  # Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
@@ -82,31 +82,59 @@ from .common import CaomObject, OrderedEnum
82
82
 
83
83
  class ProductType(OrderedEnum):
84
84
  """
85
- SCIENCE: "science"
86
- CALIBRATION: "calibration"
87
- PREVIEW: "preview"
88
- INFO: "info"
89
- NOISE: "noise"
90
- WEIGHT: "weight"
91
- AUXILIARY: "auxiliary"
92
- THUMBNAIL: "thumbnail"
93
- BIAS: "bias"
94
- DARK: "dark"
95
- FLAT: "flat"
96
- WAVECAL: "wavecal"
85
+ Subset of IVOA DataLink terms at:
86
+ https://www.ivoa.net/rdf/datalink/core/2022-01-27/datalink.html
87
+
88
+ THIS = "this"
89
+ AUXILIARY = "auxiliary"
90
+ BIAS = 'bias'
91
+ CALIBRATION = 'calibration'
92
+ CODERIVED = 'coderived'
93
+ DARK = 'dark'
94
+ DOCUMENTATION = 'documentation'
95
+ ERROR = 'error'
96
+ FLAT = 'flat'
97
+ NOISE = 'noise'
98
+ PREVIEW = 'preview'
99
+ PREVIEW_IMAGE = 'preview-image'
100
+ PREVIEW_PLOT = 'preview-plot'
101
+ THUMBNAIL = 'thumbnail'
102
+ WEIGHT = 'weight'
103
+
97
104
  """
98
- SCIENCE = "science"
99
- CALIBRATION = "calibration"
100
- PREVIEW = "preview"
101
- INFO = "info"
102
- NOISE = "noise"
103
- WEIGHT = "weight"
105
+
106
+ THIS = "this"
107
+
104
108
  AUXILIARY = "auxiliary"
105
- THUMBNAIL = "thumbnail"
106
- BIAS = "bias"
107
- DARK = "dark"
108
- FLAT = "flat"
109
- WAVECAL = "wavecal"
109
+ BIAS = 'bias'
110
+ CALIBRATION = 'calibration'
111
+ CODERIVED = 'coderived'
112
+ DARK = 'dark'
113
+ DOCUMENTATION = 'documentation'
114
+ ERROR = 'error'
115
+ FLAT = 'flat'
116
+ NOISE = 'noise'
117
+ PREVIEW = 'preview'
118
+ PREVIEW_IMAGE = 'preview-image'
119
+ PREVIEW_PLOT = 'preview-plot'
120
+ THUMBNAIL = 'thumbnail'
121
+ WEIGHT = 'weight'
122
+
123
+ # DataLink terms explicitly not included
124
+ # counterpart
125
+ # cutout
126
+ # derivation
127
+ # detached - header
128
+ # package
129
+ # proc
130
+ # progenitor
131
+
132
+ # CAOM specific terms public
133
+ SCIENCE = 'science' # this
134
+
135
+ # deprecated
136
+ # INFO = 'info'
137
+ # CATALOG = 'catalog'
110
138
 
111
139
 
112
140
  __all__ = ['ProductType', 'Chunk', 'ObservableAxis', 'SpatialWCS',
@@ -2675,10 +2675,7 @@ class ObservationWriter(object):
2675
2675
  if isinstance(value, str):
2676
2676
  element.text = value
2677
2677
  else:
2678
- if isinstance(value, float):
2679
- element.text = repr(value)
2680
- else:
2681
- element.text = str(value)
2678
+ element.text = str(value)
2682
2679
 
2683
2680
  def _add_boolean_element(self, name, value, parent):
2684
2681
  if value is None:
@@ -2,7 +2,7 @@
2
2
  # ****************** CANADIAN ASTRONOMY DATA CENTRE *******************
3
3
  # ************* CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES **************
4
4
  #
5
- # (c) 2022. (c) 2022.
5
+ # (c) 2023. (c) 2023.
6
6
  # Government of Canada Gouvernement du Canada
7
7
  # National Research Council Conseil national de recherches
8
8
  # Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
@@ -81,7 +81,7 @@ from caom2 import update_meta_checksum
81
81
  from caom2.caom_util import str2ivoa
82
82
  from caom2.checksum import update_checksum, int_32, checksum_diff
83
83
  import tempfile
84
- from mock import patch
84
+ from unittest.mock import patch
85
85
  from io import StringIO
86
86
 
87
87
  THIS_DIR = os.path.dirname(os.path.realpath(__file__))
@@ -2,7 +2,7 @@
2
2
  # ****************** CANADIAN ASTRONOMY DATA CENTRE *******************
3
3
  # ************* CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES **************
4
4
  #
5
- # (c) 2022. (c) 2022.
5
+ # (c) 2024. (c) 2024.
6
6
  # Government of Canada Gouvernement du Canada
7
7
  # National Research Council Conseil national de recherches
8
8
  # Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
@@ -92,10 +92,10 @@ class TestEnums(unittest.TestCase):
92
92
  self.assertEqual(chunk.ProductType[
93
93
  chunk.ProductType.SCIENCE.name].value, "science")
94
94
 
95
+ self.assertEqual(chunk.ProductType.THIS.value, "this")
95
96
  self.assertEqual(chunk.ProductType.SCIENCE.value, "science")
96
97
  self.assertEqual(chunk.ProductType.CALIBRATION.value, "calibration")
97
98
  self.assertEqual(chunk.ProductType.PREVIEW.value, "preview")
98
- self.assertEqual(chunk.ProductType.INFO.value, "info")
99
99
  self.assertEqual(chunk.ProductType.NOISE.value, "noise")
100
100
  self.assertEqual(chunk.ProductType.WEIGHT.value, "weight")
101
101
  self.assertEqual(chunk.ProductType.AUXILIARY.value, "auxiliary")
@@ -103,7 +103,10 @@ class TestEnums(unittest.TestCase):
103
103
  self.assertEqual(chunk.ProductType.BIAS.value, "bias")
104
104
  self.assertEqual(chunk.ProductType.DARK.value, "dark")
105
105
  self.assertEqual(chunk.ProductType.FLAT.value, "flat")
106
- self.assertEqual(chunk.ProductType.WAVECAL.value, "wavecal")
106
+ self.assertEqual(chunk.ProductType.CODERIVED.value, "coderived")
107
+ self.assertEqual(chunk.ProductType.DOCUMENTATION.value, "documentation")
108
+ self.assertEqual(chunk.ProductType.PREVIEW_IMAGE.value, "preview-image")
109
+ self.assertEqual(chunk.ProductType.PREVIEW_PLOT.value, "preview-plot")
107
110
 
108
111
 
109
112
  class TestChunk(unittest.TestCase):
@@ -0,0 +1 @@
1
+ version = '2.6.2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: caom2
3
- Version: 2.6
3
+ Version: 2.6.2
4
4
  Summary: CAOM-2.4 library
5
5
  Home-page: http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2
6
6
  Author: Canadian Astronomy Data Centre
@@ -10,9 +10,16 @@ Classifier: Natural Language :: English
10
10
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3
11
11
  Classifier: Programming Language :: Python
12
12
  Classifier: Programming Language :: Python :: 3
13
- Requires-Python: >=3.7, <4
14
- Provides-Extra: test
13
+ Requires-Python: >=3.8, <4
15
14
  License-File: LICENSE
15
+ Requires-Dist: aenum
16
+ Requires-Dist: deprecated
17
+ Requires-Dist: lxml>=3.7.0
18
+ Provides-Extra: test
19
+ Requires-Dist: pytest>=4.6; extra == "test"
20
+ Requires-Dist: pytest-cov>=2.5.1; extra == "test"
21
+ Requires-Dist: flake8>=3.4.1; extra == "test"
22
+ Requires-Dist: funcsigs>=1.0.2; extra == "test"
16
23
 
17
24
  caom2
18
25
  =====
@@ -7,4 +7,3 @@ pytest>=4.6
7
7
  pytest-cov>=2.5.1
8
8
  flake8>=3.4.1
9
9
  funcsigs>=1.0.2
10
- mock>=2.0.0
@@ -35,7 +35,7 @@ license = AGPLv3
35
35
  url = http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2
36
36
  edit_on_github = False
37
37
  github_project = opencadc/caom2tools
38
- version = 2.6
38
+ version = 2.6.2
39
39
 
40
40
  [options]
41
41
  install_requires =
@@ -49,7 +49,6 @@ test =
49
49
  pytest-cov>=2.5.1
50
50
  flake8>=3.4.1
51
51
  funcsigs>=1.0.2
52
- mock>=2.0.0
53
52
 
54
53
  [entry_points]
55
54
  caom2-checksum = caom2.checksum:checksum_diff
@@ -4,16 +4,11 @@
4
4
  import glob
5
5
  import os
6
6
  import sys
7
- import imp
8
7
  from setuptools.command.test import test as TestCommand
9
8
  from setuptools import find_packages
10
9
 
11
10
  from setuptools import setup
12
11
 
13
- import distutils.cmd
14
- import distutils.log
15
- import subprocess
16
-
17
12
  # read the README.rst file and return as string.
18
13
  def readme():
19
14
  with open('README.rst') as r_obj:
@@ -41,7 +36,7 @@ VERSION = metadata.get('version', 'none')
41
36
 
42
37
  # generate the version file
43
38
  with open(os.path.join(PACKAGENAME, 'version.py'), 'w') as f:
44
- f.write('version = \'{}\'\n'.format(VERSION))
39
+ f.write('version = \'{}\'\n'.format(VERSION))
45
40
 
46
41
  # Treat everything in scripts except README.rst as a script to be installed
47
42
  scripts = [fname for fname in glob.glob(os.path.join('scripts', '*'))
@@ -71,7 +66,7 @@ class PyTest(TestCommand):
71
66
  import pytest
72
67
  err_no = pytest.main(self.pytest_args)
73
68
  sys.exit(err_no)
74
-
69
+
75
70
  # Note that requires and provides should not be included in the call to
76
71
  # ``setup``, since these are now deprecated. See this link for more details:
77
72
  # https://groups.google.com/forum/#!topic/astropy-dev/urYO8ckB2uM
@@ -90,7 +85,7 @@ setup(name=PACKAGENAME,
90
85
  use_2to3=False,
91
86
  setup_requires=['pytest-runner'],
92
87
  entry_points=entry_points,
93
- python_requires='>=3.7, <4',
88
+ python_requires='>=3.8, <4',
94
89
  packages=find_packages(),
95
90
  package_data={PACKAGENAME: ['data/*', 'tests/data/*', '*/data/*', '*/tests/data/*']},
96
91
  classifiers=[
@@ -1 +0,0 @@
1
- version = '2.6'
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes