gwsumm 2.3.2__tar.gz → 2.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 (129) hide show
  1. {gwsumm-2.3.2 → gwsumm-2.4.0}/.github/workflows/build.yml +5 -5
  2. {gwsumm-2.3.2 → gwsumm-2.4.0}/.github/workflows/lint.yml +2 -2
  3. {gwsumm-2.3.2/gwsumm.egg-info → gwsumm-2.4.0}/PKG-INFO +4 -5
  4. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/environment.yml +4 -4
  5. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/__main__.py +16 -2
  6. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/_version.py +16 -3
  7. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/batch.py +49 -6
  8. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/data/timeseries.py +1 -1
  9. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/tests/test_bootstrap.py +1 -1
  10. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/tests/test_html5.py +1 -1
  11. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/builtin.py +1 -1
  12. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/core.py +1 -1
  13. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/guardian/__main__.py +1 -1
  14. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/guardian/core.py +1 -1
  15. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/mixins.py +1 -1
  16. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/noisebudget.py +1 -1
  17. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/range.py +1 -1
  18. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/segments.py +1 -1
  19. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/sei.py +1 -1
  20. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/triggers/__main__.py +1 -1
  21. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/triggers/core.py +1 -1
  22. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/utils.py +1 -1
  23. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/etg.py +3 -3
  24. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/guardian.py +1 -1
  25. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/management.py +1 -1
  26. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_archive.py +15 -6
  27. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_batch.py +3 -0
  28. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/triggers.py +2 -2
  29. {gwsumm-2.3.2 → gwsumm-2.4.0/gwsumm.egg-info}/PKG-INFO +4 -5
  30. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm.egg-info/requires.txt +2 -2
  31. {gwsumm-2.3.2 → gwsumm-2.4.0}/pyproject.toml +3 -4
  32. {gwsumm-2.3.2 → gwsumm-2.4.0}/.codeclimate.yml +0 -0
  33. {gwsumm-2.3.2 → gwsumm-2.4.0}/.codecov.yml +0 -0
  34. {gwsumm-2.3.2 → gwsumm-2.4.0}/.flake8 +0 -0
  35. {gwsumm-2.3.2 → gwsumm-2.4.0}/.gitattributes +0 -0
  36. {gwsumm-2.3.2 → gwsumm-2.4.0}/.gitignore +0 -0
  37. {gwsumm-2.3.2 → gwsumm-2.4.0}/.readthedocs.yaml +0 -0
  38. {gwsumm-2.3.2 → gwsumm-2.4.0}/CONTRIBUTING.md +0 -0
  39. {gwsumm-2.3.2 → gwsumm-2.4.0}/LICENSE +0 -0
  40. {gwsumm-2.3.2 → gwsumm-2.4.0}/MANIFEST.in +0 -0
  41. {gwsumm-2.3.2 → gwsumm-2.4.0}/README.rst +0 -0
  42. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/Makefile +0 -0
  43. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/_static/css/custom.css +0 -0
  44. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/_templates/autoclass/class.rst +0 -0
  45. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/_templates/autosummary/base.rst +0 -0
  46. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/_templates/autosummary/class.rst +0 -0
  47. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/_templates/autosummary/module.rst +0 -0
  48. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/_templates/layout.html +0 -0
  49. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/api/index.rst +0 -0
  50. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/automation.rst +0 -0
  51. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/cli.rst +0 -0
  52. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/conf.py +0 -0
  53. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/configuration/data.rst +0 -0
  54. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/configuration/format.rst +0 -0
  55. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/configuration/index.rst +0 -0
  56. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/configuration/tabs.rst +0 -0
  57. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/examples/first.png +0 -0
  58. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/examples/imc.png +0 -0
  59. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/images/screenshot.png +0 -0
  60. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/index.rst +0 -0
  61. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/make.bat +0 -0
  62. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/modes.rst +0 -0
  63. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/overview.rst +0 -0
  64. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/plots.rst +0 -0
  65. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/states.rst +0 -0
  66. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/tabs/api.rst +0 -0
  67. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/tabs/index.rst +0 -0
  68. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/tabs/modes.rst +0 -0
  69. {gwsumm-2.3.2 → gwsumm-2.4.0}/docs/tabs/websites.rst +0 -0
  70. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/__init__.py +0 -0
  71. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/archive.py +0 -0
  72. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/channels.py +0 -0
  73. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/config/__init__.py +0 -0
  74. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/config/defaults.ini +0 -0
  75. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/config/matplotlib.ini +0 -0
  76. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/data/__init__.py +0 -0
  77. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/data/coherence.py +0 -0
  78. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/data/mathutils.py +0 -0
  79. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/data/range.py +0 -0
  80. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/data/spectral.py +0 -0
  81. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/data/utils.py +0 -0
  82. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/globalv.py +0 -0
  83. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/__init__.py +0 -0
  84. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/bootstrap.py +0 -0
  85. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/html5.py +0 -0
  86. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/static.py +0 -0
  87. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/tests/__init__.py +0 -0
  88. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/html/tests/test_static.py +0 -0
  89. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/io.py +0 -0
  90. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/mode.py +0 -0
  91. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/__init__.py +0 -0
  92. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/guardian/__init__.py +0 -0
  93. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/guardian/tests/__init__.py +0 -0
  94. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/guardian/tests/test_main.py +0 -0
  95. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/registry.py +0 -0
  96. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/triggers/__init__.py +0 -0
  97. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/triggers/tests/__init__.py +0 -0
  98. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/plot/triggers/tests/test_main.py +0 -0
  99. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/segments.py +0 -0
  100. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/state/__init__.py +0 -0
  101. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/state/all.py +0 -0
  102. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/state/core.py +0 -0
  103. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/state/registry.py +0 -0
  104. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/__init__.py +0 -0
  105. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/builtin.py +0 -0
  106. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/core.py +0 -0
  107. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/data.py +0 -0
  108. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/fscan.py +0 -0
  109. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/gracedb.py +0 -0
  110. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/misc.py +0 -0
  111. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/registry.py +0 -0
  112. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/sei.py +0 -0
  113. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tabs/stamp.py +0 -0
  114. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/__init__.py +0 -0
  115. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/common.py +0 -0
  116. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_channels.py +0 -0
  117. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_config.py +0 -0
  118. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_data.py +0 -0
  119. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_mode.py +0 -0
  120. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_plot.py +0 -0
  121. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_tabs.py +0 -0
  122. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/tests/test_utils.py +0 -0
  123. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/units.py +0 -0
  124. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm/utils.py +0 -0
  125. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm.egg-info/SOURCES.txt +0 -0
  126. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm.egg-info/dependency_links.txt +0 -0
  127. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm.egg-info/entry_points.txt +0 -0
  128. {gwsumm-2.3.2 → gwsumm-2.4.0}/gwsumm.egg-info/top_level.txt +0 -0
  129. {gwsumm-2.3.2 → gwsumm-2.4.0}/setup.cfg +0 -0
