gwdatafind-server 1.5.0__tar.gz → 2.2.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 (143) hide show
  1. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/.gitignore +7 -0
  2. gwdatafind_server-2.2.0/.gitlab-ci.yml +84 -0
  3. gwdatafind_server-2.2.0/.markdownlint.yml +26 -0
  4. gwdatafind_server-2.2.0/CHANGELOG.md +133 -0
  5. gwdatafind_server-2.2.0/Dockerfile +96 -0
  6. gwdatafind_server-2.2.0/MANIFEST.in +3 -0
  7. gwdatafind_server-2.2.0/PKG-INFO +60 -0
  8. gwdatafind_server-2.2.0/README.md +21 -0
  9. gwdatafind_server-2.2.0/config/docker-compose.yml +60 -0
  10. gwdatafind_server-2.2.0/config/gunicorn.conf.py +147 -0
  11. gwdatafind_server-2.2.0/config/gwdatafind-server.service +57 -0
  12. gwdatafind_server-2.2.0/config/gwdatafind-server.toml +186 -0
  13. gwdatafind_server-2.2.0/diskcache/Makefile +11 -0
  14. gwdatafind_server-2.2.0/diskcache/create_testdata.py +162 -0
  15. gwdatafind_server-2.2.0/diskcache/diskcache.rsc +121 -0
  16. gwdatafind_server-2.2.0/docker-compose.yml +60 -0
  17. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/docs/api/index.md +1 -1
  18. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/docs/api/ldr.md +9 -8
  19. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/docs/api/v1.md +13 -12
  20. gwdatafind_server-2.2.0/docs/changelog.md +133 -0
  21. gwdatafind_server-2.2.0/docs/configuration.md +587 -0
  22. gwdatafind_server-2.2.0/docs/deploy/examples/auth.md +123 -0
  23. gwdatafind_server-2.2.0/docs/deploy/examples/diskcache.md +114 -0
  24. gwdatafind_server-2.2.0/docs/deploy/examples/gwosc.md +67 -0
  25. gwdatafind_server-2.2.0/docs/deploy/examples/index.md +31 -0
  26. gwdatafind_server-2.2.0/docs/deploy/index.md +170 -0
  27. gwdatafind_server-2.2.0/docs/index.md +25 -0
  28. gwdatafind_server-2.2.0/docs/overview.md +90 -0
  29. gwdatafind_server-2.2.0/docs/requirements.txt +9 -0
  30. gwdatafind_server-2.2.0/examples/auth/docker-compose.yml +66 -0
  31. gwdatafind_server-2.2.0/examples/auth/gwdatafind-server.toml +247 -0
  32. gwdatafind_server-2.2.0/examples/diskcache/docker-compose.yml +71 -0
  33. gwdatafind_server-2.2.0/examples/diskcache/gwdatafind-server.toml +205 -0
  34. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/gwdatafind_server/__init__.py +7 -7
  35. gwdatafind_server-2.2.0/gwdatafind_server/_version.py +24 -0
  36. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/gwdatafind_server/api/__init__.py +2 -4
  37. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/gwdatafind_server/api/base.py +5 -8
  38. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/gwdatafind_server/api/ldr.py +1 -2
  39. gwdatafind_server-2.2.0/gwdatafind_server/api/utils.py +44 -0
  40. gwdatafind_server-2.2.0/gwdatafind_server/api/v1.py +451 -0
  41. gwdatafind_server-2.2.0/gwdatafind_server/app.py +342 -0
  42. gwdatafind_server-2.2.0/gwdatafind_server/auth/__init__.py +25 -0
  43. gwdatafind_server-2.2.0/gwdatafind_server/auth/core.py +322 -0
  44. gwdatafind_server-2.2.0/gwdatafind_server/auth/scitoken.py +139 -0
  45. gwdatafind_server-2.2.0/gwdatafind_server/cache.py +1682 -0
  46. gwdatafind_server-2.2.0/gwdatafind_server/config.py +636 -0
  47. gwdatafind_server-2.2.0/gwdatafind_server/credential/__init__.py +39 -0
  48. gwdatafind_server-2.2.0/gwdatafind_server/credential/credential.py +71 -0
  49. gwdatafind_server-2.2.0/gwdatafind_server/credential/scitoken.py +125 -0
  50. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/gwdatafind_server/gwdatafind_server.wsgi +0 -1
  51. gwdatafind_server-2.2.0/gwdatafind_server/source/__init__.py +52 -0
  52. gwdatafind_server-2.2.0/gwdatafind_server/source/diskcache.py +306 -0
  53. gwdatafind_server-2.2.0/gwdatafind_server/source/pelican.py +644 -0
  54. gwdatafind_server-2.2.0/gwdatafind_server/source/source.py +225 -0
  55. gwdatafind_server-2.2.0/gwdatafind_server/urls.py +125 -0
  56. gwdatafind_server-2.2.0/gwdatafind_server.egg-info/PKG-INFO +60 -0
  57. gwdatafind_server-2.2.0/gwdatafind_server.egg-info/SOURCES.txt +82 -0
  58. gwdatafind_server-2.2.0/gwdatafind_server.egg-info/requires.txt +19 -0
  59. gwdatafind_server-2.2.0/mkdocs.yml +67 -0
  60. gwdatafind_server-2.2.0/pyproject.toml +195 -0
  61. gwdatafind_server-2.2.0/setup.cfg +4 -0
  62. gwdatafind_server-2.2.0/tests/__init__.py +4 -0
  63. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/tests/cache-0x00ff.dat +2 -2
  64. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/tests/cache-0x0101.dat +2 -2
  65. gwdatafind_server-2.2.0/tests/conftest.py +65 -0
  66. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/tests/gwdatafind-server.ini +3 -4
  67. gwdatafind_server-2.2.0/tests/gwdatafind-server.toml +58 -0
  68. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/tests/test_api_v1.py +61 -60
  69. gwdatafind_server-2.2.0/tests/test_app.py +6 -0
  70. gwdatafind_server-2.2.0/tests/test_auth_override.py +110 -0
  71. gwdatafind-server-1.5.0/tests/test_authentication_scitokens.py → gwdatafind_server-2.2.0/tests/test_auth_scitoken.py +18 -17
  72. gwdatafind_server-2.2.0/tests/test_cache.py +1979 -0
  73. gwdatafind_server-2.2.0/tests/test_config.py +78 -0
  74. gwdatafind_server-2.2.0/tests/test_credential.py +24 -0
  75. gwdatafind_server-2.2.0/tests/test_credential_scitoken.py +132 -0
  76. gwdatafind_server-2.2.0/tests/test_source.py +442 -0
  77. gwdatafind_server-2.2.0/tests/test_source_diskcache.py +474 -0
  78. gwdatafind_server-2.2.0/tests/test_source_pelican.py +627 -0
  79. gwdatafind_server-2.2.0/tests/test_urls.py +234 -0
  80. gwdatafind_server-2.2.0/tests/utils.py +32 -0
  81. gwdatafind-server-1.5.0/.gitlab/ci/analysis.yml +0 -53
  82. gwdatafind-server-1.5.0/.gitlab/ci/coverage.yml +0 -22
  83. gwdatafind-server-1.5.0/.gitlab/ci/debian.yml +0 -181
  84. gwdatafind-server-1.5.0/.gitlab/ci/dist.yml +0 -26
  85. gwdatafind-server-1.5.0/.gitlab/ci/docker.yml +0 -40
  86. gwdatafind-server-1.5.0/.gitlab/ci/docs.yml +0 -55
  87. gwdatafind-server-1.5.0/.gitlab/ci/python.yml +0 -71
  88. gwdatafind-server-1.5.0/.gitlab/ci/rhel.yml +0 -173
  89. gwdatafind-server-1.5.0/.gitlab/ci/test.yml +0 -41
  90. gwdatafind-server-1.5.0/.gitlab-ci.yml +0 -35
  91. gwdatafind-server-1.5.0/.gitmodules +0 -3
  92. gwdatafind-server-1.5.0/Dockerfile +0 -37
  93. gwdatafind-server-1.5.0/MANIFEST.in +0 -5
  94. gwdatafind-server-1.5.0/PKG-INFO +0 -53
  95. gwdatafind-server-1.5.0/README.md +0 -18
  96. gwdatafind-server-1.5.0/config/gunicorn.conf +0 -21
  97. gwdatafind-server-1.5.0/config/gunicorn.conf.py +0 -224
  98. gwdatafind-server-1.5.0/config/gwdatafind-server.ini +0 -75
  99. gwdatafind-server-1.5.0/config/gwdatafind-server.service +0 -17
  100. gwdatafind-server-1.5.0/config/wsgi.conf +0 -21
  101. gwdatafind-server-1.5.0/debian/changelog +0 -94
  102. gwdatafind-server-1.5.0/debian/clean +0 -1
  103. gwdatafind-server-1.5.0/debian/compat +0 -1
  104. gwdatafind-server-1.5.0/debian/control +0 -55
  105. gwdatafind-server-1.5.0/debian/copyright +0 -24
  106. gwdatafind-server-1.5.0/debian/gwdatafind-server.docs +0 -2
  107. gwdatafind-server-1.5.0/debian/gwdatafind-server.install +0 -7
  108. gwdatafind-server-1.5.0/debian/gwdatafind-server.postinst +0 -57
  109. gwdatafind-server-1.5.0/debian/python3-gwdatafind-server.docs +0 -2
  110. gwdatafind-server-1.5.0/debian/python3-gwdatafind-server.install +0 -1
  111. gwdatafind-server-1.5.0/debian/rules +0 -4
  112. gwdatafind-server-1.5.0/debian/source/format +0 -1
  113. gwdatafind-server-1.5.0/docker/httpd.conf +0 -584
  114. gwdatafind-server-1.5.0/docker/supervisord.conf +0 -18
  115. gwdatafind-server-1.5.0/docker-compose.yml +0 -26
  116. gwdatafind-server-1.5.0/docs/configuration.md +0 -50
  117. gwdatafind-server-1.5.0/docs/index.md +0 -32
  118. gwdatafind-server-1.5.0/docs/requirements.txt +0 -7
  119. gwdatafind-server-1.5.0/gwdatafind_server/_version.py +0 -16
  120. gwdatafind-server-1.5.0/gwdatafind_server/api/utils.py +0 -102
  121. gwdatafind-server-1.5.0/gwdatafind_server/api/v1.py +0 -448
  122. gwdatafind-server-1.5.0/gwdatafind_server/app.py +0 -140
  123. gwdatafind-server-1.5.0/gwdatafind_server/authentication.py +0 -203
  124. gwdatafind-server-1.5.0/gwdatafind_server/cache.py +0 -366
  125. gwdatafind-server-1.5.0/gwdatafind_server/config.py +0 -30
  126. gwdatafind-server-1.5.0/gwdatafind_server.egg-info/PKG-INFO +0 -53
  127. gwdatafind-server-1.5.0/gwdatafind_server.egg-info/SOURCES.txt +0 -76
  128. gwdatafind-server-1.5.0/gwdatafind_server.egg-info/requires.txt +0 -10
  129. gwdatafind-server-1.5.0/mkdocs.yml +0 -58
  130. gwdatafind-server-1.5.0/pyproject.toml +0 -40
  131. gwdatafind-server-1.5.0/python-gwdatafind-server.spec +0 -168
  132. gwdatafind-server-1.5.0/setup.cfg +0 -59
  133. gwdatafind-server-1.5.0/setup.py +0 -9
  134. gwdatafind-server-1.5.0/tests/conftest.py +0 -21
  135. gwdatafind-server-1.5.0/tests/test_app.py +0 -14
  136. gwdatafind-server-1.5.0/tests/test_authentication_x509.py +0 -60
  137. gwdatafind-server-1.5.0/tests/test_cache.py +0 -115
  138. gwdatafind-server-1.5.0/tests/test_config.py +0 -34
  139. gwdatafind-server-1.5.0/tests/utils.py +0 -21
  140. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/LICENSE +0 -0
  141. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/gwdatafind_server.egg-info/dependency_links.txt +0 -0
  142. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/gwdatafind_server.egg-info/top_level.txt +0 -0
  143. {gwdatafind-server-1.5.0 → gwdatafind_server-2.2.0}/tests/grid-mapfile +0 -0
