sofar 1.2.1__py3-none-any.whl → 1.2.2__py3-none-any.whl
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.
- docs/conf.py +40 -10
- sofar/__init__.py +1 -1
- sofar/io.py +2 -2
- {sofar-1.2.1.dist-info → sofar-1.2.2.dist-info}/METADATA +5 -2
- {sofar-1.2.1.dist-info → sofar-1.2.2.dist-info}/RECORD +8 -8
- {sofar-1.2.1.dist-info → sofar-1.2.2.dist-info}/WHEEL +1 -1
- {sofar-1.2.1.dist-info → sofar-1.2.2.dist-info/licenses}/LICENSE +0 -0
- {sofar-1.2.1.dist-info → sofar-1.2.2.dist-info}/top_level.txt +0 -0
docs/conf.py
CHANGED
@@ -10,6 +10,7 @@ import os
|
|
10
10
|
import sys
|
11
11
|
import urllib3
|
12
12
|
import shutil
|
13
|
+
import numpy as np
|
13
14
|
sys.path.insert(0, os.path.abspath('..'))
|
14
15
|
|
15
16
|
import sofar
|
@@ -117,7 +118,8 @@ html_theme_options = {
|
|
117
118
|
"navbar_start": ["navbar-logo"],
|
118
119
|
"navbar_end": ["navbar-icon-links", "theme-switcher"],
|
119
120
|
"navbar_align": "content",
|
120
|
-
"header_links_before_dropdown":
|
121
|
+
"header_links_before_dropdown": None, # will be automatically set later based on headers.rst
|
122
|
+
"header_dropdown_text": "Packages", # Change dropdown name from "More" to "Packages"
|
121
123
|
"icon_links": [
|
122
124
|
{
|
123
125
|
"name": "GitHub",
|
@@ -152,16 +154,44 @@ folders_in = [
|
|
152
154
|
'_static/header.rst',
|
153
155
|
'resources/logos/pyfar_logos_fixed_size_sofar.png',
|
154
156
|
]
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
157
|
+
|
158
|
+
def download_files_from_gallery(link, folders_in):
|
159
|
+
c = urllib3.PoolManager()
|
160
|
+
for file in folders_in:
|
161
|
+
url = link + file
|
162
|
+
filename = file
|
163
|
+
os.makedirs(os.path.dirname(filename), exist_ok=True)
|
164
|
+
with c.request('GET', url, preload_content=False) as res:
|
165
|
+
if res.status == 200:
|
166
|
+
with open(filename, 'wb') as out_file:
|
167
|
+
shutil.copyfileobj(res, out_file)
|
168
|
+
|
169
|
+
download_files_from_gallery(link, folders_in)
|
170
|
+
# if logo does not exist, use pyfar logo
|
171
|
+
if not os.path.exists(html_logo):
|
172
|
+
download_files_from_gallery(
|
173
|
+
link, ['resources/logos/pyfar_logos_fixed_size_pyfar.png'])
|
174
|
+
shutil.copyfile(
|
175
|
+
'resources/logos/pyfar_logos_fixed_size_pyfar.png', html_logo)
|
162
176
|
|
163
177
|
# replace sofar hard link to internal link
|
164
178
|
with open("_static/header.rst", "rt") as fin:
|
165
179
|
with open("header.rst", "wt") as fout:
|
166
|
-
for line in fin
|
167
|
-
|
180
|
+
lines = [line.replace(f'https://{project}.readthedocs.io', project) for line in fin]
|
181
|
+
contains_project = any(project in line for line in lines)
|
182
|
+
|
183
|
+
fout.writelines(lines)
|
184
|
+
|
185
|
+
# add project to the list of projects if not in header
|
186
|
+
if not contains_project:
|
187
|
+
fout.write(f' {project} <{project}>\n')
|
188
|
+
|
189
|
+
# count the number of gallery headings
|
190
|
+
count_gallery_headings = np.sum(
|
191
|
+
['https://pyfar-gallery.readthedocs.io' in line for line in lines])
|
192
|
+
|
193
|
+
|
194
|
+
# set dropdown header after gallery headings
|
195
|
+
html_theme_options['header_links_before_dropdown'] = count_gallery_headings+1
|
196
|
+
|
197
|
+
|
sofar/__init__.py
CHANGED
sofar/io.py
CHANGED
@@ -234,8 +234,8 @@ def write_sofa(filename: str, sofa: sf.Sofa, compression=4):
|
|
234
234
|
The SOFA object that is written to disk
|
235
235
|
compression : int
|
236
236
|
The level of compression with ``0`` being no compression and ``9``
|
237
|
-
being the best compression. The default
|
238
|
-
size
|
237
|
+
being the best compression. The default ``4`` is a tradeoff between
|
238
|
+
file size and the time required for reading and writing the file.
|
239
239
|
|
240
240
|
Notes
|
241
241
|
-----
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: sofar
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.2
|
4
4
|
Summary: Maybe the most complete python package for SOFA files so far.
|
5
5
|
Author-email: The pyfar developers <info@pyfar.org>
|
6
6
|
License: MIT License
|
@@ -43,6 +43,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
43
43
|
Classifier: Programming Language :: Python :: 3.10
|
44
44
|
Classifier: Programming Language :: Python :: 3.11
|
45
45
|
Classifier: Programming Language :: Python :: 3.12
|
46
|
+
Classifier: Programming Language :: Python :: 3.13
|
46
47
|
Requires-Python: >=3.8
|
47
48
|
Description-Content-Type: text/markdown
|
48
49
|
License-File: LICENSE
|
@@ -50,6 +51,7 @@ Requires-Dist: netCDF4
|
|
50
51
|
Requires-Dist: numpy>=1.14.0
|
51
52
|
Requires-Dist: beautifulsoup4
|
52
53
|
Requires-Dist: requests
|
54
|
+
Requires-Dist: packaging
|
53
55
|
Provides-Extra: deploy
|
54
56
|
Requires-Dist: twine; extra == "deploy"
|
55
57
|
Requires-Dist: wheel; extra == "deploy"
|
@@ -72,6 +74,7 @@ Requires-Dist: sphinx-favicon; extra == "docs"
|
|
72
74
|
Requires-Dist: sphinx-reredirects; extra == "docs"
|
73
75
|
Provides-Extra: dev
|
74
76
|
Requires-Dist: sofar[deploy,docs,tests]; extra == "dev"
|
77
|
+
Dynamic: license-file
|
75
78
|
|
76
79
|
<h1 align="center">
|
77
80
|
<img src="https://github.com/pyfar/gallery/raw/main/docs/resources/logos/pyfar_logos_fixed_size_sofar.png" width="300">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
docs/Makefile,sha256=OYY1k1pc-qybE8cc8J65Uumpst0kiq55ct3gjLaWeJU,606
|
2
2
|
docs/api_reference.rst,sha256=s3tvYCr2vktN05sSyIhzt1BNktV13SnfU-Cz4fDmf5o,705
|
3
|
-
docs/conf.py,sha256=
|
3
|
+
docs/conf.py,sha256=8NXa9dBCAD53ThByySo5UGnctcVSQ5BxVzALT5vk0Hs,6463
|
4
4
|
docs/contributing.rst,sha256=h9XHQ0lx_ySKgXQmwqhJQLPD7VElHdyu1ruKfYWvrYA,33
|
5
5
|
docs/history.rst,sha256=6GtKybnFdujxXakMcb0LHcrFsWwqRh8JJ_xhO_Qxqdg,28
|
6
6
|
docs/index.rst,sha256=TNHSWTiFrI_R7vn1E2XM2RTx3YEg8KuSzwAY9ttDdWc,37
|
@@ -11,8 +11,8 @@ docs/resources/conventions.py,sha256=4ewEa-AGBkem-VWbfUbXWMy6UUv3DFu2cGETPo89GCc
|
|
11
11
|
docs/resources/working_with_sofa_HRIR_lateral.png,sha256=VpNNtT52Jsl6ymrY9bs1mbNWyCg9S0Ewi1I0CSHB4aE,42425
|
12
12
|
docs/resources/working_with_sofa_source_horizontal.png,sha256=rKvTCt4j_JtR1JGHPSu1pIySNTAH-PRog0hMOjBQXLM,125698
|
13
13
|
docs/resources/working_with_sofa_source_lateral.png,sha256=H1VhLtBOjJV6m62fN2vrMzoq6NTOYLmLUfIQLHqL49I,140443
|
14
|
-
sofar/__init__.py,sha256=
|
15
|
-
sofar/io.py,sha256=
|
14
|
+
sofar/__init__.py,sha256=jr4Fan5h_ciUGsfMDf-5eP7YzN2R4WX5liRmqkYAsms,688
|
15
|
+
sofar/io.py,sha256=4OHjd4XzgUNKeLGXvxAQK-T7bWR6dNieaxK9loYRhG8,16064
|
16
16
|
sofar/sofa.py,sha256=yIl00ekMthqJPmpiujfM-Hlb4IuqOpcGPQcIRJA8DW0,69887
|
17
17
|
sofar/sofastream.py,sha256=OAHC4nzzR7a4uksUeMawYGMzCNBQQg2gk7PK20Rn6xo,9988
|
18
18
|
sofar/update_conventions.py,sha256=XKylP9n7vRiJUOg4HBZXmDut_MbgNZ9-HZUs52xACtc,18137
|
@@ -89,6 +89,7 @@ sofar/sofa_conventions/rules/deprecations.json,sha256=adYMivYOicwuAUFAsoiDcGHdhr
|
|
89
89
|
sofar/sofa_conventions/rules/rules.json,sha256=45fbAzUczWYSpZZj7A15psx2Rh77xz56eT2CagKrwts,23096
|
90
90
|
sofar/sofa_conventions/rules/unit_aliases.json,sha256=QXgOfpe8bnmUybVhSSj3nIUYw50CAVehh7sdFNPFl0k,212
|
91
91
|
sofar/sofa_conventions/rules/upgrade.json,sha256=0o9sTQELnEUXl_teZLjO1Azx7yqrTHmYzT8_7VB9LtM,6025
|
92
|
+
sofar-1.2.2.dist-info/licenses/LICENSE,sha256=OOdX8H69BDppTN8KCBp8l2_yDbH6sW-YuSEKDgZPuL4,1079
|
92
93
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
93
94
|
tests/conftest.py,sha256=3J_BsyJ-_L5145UY_17pb56AptLZr62QFt-zhzE0OE8,738
|
94
95
|
tests/test_deprecations.py,sha256=mIlI1utzIiisKrerd9gZjxVLy2N5l2Jtg9dpWuJ0o7M,610
|
@@ -98,8 +99,7 @@ tests/test_sofa_upgrade_conventions.py,sha256=bZbatBojTSRkJDFK-VCohkZqvVV7j8cOBC
|
|
98
99
|
tests/test_sofa_verify.py,sha256=D0_mcv5h-4OE198URWWOuFrp4bpqrLWQZ7wOP80PbYI,16074
|
99
100
|
tests/test_sofastream.py,sha256=tdTX6qxaUY3bX5pVcHpJxASuLj2k2aqtL1Qyu7hPc24,3905
|
100
101
|
tests/test_utils.py,sha256=edpDH6AqwlBp3l8hw_4THLN4yhHfp8Ih61pVyIAiAVU,8825
|
101
|
-
sofar-1.2.
|
102
|
-
sofar-1.2.
|
103
|
-
sofar-1.2.
|
104
|
-
sofar-1.2.
|
105
|
-
sofar-1.2.1.dist-info/RECORD,,
|
102
|
+
sofar-1.2.2.dist-info/METADATA,sha256=BKwPTclahxkOABCU_0KGOTHtRrY1ND2ND3OGZzllffk,6531
|
103
|
+
sofar-1.2.2.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
104
|
+
sofar-1.2.2.dist-info/top_level.txt,sha256=5YyQsRMOJOaaykMzffbmmHklMAiAw8g1BWOcLxiN110,17
|
105
|
+
sofar-1.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|