@@ -37,7 +37,6 @@ jobs:
37
37
  - macOS
38
38
  - Ubuntu
39
39
  python-version:
40
- - "3.9"
41
40
  - "3.10"
42
41
  - "3.11"
43
42
  runs-on: ${{ matrix.os }}-latest
@@ -49,7 +48,7 @@ jobs:
49
48
 
50
49
  steps:
51
50
  - name: Get source code
52
- uses: actions/checkout@v4
51
+ uses: actions/checkout@v5
53
52
  with:
54
53
  fetch-depth: 0
55
54
 
@@ -110,14 +109,15 @@ jobs:
110
109
  run: python -m coverage report --show-missing
111
110
 
112
111
  - name: Publish coverage to Codecov
113
- uses: codecov/codecov-action@v4
112
+ uses: codecov/codecov-action@v5.5.1
114
113
  with:
115
114
  files: coverage.xml
116
- flags: ${{ runner.os }},python${{ matrix.python-version }}
115
+ flags: ${{ runner.os }}-python${{ matrix.python-version }}
116
+ token: ${{ secrets.CODECOV_TOKEN }}
117
117
 
118
118
  - name: Upload test results
119
119
  if: always()
120
- uses: actions/upload-artifact@v4
120
+ uses: actions/upload-artifact@v5
121
121
  with:
122
122
  name: pytest-conda-${{ matrix.os }}-${{ matrix.python-version }}
123
123
  path: pytest.xml
@@ -27,9 +27,9 @@ jobs:
27
27
  name: Flake8
28
28
  runs-on: ubuntu-latest
29
29
  steps:
30
- - uses: actions/checkout@v3
30
+ - uses: actions/checkout@v5
31
31
  - name: Set up Python
32
- uses: actions/setup-python@v5
32
+ uses: actions/setup-python@v6
33
33
  with:
34
34
  python-version: '3.x'
35
35
  - name: Install dependencies
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gwsumm
3
- Version: 2.3.2
3
+ Version: 2.4.0
4
4
  Summary: A python toolbox used by the LIGO Scientific Collaboration for detector characterisation
5
5
  Author-email: Alex Urban <alex.urban@ligo.org>, Duncan Macleod <duncan.macleod@ligo.org>
6
6
  Maintainer-email: Evan Goetz <evan.goetz@ligo.org>
@@ -16,18 +16,17 @@ Classifier: Natural Language :: English
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Topic :: Scientific/Engineering
23
22
  Classifier: Topic :: Scientific/Engineering :: Astronomy
24
23
  Classifier: Topic :: Scientific/Engineering :: Physics
25
- Requires-Python: >=3.9
24
+ Requires-Python: >=3.10
26
25
  Description-Content-Type: text/x-rst
27
26
  License-File: LICENSE
28
27
  Requires-Dist: astropy>=3.0.0
29
28
  Requires-Dist: gwdatafind>=1.1.1
30
- Requires-Dist: gwdetchar>=2.2.7
29
+ Requires-Dist: gwdetchar>=2.3.2
31
30
  Requires-Dist: gwpy>=3.0.9
32
31
  Requires-Dist: gwtrigfind
33
32
  Requires-Dist: lalsuite
@@ -39,7 +38,7 @@ Requires-Dist: matplotlib>=3.5
39
38
  Requires-Dist: numpy>=1.16
40
39
  Requires-Dist: pygments>=2.7.0
41
40
  Requires-Dist: python-dateutil
42
- Requires-Dist: python-ligo-lw
41
+ Requires-Dist: igwn-ligolw
43
42
  Requires-Dist: scipy>=1.2.0
44
43
  Provides-Extra: test
45
44
  Requires-Dist: flake8; extra == "test"
@@ -10,19 +10,19 @@ dependencies:
10
10
  # install
11
11
  - astropy >=3.0.0
12
12
  - gwdatafind >=1.1.1
13
- - gwdetchar >=2.0.0
14
- - gwpy >=3.0.0
13
+ - gwdetchar >=2.3.2
14
+ - gwpy >=3.0.9
15
15
  - gwtrigfind
16
16
  - lalsuite
17
17
  - lscsoft-glue >=1.60.0
18
18
  - lxml
19
19
  - markdown
20
20
  - MarkupPy
21
- - matplotlib >=3.1
21
+ - matplotlib >=3.5
22
22
  - numpy >=1.16
23
23
  - pygments >=2.7.0
24
24
  - python-dateutil
25
- - python-ligo-lw
25
+ - igwn-ligolw
26
26
  - scipy >=1.2.0
27
27
  # docs
28
28
  - numpydoc
@@ -38,6 +38,9 @@ import re
38
38
  import sys
39
39
  import warnings
40
40
 
41
+ from astropy.config import get_config_dir
42
+ from astropy.config.paths import get_cache_dir
43
+
41
44
  from collections import OrderedDict
42
45
  from configparser import (DEFAULTSECT, NoOptionError, NoSectionError)
43
46
  from dateutil.relativedelta import relativedelta
@@ -50,7 +53,7 @@ from gwpy.segments import (Segment, SegmentList)
50
53
  from gwpy.signal.spectral import _lal as fft_lal
51
54
  from gwpy.time import (Time, _tconvert, tconvert, to_gps)
52
55
 
53
- from gwdetchar.cli import logger
56
+ from gwdetchar.utils.cli import logger
54
57
 
