Skip to content

Commit b111828

Browse files
authored
Merge branch 'Open-MSS:develop' into keyring
2 parents db10a04 + 9d3312e commit b111828

File tree

8 files changed

+10
-25
lines changed

8 files changed

+10
-25
lines changed

docs/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ This can be used to run tests on an invisible virtual display by prepending the
226226
$ xvfb-run pytest ...
227227

228228
We have implemented demodata as data base for testing. On first call of pytest a set of demodata becomes stored
229-
in a /tmp/mss* folder. If you have installed gitpython a postfix of the revision head is added.
229+
in a /tmp/mss* folder.
230230

231231

232232
Setup MSWMS server

localbuild/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ requirements:
8686
- flask-login
8787
- pysaml2
8888
- libxmlsec1 # [not win]
89+
- numpy >= 2.0
8990
run_constrained:
9091
- menuinst >=2.0.2
9192

mslib/mscolab/migrations/versions/922e4d9c94e2_to_version_10_0_0.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ def upgrade():
2121
# ### commands auto generated by Alembic - please adjust! ###
2222
with op.batch_alter_table('users', schema=None) as batch_op:
2323
batch_op.add_column(sa.Column('profile_image_path', sa.String(length=255), nullable=True))
24-
24+
op.execute("UPDATE changes SET version_name = NULL WHERE version_name = 'None';")
25+
op.execute("UPDATE changes SET comment = NULL WHERE comment = 'None';")
2526
# ### end Alembic commands ###
2627

2728

2829
def downgrade():
2930
# ### commands auto generated by Alembic - please adjust! ###
3031
with op.batch_alter_table('users', schema=None) as batch_op:
3132
batch_op.drop_column('profile_image_path')
32-
33+
op.execute("UPDATE changes SET version_name = 'None' WHERE version_name IS NULL;")
34+
op.execute("UPDATE changes SET comment = 'None' WHERE comment IS NULL;")
3335
# ### end Alembic commands ###

mslib/msui/mpl_pathinteractor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def insert_vertex(self, index, vertex, code):
111111
matplotlib.Path) at the given index.
112112
"""
113113
self.vertices = np.insert(self.vertices, index,
114-
np.asarray(vertex, np.float_), axis=0)
114+
np.asarray(vertex, np.float64), axis=0)
115115
self.codes = np.insert(self.codes, index, code, axis=0)
116116

117117
def index_of_closest_segment(self, x, y, eps=5):

mslib/mswms/demodata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ def generate_file(self, coordinate, label, leveltype, dimvals, variables):
11611161
newvar.units = unit
11621162
newvar[:] = test_data
11631163
newvar.grid_mapping = 'LatLon_Projection'
1164-
newvar.missing_value = float('nan')
1164+
newvar.missing_value = np.nan
11651165

11661166
ecmwf.close()
11671167

mslib/utils/thermolib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def omega_to_w(omega, p, t):
133133
(32 * units.km, 228.65 * units.K, 868.019 * units.Pa, -0.0028 * units.K / units.m),
134134
(47 * units.km, 270.65 * units.K, 110.906 * units.Pa, 0 * units.K / units.m),
135135
(51 * units.km, 270.65 * units.K, 66.9389 * units.Pa, 0.0028 * units.K / units.m),
136-
(71 * units.km, 214.65 * units.K, 3.95642 * units.Pa, float("NaN") * units.K / units.m)
136+
(71 * units.km, 214.65 * units.K, 3.95642 * units.Pa, np.nan * units.K / units.m)
137137
]
138138
_HEIGHT, _TEMPERATURE, _PRESSURE, _TEMPERATURE_GRADIENT = 0, 1, 2, 3
139139

requirements.d/development.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ pytest-cov
1212
sphinx
1313
sphinx_rtd_theme
1414
sphinxcontrib-video
15-
gitpython
1615
pynco
1716
conda-verify
1817
pytest-reverse

tests/constants.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,13 @@
2828
import os
2929
import fs
3030
import tempfile
31-
import logging
3231
from fs.tempfs import TempFS
3332

34-
try:
35-
import git
36-
except ImportError:
37-
SHA = ""
38-
else:
39-
path = os.path.dirname(os.path.realpath(__file__))
40-
repo = git.Repo(path, search_parent_directories=True)
41-
logging.debug(path)
42-
try:
43-
# this is for local development important to get a fresh named tmpdir
44-
SHA = repo.head.object.hexsha[0:10]
45-
except (ValueError, BrokenPipeError) as ex:
46-
logging.debug("Unknown Problem: %s", ex)
47-
# mounted dir in docker container and owner is not root
48-
SHA = ""
49-
5033
CACHED_CONFIG_FILE = None
5134
SERVER_CONFIG_FILE = "mswms_settings.py"
5235
MSCOLAB_CONFIG_FILE = "mscolab_settings.py"
5336
MSCOLAB_AUTH_FILE = "mscolab_auth.py"
54-
ROOT_FS = TempFS(identifier=f"msui{SHA}")
37+
ROOT_FS = TempFS(identifier="msui")
5538
OSFS_URL = ROOT_FS.geturl("", purpose="fs")
5639

5740
ROOT_DIR = ROOT_FS.getsyspath("")

0 commit comments

Comments
 (0)