@@ -2,6 +2,7 @@
2
2
  *.pyc
3
3
  .DS_store
4
4
  *.swp
5
+ .vscode/
5
6
 
6
7
  # build files/directories to ignore
7
8
  /dist/
@@ -16,3 +17,9 @@ __pycache__/
16
17
 
17
18
  # setuptools-scm
18
19
  /gwdatafind_server/_version.py
20
+
21
+ # diskcache testing
22
+ /diskcache/data
23
+
24
+ # don't upload keytabs!
25
+ *.keytab
@@ -0,0 +1,84 @@
1
+ workflow:
2
+ rules:
3
+ # run for merge requests
4
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
5
+ # don't run on branches if there's an open merge request
6
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
7
+ when: never
8
+ # run on branches and tags
9
+ - if: $CI_COMMIT_BRANCH || $CI_COMMIT_TAG
10
+
11
+ include:
12
+ # -- Python ------------------------
13
+
14
+ # https://computing.docs.ligo.org/guide/gitlab/components/python/all/
15
+ - component: $CI_SERVER_FQDN/computing/gitlab/components/python/all@3
16
+ inputs:
17
+ merge_request_pipelines: true
18
+ uv: true
19
+ code_quality_analyzer: "ruff"
20
+ run_advanced_sast: true
21
+ python_versions:
22
+ - "3.11"
23
+ - "3.12"
24
+ - "3.13"
25
+ - "3.14"
26
+ pip_install_options: "--group test"
27
+ pytest_options: >-
28
+ --cov=gwdatafind_server
29
+ --durations=10
30
+ -ra
31
+ --verbose
32
+
33
+ # https://computing.docs.ligo.org/guide/gitlab/components/python/ty/
34
+ - component: $CI_SERVER_FQDN/computing/gitlab/components/python/ty@3
35
+ inputs:
36
+ uv_options: "--group dev"
37
+
38
+ # -- Docker build ------------------
39
+
40
+ # https://computing.docs.ligo.org/guide/gitlab/components/docker/all/
41
+ - component: $CI_SERVER_FQDN/computing/gitlab/components/docker/all@2
42
+ inputs:
43
+ merge_request_pipelines: true
44
+ upstream_project_path: "computing/gwdatafind/server"
45
+ test_script:
46
+ # sanity check CMD prompt in dockerfile
47
+ - timeout
48
+ --preserve-status
49
+ --signal=INT
50
+ 10
51
+ /opt/gwdatafind-server/bin/python3
52
+ -m gunicorn
53
+ --bind=0.0.0.0:8080
54
+ --config=/etc/gwdatafind/gunicorn.conf.py
55
+ --forwarded-allow-ips="*"
56
+ "gwdatafind_server:create_app()"
57
+ # deploy options
58
+ deploy_tag: $CI_COMMIT_REF_NAME # use verbatim tag name
59
+ deploy_when: tags
60
+
61
+ # -- Documentation -----------------
62
+
63
+ # markdownlint
64
+ - component: git.ligo.org/components/markdownlint/markdownlint@2
65
+ inputs:
66
+ job_name: markdownlint
67
+ fail_on_findings: false
68
+ glob: "'**/*.md' '#README.md'"
69
+
70
+ # https://computing.docs.ligo.org/guide/gitlab/components/mkdocs/build/
71
+ - component: $CI_SERVER_FQDN/computing/gitlab/components/mkdocs/build@1
72
+ inputs:
73
+ merge_request_pipelines: true
74
+ requirements: "-r docs/requirements.txt"
75
+ pages_when: tags
76
+
77
+ # -- customisations ------------------
78
+
79
+ docker_test:
80
+ needs:
81
+ - job: docker_build
82
+ artifacts: false # don't pull in the dotenv file
83
+ variables:
84
+ GIT_STRATEGY: none
@@ -0,0 +1,26 @@
1
+ # enable all rules
2
+ default: true
3
+
4
+ # don't check code-block style, markdownlint chokes on non-code fenced blocks,
5
+ # e.g. tabbed content
6
+ code-block-style: false
7
+
8
+ # don't check line length
9
+ line-length: false
10
+
11
+ # markdownlint doesn't understand attr_list fragments
12
+ link-fragments: false
13
+
14
+ list-marker-space:
15
+ ul_single: 1
16
+ ul_multi: 3
17
+ ol_multi: 2
18
+
19
+ no-trailing-punctuation:
20
+ punctuation: ".,;:"
21
+
22
+ single-title:
23
+ front_matter_title: ""
24
+
25
+ ul-indent:
26
+ indent: 4
@@ -0,0 +1,133 @@
1
+ # Changelog
2
+
3
+ ## 2.2.0 - 2025-04-09 { #2.2.0 }
4
+
5
+ - Fix directory recursion with Pelican memory cache
6
+ ([!129](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/129))
7
+ - Add Pelican cache versioning and compatibility checks
8
+ ([!130](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/130))
9
+
10
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/2.2.0)
11
+
12
+ ## 2.1.0 - 2025-03-26 { #2.1.0 }
13
+
14
+ - Add Pelican database cache file
15
+ ([!122](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/122))
16
+ - Use pelicanfs 1.2.2
17
+ ([!123](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/123))
18
+ - Refactor T010150 filename parsing
19
+ ([!124](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/124))
20
+ - Drop support for Python 3.10
21
+ ([!125](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/125))
22
+ - Use ty for type checking (not mypy)
23
+ ([!126](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/126))
24
+ - Add support for Python 3.14
25
+ ([!127](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/127))
26
+
27
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/2.1.0)
28
+
29
+ ## 2.0.0 - 2025-08-23 { #2.0.0 }
30
+
31
+ - Major configuration re-write
32
+ ([!86](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/86))
33
+ - Remove support for X.509 authentication
34
+ ([!98](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/98))
35
+ - Support multiple data sources
36
+ ([!99](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/99))
37
+ - Add markdownlint configuration and CI/CD job
38
+ ([!98](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/98))
39
+ - Update source to return fully-qualified URLs
40
+ ([!102](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/102))
41
+ - Implement server credential management
42
+ ([!111](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/111))
43
+ - Add detailed container deployment examples
44
+ ([!113](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/113))
45
+ - Drop support for Python 3.9
46
+ ([!118](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/118))
47
+
48
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/2.0.0)
49
+
50
+ ## 1.5.0 - 2024-07-24 { #1.5.0 }
51
+
52
+ - Migrate from ligo-segments to igwn-segments
53
+ ([!93](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/93))
54
+ - Added multiple scitoken issuer support
55
+ ([!83](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/83))
56
+ - Enabled getting latest diskcache over socket
57
+ ([!79](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/79))
58
+ - Allow not configuring a grid-mapfile
59
+ ([!84](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/84))
60
+
61
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/gwdatafind-server-1.5.0)
62
+
63
+ ## 1.4.0 - 2024-03-18 { #1.4.0 }
64
+
65
+ - Added Support for EL9, dropped support for EL7
66
+ ([!56](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/56),
67
+ [!71](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/71))
68
+ - Added better error handling
69
+ ([!75](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/75))
70
+ - Added v1 API
71
+ ([!63](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/63))
72
+ - Added multiple diskcache format handling
73
+ ([!76](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/76))
74
+ - Fix detection of X.509 cert in headers
75
+ ([!80](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/80))
76
+
77
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/gwdatafind-server-1.4.0)
78
+
79
+ ## 1.3.0 - 2023-12-13 { #1.3.0 }
80
+
81
+ - Add support for OSDF URL transforms
82
+ ([!64](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/64))
83
+ - Drop support for Debian Buster
84
+ ([!67](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/67))
85
+ - Add Debian postinst script to create user
86
+ ([!68](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/68))
87
+
88
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/gwdatafind-server-1.3.0)
89
+
90
+ ## 1.2.2 - 2023-10-18 { #1.2.0 }
91
+
92
+ - Fix bug in find_url
93
+ ([!60](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/60))
94
+
95
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/gwdatafind-server-1.2.2)
96
+
97
+ ## 1.2.1 - 2023-09-13 { #1.2.1 }
98
+
99
+ - Add ability to search for fractional GPS times
100
+ ([!58](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/58))
101
+ - ignore comment lines in cache file
102
+ ([!57](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/57))
103
+ - Update default scope/issuer for new token scheme
104
+ ([!55](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/55))
105
+ - Fix bug in parsing tokens with pathless scope
106
+ ([!54](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/54))
107
+ - Fix use of new configuration key
108
+ ([!53](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/53))
109
+
110
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/gwdatafind-server-1.2.1)
111
+
112
+ ## 1.2.0 - 2023-08-09 { #1.2.0 }
113
+
114
+ - Add SciToken support
115
+ ([!6](https://git.ligo.org/computing/gwdatafind/server/-/merge_requests/6))
116
+
117
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/gwdatafind-server-1.2.0)
118
+
119
+ ## 1.1.0 - 2023-05-17 { #1.1.0 }
120
+
121
+ - Added no-authentication method with virtual hosts.
122
+ - Added API versioning.
123
+ - General clean up of code.
124
+
125
+ [Full details](https://git.ligo.org/computing/gwdatafind/server/-/releases/gwdatafind-server-1.1.0)
126
+
127
+ ## 1.0.1 - 2022-12-14 { #1.0.1 }
128
+
129
+ - Updated maintainer, source url, and copyright information for packaging on PyPI
130
+
131
+ ## 1.0.0 - 2022-11-30 { #1.0.0 }
132
+
133
+ - Initial release of gwdatafind server. Includes X.509 certificate authentication.
@@ -0,0 +1,96 @@
1
+ # -- build
2
+
3
+ FROM ghcr.io/astral-sh/uv:python3.14-bookworm AS build
4
+
5
+ ARG SETUPTOOLS_SCM_PRETEND_VERSION
6
+
7
+ WORKDIR /code
8
+
9
+ COPY .git .git
10
+ COPY . ./
11
+
12
+ # Generate a wheel
13
+ RUN if [ -n "$SETUPTOOLS_SCM_PRETEND_VERSION" ]; then \
14
+ export SETUPTOOLS_SCM_PRETEND_VERSION="$SETUPTOOLS_SCM_PRETEND_VERSION"; \
15
+ fi \
16
+ && uv build --wheel
17
+
18
+ # -- install
19
+
20
+ FROM ghcr.io/astral-sh/uv:python3.14-bookworm AS install
21
+
22
+ ENV VIRTUAL_ENV=/opt/gwdatafind-server
23
+
24
+ WORKDIR /code
25
+
26
+ # Generate the virtual environment
27
+ RUN uv venv ${VIRTUAL_ENV}
28
+
29
+ # Install the requirements
30
+ COPY pyproject.toml .
31
+ RUN uv pip install -r pyproject.toml
32
+
33
+ # Install the app
34
+ COPY --from=build /code/dist/*.whl /code
35
+ RUN WHEEL=$(ls /code/*.whl) \
36
+ && uv pip install $WHEEL[credentials,gunicorn,pelican]
37
+
38
+ # -- application stage
39
+
40
+ FROM python:3.14-slim AS app
41
+
42
+ LABEL org.opencontainers.image.license="GPL-3.0-or-later"
43
+ LABEL org.opencontainers.image.title="GWDataFind Server - Python 3.14 (Debian)"
44
+ LABEL org.opencontainers.image.description="The GWDataFind data discovery server application"
45
+ LABEL org.opencontainers.image.source="https://git.ligo.org/computing/gwdatafind/server"
46
+ LABEL org.opencontainers.image.vendor="IGWN"
47
+ LABEL org.opencontainers.image.authors="Duncan Macleod <duncan.macleod@ligo.org>"
48
+ LABEL org.igwn.support="Best effort"
49
+
50
+ ENV VIRTUAL_ENV=/opt/gwdatafind-server
51
+ ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
52
+
53
+ COPY --from=install ${VIRTUAL_ENV} ${VIRTUAL_ENV}
54
+
55
+ # Install system packages needed for the application
56
+ #
57
+ # - libgssapi-krb5-2: Required for python-gssapi
58
+ #
59
+ RUN apt-get update -yqq \
60
+ && apt-get install -yqq \
61
+ libgssapi-krb5-2 \
62
+ && rm -rf /var/lib/apt/lists/*
63
+
64
+ # Create application user
65
+ RUN apt-get update -yqq \
66
+ && apt-get install -yqq adduser \
67
+ && addgroup --system gwdatafind \
68
+ && adduser --system --ingroup gwdatafind --home /var/lib/gwdatafind gwdatafind \
69
+ && rm -rf /var/lib/apt/lists/*
70
+
71
+ # Create application directories
72
+ RUN mkdir -p /var/log/gwdatafind && chown gwdatafind:root /var/log/gwdatafind \
73
+ && mkdir -p /var/run/gwdatafind && chown gwdatafind:root /var/run/gwdatafind
74
+
75
+ # Set the user to run the application
76
+ USER gwdatafind
77
+
78
+ # Set the working directory
79
+ WORKDIR /var/lib/gwdatafind
80
+
81
+ # Install the Gunicorn configuration
82
+ COPY config/gunicorn.conf.py /etc/gwdatafind/gunicorn.conf.py
83
+
84
+ # Install the GWDataFind server configuration file
85
+ COPY config/gwdatafind-server.toml /etc/gwdatafind/gwdatafind-server.toml
86
+
87
+ # Expose the server port
88
+ EXPOSE 8080
89
+
90
+ # Command to start the server
91
+ CMD ["python3", \
92
+ "-m", "gunicorn", \
93
+ "--bind=0.0.0.0:8080", \
94
+ "--config=/etc/gwdatafind/gunicorn.conf.py", \
95
+ "--forwarded-allow-ips=*", \
96
+ "gwdatafind_server:create_app()"]
@@ -0,0 +1,3 @@
1
+ include CHANGELOG.md LICENSE README.md
2
+ recursive-include config *.conf *.conf.py *.ini *.service
3
+ recursive-include tests *
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: gwdatafind-server
3
+ Version: 2.2.0
4
+ Summary: The GWDataFind data discover server application
5
+ Author-email: Duncan Macleod <duncan.macleod@ligo.org>, Duncan Meacher <duncan.meacher@ligo.org>
6
+ License: GPL-3.0-or-later
7
+ Project-URL: Homepage, https://git.ligo.org/computing/gwdatafind/server/
8
+ Project-URL: Bug tracker, https://git.ligo.org/computing/gwdatafind/server/-/issues
9
+ Project-URL: Documentation, https://computing.docs.ligo.org/gwdatafind/server/
10
+ Project-URL: Source code, https://git.ligo.org/computing/gwdatafind/server/
11
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
12
+ Classifier: Natural Language :: English
13
+ Classifier: Operating System :: Unix
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
22
+ Classifier: Topic :: Scientific/Engineering :: Physics
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: configobj
27
+ Requires-Dist: flask>=2.3.2
28
+ Requires-Dist: flask-apscheduler
29
+ Requires-Dist: igwn-segments>=2.0.0
30
+ Requires-Dist: scitokens
31
+ Provides-Extra: credentials
32
+ Requires-Dist: igwn-robot-auth>=0.3.2; extra == "credentials"
33
+ Provides-Extra: gunicorn
34
+ Requires-Dist: gunicorn; extra == "gunicorn"
35
+ Provides-Extra: pelican
36
+ Requires-Dist: pelicanfs; python_version < "3.12" and extra == "pelican"
37
+ Requires-Dist: pelicanfs!=1.3.1,>=1.2.2; python_version >= "3.12" and extra == "pelican"
38
+ Dynamic: license-file
39
+
40
+ # GWDataFind Server
41
+
42
+ This module defines a Flask Application that serves data URLs from one or more data sources.
43
+
44
+ For full documentation, see <https://computing.docs.ligo.org/gwdatafind/server/>.
45
+
46
+ ## Quick Start with Docker
47
+
48
+ For containerized deployments, see the deployment examples:
49
+
50
+ - **Default**: Public data only (simple setup)
51
+ - **[examples/diskcache/](examples/diskcache/)**: Local filesystem + public data
52
+ - **[examples/private-data/](examples/private-data/)**: Private IGWN data with SciTokens
53
+
54
+ Quick start:
55
+
56
+ ```bash
57
+ docker compose up -d # Default public-only deployment
58
+ ```
59
+
60
+ For detailed deployment options, see <https://computing.docs.ligo.org/gwdatafind/server/deploy/examples/>.
@@ -0,0 +1,21 @@
1
+ # GWDataFind Server
2
+
3
+ This module defines a Flask Application that serves data URLs from one or more data sources.
4
+
5
+ For full documentation, see <https://computing.docs.ligo.org/gwdatafind/server/>.
6
+
7
+ ## Quick Start with Docker
8
+
9
+ For containerized deployments, see the deployment examples:
10
+
11
+ - **Default**: Public data only (simple setup)
12
+ - **[examples/diskcache/](examples/diskcache/)**: Local filesystem + public data
13
+ - **[examples/private-data/](examples/private-data/)**: Private IGWN data with SciTokens
14
+
15
+ Quick start:
16
+
17
+ ```bash
18
+ docker compose up -d # Default public-only deployment
19
+ ```
20
+
21
+ For detailed deployment options, see <https://computing.docs.ligo.org/gwdatafind/server/deploy/examples/>.
@@ -0,0 +1,60 @@
1
+ # Copyright (c) 2025 Cardiff University
2
+ #
3
+ # Public-data only example Docker Compose file for gwdatafind-server.
4
+ #
5
+
6
+ services:
7
+ gwdatafind:
8
+ container_name: gwdatafind-server-gwosc
9
+ image: containers.ligo.org/computing/gwdatafind/server:latest
10
+ ports:
11
+ - "8080:8080"
12
+ restart: unless-stopped
13
+
14
+ # Security hardening
15
+ user: "gwdatafind:gwdatafind"
16
+ read_only: true # Read-only filesystem
17
+ security_opt:
18
+ - no-new-privileges:true
19
+ cap_drop:
20
+ - ALL
21
+
22
+ # Volumes
23
+ volumes:
24
+ - type: bind
25
+ source: gwdatafind-server.toml
26
+ target: /etc/gwdatafind/gwdatafind-server.toml
27
+ read_only: true
28
+ tmpfs:
29
+ - /tmp:noexec,nosuid,size=100m
30
+ - /var/tmp:noexec,nosuid,size=10m
31
+
32
+ # Environment
33
+ environment:
34
+ - GWDATAFIND_SERVER_CONFIG=/etc/gwdatafind/gwdatafind-server.toml
35
+ - PYTHONUNBUFFERED=1
36
+
37
+ # Resource limits
38
+ deploy:
39
+ resources:
40
+ limits:
41
+ memory: 2G
42
+ cpus: '1.0'
43
+ reservations:
44
+ memory: 1G
45
+ cpus: '0.5'
46
+
47
+ # Health check
48
+ healthcheck:
49
+ test: ["CMD", "curl", "-f", "http://localhost:8080/api/version", "--max-time", "5"]
50
+ interval: 30s
51
+ timeout: 10s
52
+ retries: 3
53
+ start_period: 40s
54
+
55
+ # Logging
56
+ logging:
57
+ driver: "json-file"
58
+ options:
59
+ max-size: "10m"
60
+ max-file: "3"
@@ -0,0 +1,147 @@
1
+ # Copyright (c) 2025 Cardiff University
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+
4
+ """Gunicorn configuration for GWDataFind Server."""
5
+
6
+ import os
7
+ from pathlib import Path
8
+
9
+ # Server socket
10
+ bind = "0.0.0.0:8080"
11
+ backlog = 2048
12
+
13
+ # Worker processes
14
+ workers = 1
15
+ worker_class = "gthread"
16
+ worker_connections = 1000
17
+ threads = 8
18
+ timeout = 30
19
+ keepalive = 2
20
+
21
+ # Restart workers after this many requests, with up to this much jitter
22
+ max_requests = 1000
23
+ max_requests_jitter = 100
24
+
25
+ # Worker recycling
26
+ max_worker_memory = 134217728 # 128MB in bytes
27
+ worker_tmp_dir = "/dev/shm"
28
+
29
+ # Security
30
+ limit_request_line = 4094
31
+ limit_request_fields = 100
32
+ limit_request_field_size = 8190
33
+
34
+ # Application
35
+ preload_app = False
36
+ reload = False
37
+
38
+ # Logging
39
+ accesslog = "/var/log/gwdatafind/access.log"
40
+ errorlog = "/var/log/gwdatafind/error.log"
41
+ loglevel = "info"
42
+ access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(D)s'
43
+
44
+ # Process naming
45
+ proc_name = "gwdatafind-server"
46
+
47
+ # Server mechanics
48
+ daemon = False
49
+ pidfile = "/var/run/gwdatafind/gwdatafind-server.pid"
50
+ user = "gwdatafind"
51
+ group = "gwdatafind"
52
+ tmp_upload_dir = None
53
+
54
+
55
+ # Systemd integration
56
+ def on_starting(server):
57
+ """Log that the server is starting."""
58
+ server.log.info("Starting GWDataFind Server")
59
+
60
+ def on_reload(server):
61
+ """Log that the server is reloading."""
62
+ server.log.debug("Reloading GWDataFind Server")
63
+
64
+ def when_ready(server):
65
+ """Tell Systemd that the service is ready."""
66
+ server.log.info("GWDataFind Server is ready. Listening at: %s", server.address)
67
+
68
+ # Notify systemd that we're ready
69
+ try:
70
+ import systemd.daemon
71
+ except ImportError:
72
+ pass
73
+ else:
74
+ systemd.daemon.notify("READY=1")
75
+ server.log.debug("Notified systemd that server is ready")
76
+
77
+ def on_exit(server):
78
+ """Log that the server is shutting down."""
79
+ server.log.info("Shutting down GWDataFind Server")
80
+
81
+ def worker_int(worker):
82
+ """Log worker interrupt."""
83
+ worker.log.debug("Worker received INT or QUIT signal")
84
+
85
+ def pre_fork(server, worker):
86
+ """Log worker spawn."""
87
+ server.log.debug("Worker spawned (pid: %s)", worker.pid)
88
+
89
+ def post_fork(server, worker):
90
+ """Log worked spawned."""
91
+ server.log.debug("Worker spawned (pid: %s)", worker.pid)
92
+
93
+ def post_worker_init(worker):
94
+ """Log that a worked is ready."""
95
+ worker.log.debug("Worker initialized")
96
+
97
+ def worker_abort(worker):
98
+ """Log that a worker is aborting."""
99
+ worker.log.debug("Worker received SIGABRT signal")
100
+
101
+
102
+ # Environment-specific overrides
103
+ if os.environ.get("GWDATAFIND_SERVER_DEBUG"):
104
+ loglevel = "debug"
105
+ reload = True
106
+ workers = 1
107
+
108
+ if gwdfworkers := os.environ.get("GWDATAFIND_WORKERS"):
109
+ workers = int(gwdfworkers)
110
+
111
+
112
+ # Container/containerized environment specific settings
113
+ def _is_containerized():
114
+ """Check if running in a containerized environment (Docker, Podman, etc)."""
115
+ # Check for container runtime files
116
+ if any(indicator.exists() for indicator in (
117
+ Path("/.dockerenv"), # Docker
118
+ Path("/run/.containerenv"), # Podman
119
+ )):
120
+ return True
121
+
122
+ # Check cgroup for container evidence
123
+ try:
124
+ with open("/proc/1/cgroup") as f:
125
+ cgroup_content = f.read()
126
+ # Look for container-specific cgroup paths
127
+ if any(pattern in cgroup_content for pattern in (
128
+ "docker",
129
+ "containerd",
130
+ "podman",
131
+ "cri-o",
132
+ "kubepods",
133
+ )):
134
+ return True
135
+ except OSError:
136
+ pass
137
+
138
+ # Check if we're PID 1 (common in containers)
139
+ return os.getpid() == 1
140
+
141
+
142
+ if _is_containerized():
143
+ # Running in a container
144
+ accesslog = "-" # Log to stdout
145
+ errorlog = "-" # Log to stderr
146
+ pidfile = None # Don't create pidfile in container
147
+ daemon = False # Never daemonize in container