55
58
  from . import (
56
59
  __version__,
@@ -609,12 +612,23 @@ def main(args=None):
609
612
  if args.html_only:
610
613
  globalv.HTMLONLY = True
611
614
 
612
- # build directories
615
+ # build output directories
613
616
  os.makedirs(args.output_dir, exist_ok=True)
614
617
  os.chdir(args.output_dir)
615
618
  plotdir = os.path.join(path, 'plots')
616
619
  os.makedirs(plotdir, exist_ok=True)
617
620
 
621
+ # build astropy XDG directories
622
+ # The functions get_config_dir() and get_cache_dir() either return the
623
+ # default ~/.astropy/config, ~/.astropy/cache directories or the
624
+ # directories specified by the XDG_CONFIG_HOME and XDG_CACHE_HOME
625
+ # environment variables. We only need to create directories if the
626
+ # variables are set
627
+ if os.environ.get('XDG_CONFIG_HOME', None):
628
+ os.makedirs(os.path.join(get_config_dir(), 'astropy'), exist_ok=True)
629
+ if os.environ.get('XDG_CACHE_HOME', None):
630
+ os.makedirs(os.path.join(get_cache_dir(), 'astropy'), exist_ok=True)
631
+
618
632
  # -- setup --------------------------------------
619
633
 
620
634
  LOGGER.info(" -- GW interferometer summary information system -- ")
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '2.3.2'
21
- __version_tuple__ = version_tuple = (2, 3, 2)
31
+ __version__ = version = '2.4.0'
32
+ __version_tuple__ = version_tuple = (2, 4, 0)
33
+
34
+ __commit_id__ = commit_id = 'gd3aafb449'
@@ -30,7 +30,7 @@ import sys
30
30
 
31
31
  from glue import pipeline
32
32
 
33
- from gwdetchar import cli
33
+ from gwdetchar.utils import cli
34
34
 
35
35
  from . import __version__
36
36
 
@@ -66,7 +66,6 @@ class GWSummaryJob(pipeline.CondorDAGJob):
66
66
  logdir, '%s-%s.err' % (tag, self.logtag)))
67
67
  self.set_stdout_file(os.path.join(
68
68
  logdir, '%s-%s.out' % (tag, self.logtag)))
69
- cmds.setdefault('getenv', 'True')
70
69
  for key, val in cmds.items():
71
70
  if hasattr(self, 'set_%s' % key.lower()):
72
71
  getattr(self, 'set_%s' % key.lower())(val)
@@ -491,14 +490,25 @@ def main(args=None):
491
490
  )
492
491
  for cmd_ in args.condor_command:
493
492
  (key, value) = cmd_.split('=', 1)
494
- condorcmds[key.rstrip().lower()] = value.strip()
493
+ # TODO: the next lines either add the key-value to the condorcmds
494
+ # dictionary or they *append* the value to the existing value already
495
+ # in the condorcmds dictionary. It's not a preferred solution, but
496
+ # the reason it is done this way is because of the way the
497
+ # LIGO summary pages configuration scripts work (the echo_and_run
498
+ # command). We would need to decide if the scripts or function
499
+ # should be rewritten
500
+ if key in condorcmds:
501
+ logger.debug(f"Appending {value.strip()} to condor '{key}' value")
502
+ condorcmds[key] += f" {value.strip()}"
503
+ else:
504
+ condorcmds[key.rstrip().lower()] = value.strip()
495
505
 
496
506
  # Use scitokens
497
507
  condorcmds['use_oauth_services'] = 'scitokens'
498
508
  if ('environment' in condorcmds and
499
509
  'BEARER_TOKEN_FILE' not in condorcmds['environment']):
500
510
  condorcmds['environment'] += (
501
- ';BEARER_TOKEN_FILE='
511
+ ' BEARER_TOKEN_FILE='
502
512
  '$$(CondorScratchDir)/.condor_creds/scitokens.use'
503
513
  )
504
514
  elif 'environment' not in condorcmds:
@@ -507,6 +517,35 @@ def main(args=None):
507
517
  '$$(CondorScratchDir)/.condor_creds/scitokens.use'
508
518
  )
509
519
 
