gwsumm 2.3.2__tar.gz → 2.3.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.
Files changed (129) hide show
  1. {gwsumm-2.3.2/gwsumm.egg-info → gwsumm-2.3.3}/PKG-INFO +1 -1
  2. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/__main__.py +15 -1
  3. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/_version.py +2 -2
  4. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/batch.py +26 -1
  5. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_archive.py +15 -6
  6. {gwsumm-2.3.2 → gwsumm-2.3.3/gwsumm.egg-info}/PKG-INFO +1 -1
  7. {gwsumm-2.3.2 → gwsumm-2.3.3}/.codeclimate.yml +0 -0
  8. {gwsumm-2.3.2 → gwsumm-2.3.3}/.codecov.yml +0 -0
  9. {gwsumm-2.3.2 → gwsumm-2.3.3}/.flake8 +0 -0
  10. {gwsumm-2.3.2 → gwsumm-2.3.3}/.gitattributes +0 -0
  11. {gwsumm-2.3.2 → gwsumm-2.3.3}/.github/workflows/build.yml +0 -0
  12. {gwsumm-2.3.2 → gwsumm-2.3.3}/.github/workflows/lint.yml +0 -0
  13. {gwsumm-2.3.2 → gwsumm-2.3.3}/.gitignore +0 -0
  14. {gwsumm-2.3.2 → gwsumm-2.3.3}/.readthedocs.yaml +0 -0
  15. {gwsumm-2.3.2 → gwsumm-2.3.3}/CONTRIBUTING.md +0 -0
  16. {gwsumm-2.3.2 → gwsumm-2.3.3}/LICENSE +0 -0
  17. {gwsumm-2.3.2 → gwsumm-2.3.3}/MANIFEST.in +0 -0
  18. {gwsumm-2.3.2 → gwsumm-2.3.3}/README.rst +0 -0
  19. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/Makefile +0 -0
  20. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/_static/css/custom.css +0 -0
  21. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/_templates/autoclass/class.rst +0 -0
  22. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/_templates/autosummary/base.rst +0 -0
  23. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/_templates/autosummary/class.rst +0 -0
  24. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/_templates/autosummary/module.rst +0 -0
  25. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/_templates/layout.html +0 -0
  26. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/api/index.rst +0 -0
  27. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/automation.rst +0 -0
  28. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/cli.rst +0 -0
  29. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/conf.py +0 -0
  30. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/configuration/data.rst +0 -0
  31. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/configuration/format.rst +0 -0
  32. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/configuration/index.rst +0 -0
  33. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/configuration/tabs.rst +0 -0
  34. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/environment.yml +0 -0
  35. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/examples/first.png +0 -0
  36. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/examples/imc.png +0 -0
  37. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/images/screenshot.png +0 -0
  38. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/index.rst +0 -0
  39. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/make.bat +0 -0
  40. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/modes.rst +0 -0
  41. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/overview.rst +0 -0
  42. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/plots.rst +0 -0
  43. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/states.rst +0 -0
  44. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/tabs/api.rst +0 -0
  45. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/tabs/index.rst +0 -0
  46. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/tabs/modes.rst +0 -0
  47. {gwsumm-2.3.2 → gwsumm-2.3.3}/docs/tabs/websites.rst +0 -0
  48. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/__init__.py +0 -0
  49. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/archive.py +0 -0
  50. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/channels.py +0 -0
  51. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/config/__init__.py +0 -0
  52. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/config/defaults.ini +0 -0
  53. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/config/matplotlib.ini +0 -0
  54. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/data/__init__.py +0 -0
  55. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/data/coherence.py +0 -0
  56. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/data/mathutils.py +0 -0
  57. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/data/range.py +0 -0
  58. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/data/spectral.py +0 -0
  59. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/data/timeseries.py +0 -0
  60. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/data/utils.py +0 -0
  61. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/globalv.py +0 -0
  62. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/__init__.py +0 -0
  63. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/bootstrap.py +0 -0
  64. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/html5.py +0 -0
  65. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/static.py +0 -0
  66. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/tests/__init__.py +0 -0
  67. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/tests/test_bootstrap.py +0 -0
  68. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/tests/test_html5.py +0 -0
  69. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/html/tests/test_static.py +0 -0
  70. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/io.py +0 -0
  71. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/mode.py +0 -0
  72. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/__init__.py +0 -0
  73. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/builtin.py +0 -0
  74. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/core.py +0 -0
  75. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/guardian/__init__.py +0 -0
  76. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/guardian/__main__.py +0 -0
  77. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/guardian/core.py +0 -0
  78. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/guardian/tests/__init__.py +0 -0
  79. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/guardian/tests/test_main.py +0 -0
  80. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/mixins.py +0 -0
  81. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/noisebudget.py +0 -0
  82. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/range.py +0 -0
  83. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/registry.py +0 -0
  84. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/segments.py +0 -0
  85. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/sei.py +0 -0
  86. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/triggers/__init__.py +0 -0
  87. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/triggers/__main__.py +0 -0
  88. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/triggers/core.py +0 -0
  89. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/triggers/tests/__init__.py +0 -0
  90. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/triggers/tests/test_main.py +0 -0
  91. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/plot/utils.py +0 -0
  92. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/segments.py +0 -0
  93. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/state/__init__.py +0 -0
  94. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/state/all.py +0 -0
  95. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/state/core.py +0 -0
  96. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/state/registry.py +0 -0
  97. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/__init__.py +0 -0
  98. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/builtin.py +0 -0
  99. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/core.py +0 -0
  100. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/data.py +0 -0
  101. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/etg.py +0 -0
  102. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/fscan.py +0 -0
  103. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/gracedb.py +0 -0
  104. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/guardian.py +0 -0
  105. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/management.py +0 -0
  106. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/misc.py +0 -0
  107. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/registry.py +0 -0
  108. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/sei.py +0 -0
  109. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tabs/stamp.py +0 -0
  110. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/__init__.py +0 -0
  111. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/common.py +0 -0
  112. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_batch.py +0 -0
  113. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_channels.py +0 -0
  114. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_config.py +0 -0
  115. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_data.py +0 -0
  116. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_mode.py +0 -0
  117. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_plot.py +0 -0
  118. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_tabs.py +0 -0
  119. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/tests/test_utils.py +0 -0
  120. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/triggers.py +0 -0
  121. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/units.py +0 -0
  122. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm/utils.py +0 -0
  123. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm.egg-info/SOURCES.txt +0 -0
  124. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm.egg-info/dependency_links.txt +0 -0
  125. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm.egg-info/entry_points.txt +0 -0
  126. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm.egg-info/requires.txt +0 -0
  127. {gwsumm-2.3.2 → gwsumm-2.3.3}/gwsumm.egg-info/top_level.txt +0 -0
  128. {gwsumm-2.3.2 → gwsumm-2.3.3}/pyproject.toml +0 -0
  129. {gwsumm-2.3.2 → gwsumm-2.3.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gwsumm
3
- Version: 2.3.2
3
+ Version: 2.3.3
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>
@@ -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
@@ -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 -- ")
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.3.2'
21
- __version_tuple__ = version_tuple = (2, 3, 2)
20
+ __version__ = version = '2.3.3'
21
+ __version_tuple__ = version_tuple = (2, 3, 3)
@@ -498,7 +498,7 @@ def main(args=None):
498
498
  if ('environment' in condorcmds and
499
499
  'BEARER_TOKEN_FILE' not in condorcmds['environment']):
500
500
  condorcmds['environment'] += (
501
- ';BEARER_TOKEN_FILE='
501
+ ' BEARER_TOKEN_FILE='
502
502
  '$$(CondorScratchDir)/.condor_creds/scitokens.use'
503
503
  )
504
504
  elif 'environment' not in condorcmds:
@@ -507,6 +507,31 @@ def main(args=None):
507
507
  '$$(CondorScratchDir)/.condor_creds/scitokens.use'
508
508
  )
509
509
 
510
+ # set XDG_CONFIG_HOME and XDG_CACHE_HOME vars for astropy
511
+ # see https://docs.astropy.org/en/stable/environment_variables.html
512
+ # the logic here is that if 'environment' exists in condorcmds then
513
+ # if XDG_CONFIG_HOME or XDG_CACHE_HOME doesn't exist then add it (space
514
+ # separated list), or if 'environment' doesn't exist then we've already
515
+ # started with BEARER_TOKEN_FILE above and now we add the XDG variables
516
+ if (('environment' in condorcmds and
517
+ 'XDG_CONFIG_HOME' not in condorcmds['environment']) or
518
+ 'environment' not in condorcmds):
519
+ condorcmds['environment'] += (
520
+ ' XDG_CONFIG_HOME=$$(CondorScratchDir)/tmp/config'
521
+ )
522
+ if (('environment' in condorcmds and
523
+ 'XDG_CACHE_HOME' not in condorcmds['environment']) or
524
+ 'environment' not in condorcmds):
525
+ condorcmds['environment'] += (
526
+ ' XDG_CACHE_HOME=$$(CondorScratchDir)/tmp/cache'
527
+ )
528
+
529
+ # Make sure the environment is a quotation marked string
530
+ if not condorcmds['environment'].startswith('"'):
531
+ condorcmds['environment'] = f"\"{condorcmds['environment']}"
532
+ if not condorcmds['environment'].endswith('"'):
533
+ condorcmds['environment'] = f"{condorcmds['environment']}\""
534
+
510
535
  # -- build individual gw_summary jobs -----------
511
536
 
512
537
  globalconfig = ','.join(args.global_config)
@@ -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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gwsumm
3
- Version: 2.3.2
3
+ Version: 2.3.3
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>
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
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