520
+ # set XDG_CONFIG_HOME and XDG_CACHE_HOME vars for astropy
521
+ # see https://docs.astropy.org/en/stable/environment_variables.html
522
+ # the logic here is that if 'environment' exists in condorcmds then
523
+ # if XDG_CONFIG_HOME or XDG_CACHE_HOME doesn't exist then add it (space
524
+ # separated list), or if 'environment' doesn't exist then we've already
525
+ # started with BEARER_TOKEN_FILE above and now we add the XDG variables
526
+ if (('environment' in condorcmds and
527
+ 'XDG_CONFIG_HOME' not in condorcmds['environment']) or
528
+ 'environment' not in condorcmds):
529
+ condorcmds['environment'] += (
530
+ ' XDG_CONFIG_HOME=$$(CondorScratchDir)/tmp/config'
531
+ )
532
+ if (('environment' in condorcmds and
533
+ 'XDG_CACHE_HOME' not in condorcmds['environment']) or
534
+ 'environment' not in condorcmds):
535
+ condorcmds['environment'] += (
536
+ ' XDG_CACHE_HOME=$$(CondorScratchDir)/tmp/cache'
537
+ )
538
+
539
+ # Make sure the environment is a quotation marked string
540
+ if not condorcmds['environment'].startswith('"'):
541
+ condorcmds['environment'] = f"\"{condorcmds['environment']}"
542
+ if not condorcmds['environment'].endswith('"'):
543
+ condorcmds['environment'] = f"{condorcmds['environment']}\""
544
+
545
+ # Environment variables from the access point
546
+ envvars = ('DEFAULT_SEGMENT_SERVER, GWDATAFIND_SERVER, NDSSERVER, '
547
+ 'CONDA_EXE')
548
+
510
549
  # -- build individual gw_summary jobs -----------
511
550
 
512
551
  globalconfig = ','.join(args.global_config)
@@ -515,12 +554,16 @@ def main(args=None):
515
554
  if not args.skip_html_wrapper:
516
555
  htmljob = GWSummaryJob(
517
556
  'local', subdir=outdir, logdir=logdir,
518
- tag=f'{args.file_tag}_local', **condorcmds)
557
+ tag=f'{args.file_tag}_local', **condorcmds,
558
+ getenv=envvars,
559
+ )
519
560
  jobs.append(htmljob)
520
561
  if not args.html_wrapper_only:
521
562
  datajob = GWSummaryJob(
522
563
  universe, subdir=outdir, logdir=logdir,
523
- tag=args.file_tag, **condorcmds)
564
+ tag=args.file_tag, **condorcmds,
565
+ getenv=envvars,
566
+ )
524
567
  jobs.append(datajob)
525
568
 
526
569
  # add common command-line options
@@ -554,7 +554,7 @@ def _get_timeseries_dict(channels, segments, config=None,
554
554
  if nds is None and cache is not None:
555
555
  nds = False
556
556
  elif nds is None:
557
- nds = 'LIGO_DATAFIND_SERVER' not in os.environ
557
+ nds = 'GWDATAFIND_SERVER' not in os.environ
558
558
 
559
559
  # read new data
560
560
  query &= (abs(new) > 0)
@@ -24,7 +24,7 @@ __author__ = 'Alex Urban <alexander.urban@ligo.org>'
24
24
  import pytest
25
25
  from datetime import datetime
26
26
 
27
- from gwdetchar.utils import parse_html
27
+ from gwdetchar.utils.utils import parse_html
28
28
 
29
29
  from .. import bootstrap
30
30
 
@@ -26,7 +26,7 @@ import shutil
26
26
 
27
27
  from markdown import markdown
28
28
 
29
- from gwdetchar.utils import parse_html
29
+ from gwdetchar.utils.utils import parse_html
30
30
 
31
31
  from .. import html5
32
32
 
@@ -33,7 +33,7 @@ from gwpy.plot.colors import tint
33
33
  from gwpy.plot.gps import GPSTransform
34
34
  from gwpy.segments import SegmentList
35
35
 
36
- from gwdetchar.plot import texify
36
+ from gwdetchar.utils.plot import texify
37
37
 
38
38
  from .. import (globalv, io)
39
39
  from ..mode import (Mode, get_mode)
@@ -35,7 +35,7 @@ from gwpy.segments import Segment
35
35
  from gwpy.detector import ChannelList
36
36
  from gwpy.plot import Plot
37
37
 
38
- from gwdetchar.plot import texify
38
+ from gwdetchar.utils.plot import texify
39
39
 
40
40
  from ..channels import (get_channel, split as split_channels,
41
41
  split_combination as split_channel_combination)
@@ -30,7 +30,7 @@ from configparser import DEFAULTSECT
30
30
 
31
31
  from gwpy.time import to_gps
32
32
 
33
- from gwdetchar.cli import logger
33
+ from gwdetchar.utils.cli import logger
34
34
 
35
35
  from ... import globalv
36
36
  from ...archive import (write_data_archive, read_data_archive)
@@ -25,7 +25,7 @@ from gwpy.plot.colors import tint
25
25
  from gwpy.plot.segments import SegmentRectangle
26
26
  from gwpy.segments import (Segment, SegmentList)
27
27
 
28
- from gwdetchar.plot import texify
28
+ from gwdetchar.utils.plot import texify
29
29
 
30
30
  from ...data import get_timeseries
31
31
  from ...segments import get_segments
@@ -26,7 +26,7 @@ from io import StringIO
26
26
 
27
27
  from lxml import etree
28
28
 
29
- from gwdetchar.plot import texify
29
+ from gwdetchar.utils.plot import texify
30
30
 
31
31
  re_bit_label = re.compile(r'\[(?P<idx>.*)\] (?P<label>.*)')
32
32
  re_source_label = re.compile(r'(?P<label>.*) \[(?P<flag>.*)\]')
@@ -25,7 +25,7 @@ import numpy
25
25
 
26
26
  from gwpy.segments import SegmentList
27
27
 
28
- from gwdetchar.plot import texify
28
+ from gwdetchar.utils.plot import texify
29
29
 
30
30
  from ..data import get_spectrum
31
31
  from .registry import (get_plot, register_plot)
@@ -31,7 +31,7 @@ import gwpy.astro
31
31
  from gwpy.segments import (Segment, SegmentList)
32
32
  from gwpy.timeseries import TimeSeries
33
33
 
34
- from gwdetchar.plot import texify
34
+ from gwdetchar.utils.plot import texify
35
35
 
36
36
  from .registry import (get_plot, register_plot)
37
37
  from .utils import hash
@@ -42,7 +42,7 @@ from gwpy.plot.segments import SegmentRectangle
42
42
  from gwpy.segments import (Segment, SegmentList, DataQualityFlag)
43
43
  from gwpy.time import (from_gps, to_gps)
44
44
 
45
- from gwdetchar.plot import texify
45
+ from gwdetchar.utils.plot import texify
46
46
 
47
47
  from .. import globalv
48
48
  from ..mode import (Mode, get_mode)
@@ -28,7 +28,7 @@ from matplotlib.ticker import NullLocator
28
28
  from gwpy.plot import Plot
29
29
  from gwpy.timeseries import TimeSeriesDict
30
30
 
31
- from gwdetchar.plot import texify
31
+ from gwdetchar.utils.plot import texify
32
32
 
33
33
  from ..channels import get_channel
34
34
  from ..utils import re_quote
@@ -31,7 +31,7 @@ from glue.lal import Cache
31
31
  from gwpy.segments import Segment
32
32
  from gwpy.time import to_gps
33
33
 
34
- from gwdetchar.cli import logger
34
+ from gwdetchar.utils.cli import logger
35
35
 
36
36
  from ...segments import get_segments
37
37
  from ...triggers import (get_triggers, keep_in_segments)
@@ -32,7 +32,7 @@ from gwpy.plot.gps import GPSTransform
32
32
  from gwpy.plot.utils import (color_cycle, marker_cycle)
33
33
  from gwpy.segments import SegmentList
34
34
 
35
- from gwdetchar.plot import texify
35
+ from gwdetchar.utils.plot import texify
36
36
 
37
37
  from ... import globalv
38
38
  from ...channels import get_channel
@@ -30,7 +30,7 @@ from gwpy.plot.utils import ( # noqa: F401
30
30
  AXES_PARAMS,
31
31
  )
32
32
 
33
- from gwdetchar.plot import texify
33
+ from gwdetchar.utils.plot import texify
34
34
 
35
35
  __author__ = 'Duncan Macleod <duncan.macleod@ligo.org>'
36
36
 
@@ -66,9 +66,9 @@ class EventTriggerTab(get_tab('default')):
66
66
  later (but before running :meth:`~DataTab.process`) via
67
67
  :meth:`~DataTab.add_state`.
68
68
  table : `type`, `str`, optional
69
- LIGO_LW `~glue.ligolw.table.Table` class to use for this ETG,
70
- e.g. use `~glue.ligolw.lsctables.SnglBurstTable` for Omicron, or
71
- `~glue.ligolw.lsctables.SnglInspiralTable` for CBC
69
+ LIGO_LW `~igwn_ligolw.ligolw.Table` class to use for this ETG,
70
+ e.g. use `~igwn_ligolw.lsctables.SnglBurstTable` for Omicron, or
71
+ `~igwn_ligolw.lsctables.SnglInspiralTable` for CBC
72
72
  cache : `~glue.lal.Cache`, `str`, optional
73
73
  `Cache` object, or path to a LAL-format cache file on disk,
74
74
  from which to read the event triggers. If no cache is given,
@@ -37,7 +37,7 @@ from glue.lal import Cache
37
37
  from gwpy.segments import DataQualityDict
38
38
 
39
39
  from gwdetchar.io import html
40
- from gwdetchar.plot import texify
40
+ from gwdetchar.utils.plot import texify
41
41
 
42
42
  from .. import globalv
43
43
  from ..config import GWSummConfigParser
@@ -28,7 +28,7 @@ from glue.lal import Cache
28
28
  from gwpy.segments import (DataQualityDict, SegmentList)
29
29
 
30
30
  from gwdetchar.io import html
31
- from gwdetchar.plot import texify
31
+ from gwdetchar.utils.plot import texify
32
32
 
33
33
  from ..config import GWSummConfigParser
34
34
  from .registry import (get_tab, register_tab)
@@ -62,10 +62,7 @@ def create(data, **metadata):
62
62
  return d
63
63
 
64
64
 
65
- # -- tests --------------------------------------------------------------------
66
-
67
- def test_write_archive(delete=True):
68
- empty_globalv()
65
+ def add_data():
69
66
  data.add_timeseries(TEST_DATA)
70
67
  data.add_timeseries(create([1, 2, 3, 4, 5],
71
68
  dt=60., channel='X1:TEST-TREND.mean'))
@@ -78,6 +75,13 @@ def test_write_archive(delete=True):
78
75
  t = EventTable(random.random((100, 5)), names=['time', 'a', 'b', 'c', 'd'])
79
76
  t.meta['segments'] = SegmentList([Segment(0, 100)])
80
77
  triggers.add_triggers(t, 'X1:TEST-TABLE,testing')
78
+
79
+
80
+ # -- tests --------------------------------------------------------------------
81
+
82
+ def test_write_archive(delete=True):
83
+ empty_globalv()
84
+ add_data()
81
85
  fname = tempfile.mktemp(suffix='.h5', prefix='gwsumm-tests-')
82
86
  try:
83
87
  archive.write_data_archive(fname)
@@ -85,11 +89,16 @@ def test_write_archive(delete=True):
85
89
  finally:
86
90
  if delete and os.path.isfile(fname):
87
91
  os.remove(fname)
88
- return fname
89
92
 
90
93
 
91
94
  def test_read_archive():
92
- fname = test_write_archive(delete=False)
95
+ empty_globalv()
96
+ add_data()
97
+ fname = tempfile.mktemp(suffix='.h5', prefix='gwsumm-tests-')
98
+ try:
99
+ archive.write_data_archive(fname)
100
+ except Exception:
101
+ raise
93
102
  empty_globalv()
94
103
  try:
95
104
  archive.read_data_archive(fname)
@@ -57,6 +57,8 @@ def test_main(tmpdir, caplog):
57
57
  '--maxjobs', '5',
58
58
  '--condor-timeout', '3',
59
59
  '--condor-command', 'notification=false',
60
+ '--condor-command', 'environment=VAR1=VAL1',
61
+ '--condor-command', 'environment=VAR2=VAL2',
60
62
  '--config-file', k1test,
61
63
  '--global-config', global_,
62
64
  '--nds',
@@ -69,6 +71,7 @@ def test_main(tmpdir, caplog):
69
71
  # test log output
70
72
  batch.main(args)
71
73
  assert "Copied all INI configuration files to ./etc" in caplog.text
74
+ assert "Appending VAR2=VAL2 to condor 'environment' value" in caplog.text
72
75
  assert " -- Configured HTML htmlnode job" in caplog.text
73
76
  assert " -- Configured job for config {}".format(
74
77
  os.path.join(outdir, "etc", os.path.basename(k1test))) in caplog.text
@@ -26,7 +26,7 @@ from astropy.table import vstack as vstack_tables
26
26
 
27
27
  from lal.utils import CacheEntry
28
28
 
29
- from ligo.lw import lsctables
29
+ from igwn_ligolw import lsctables
30
30
 
31
31
  from glue.lal import Cache
32
32
 
@@ -116,7 +116,7 @@ def get_etg_table(etg):
116
116
 
117
117
  Returns
118
118
  -------
119
- table : `type`, subclass of `~ligo.lw.table.Table`
119
+ table : `type`, subclass of `~igwn_ligolw.ligolw.Table`
120
120
  LIGO_LW table registered to the given ETG
121
121
 
122
122
  Raises
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gwsumm
3
- Version: 2.3.2
3
+ Version: 2.4.0
4
4
  Summary: A python toolbox used by the LIGO Scientific Collaboration for detector characterisation
5
5
  Author-email: Alex Urban <alex.urban@ligo.org>, Duncan Macleod <duncan.macleod@ligo.org>
6
6
  Maintainer-email: Evan Goetz <evan.goetz@ligo.org>
@@ -16,18 +16,17 @@ Classifier: Natural Language :: English
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Topic :: Scientific/Engineering
23
22
  Classifier: Topic :: Scientific/Engineering :: Astronomy
24
23
  Classifier: Topic :: Scientific/Engineering :: Physics
25
- Requires-Python: >=3.9
24
+ Requires-Python: >=3.10
26
25
  Description-Content-Type: text/x-rst
27
26
  License-File: LICENSE
28
27
  Requires-Dist: astropy>=3.0.0
29
28
  Requires-Dist: gwdatafind>=1.1.1
30
- Requires-Dist: gwdetchar>=2.2.7
29
+ Requires-Dist: gwdetchar>=2.3.2
31
30
  Requires-Dist: gwpy>=3.0.9
32
31
  Requires-Dist: gwtrigfind
33
32
  Requires-Dist: lalsuite
@@ -39,7 +38,7 @@ Requires-Dist: matplotlib>=3.5
39
38
  Requires-Dist: numpy>=1.16
40
39
  Requires-Dist: pygments>=2.7.0
41
40
  Requires-Dist: python-dateutil
42
- Requires-Dist: python-ligo-lw
41
+ Requires-Dist: igwn-ligolw
43
42
  Requires-Dist: scipy>=1.2.0
44
43
  Provides-Extra: test
45
44
  Requires-Dist: flake8; extra == "test"
@@ -1,6 +1,6 @@
1
1
  astropy>=3.0.0
2
2
  gwdatafind>=1.1.1
3
- gwdetchar>=2.2.7
3
+ gwdetchar>=2.3.2
4
4
  gwpy>=3.0.9
5
5
  gwtrigfind
6
6
  lalsuite
@@ -12,7 +12,7 @@ matplotlib>=3.5
12
12
  numpy>=1.16
13
13
  pygments>=2.7.0
14
14
  python-dateutil
15
- python-ligo-lw
15
+ igwn-ligolw
16
16
  scipy>=1.2.0
17
17
 
18
18
  [dev]
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
10
10
  name = "gwsumm"
11
11
  description = "A python toolbox used by the LIGO Scientific Collaboration for detector characterisation"
12
12
  readme = "README.rst"
13
- requires-python = ">=3.9"
13
+ requires-python = ">=3.10"
14
14
  authors = [
15
15
  { name = "Alex Urban", email = "alex.urban@ligo.org" },
16
16
  { name = "Duncan Macleod", email = "duncan.macleod@ligo.org" },
@@ -28,7 +28,6 @@ classifiers = [
28
28
  "Operating System :: OS Independent",
29
29
  "Programming Language :: Python",
30
30
  "Programming Language :: Python :: 3",
31
- "Programming Language :: Python :: 3.9",
32
31
  "Programming Language :: Python :: 3.10",
33
32
  "Programming Language :: Python :: 3.11",
34
33
  "Topic :: Scientific/Engineering",
@@ -39,7 +38,7 @@ classifiers = [
39
38
  dependencies = [
40
39
  "astropy >=3.0.0",
41
40
  "gwdatafind >=1.1.1",
42
- "gwdetchar >=2.2.7",
41
+ "gwdetchar >=2.3.2",
43
42
  "gwpy >=3.0.9",
44
43
  "gwtrigfind",
45
44
  "lalsuite",
@@ -51,7 +50,7 @@ dependencies = [
51
50
  "numpy >=1.16",
52
51
  "pygments >=2.7.0",
53
52
  "python-dateutil",
54
- "python-ligo-lw",
53
+ "igwn-ligolw",
55
54
  "scipy >=1.2.0",
56
55
  ]
57
56
 
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
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
File without changes
File without changes