Skip to content

Commit 6d7ed16

Browse files
committed
rename all instances of ual tot al
1 parent e2c3b39 commit 6d7ed16

File tree

17 files changed

+96
-96
lines changed

17 files changed

+96
-96
lines changed

containers/arch/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ FROM build AS access_layer
6262
ADD access-layer/ /root/access-layer
6363
COPY --from=data_dictionary /root/data-dictionary/ /root/access-layer/xml/
6464

65-
ENV UAL_VERSION=4.8.5
65+
ENV AL_VERSION=4.8.5
6666
ENV IMAS_UDA=no \
6767
IMAS_HDF5=yes \
6868
IMAS_MATLAB=no \
@@ -72,7 +72,7 @@ ENV IMAS_UDA=no \
7272
ENV CLASSPATH=/usr/java/classes/jTraverser.jar
7373
# 4.8.5 and up
7474
RUN cd /root/access-layer && \
75-
git checkout "$UAL_VERSION" && \
75+
git checkout "$AL_VERSION" && \
7676
make -j`nproc`
7777

7878
FROM access_layer AS python_hli

docs/source/api_overview.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ occurs the conversion can easily be done in multiple steps.
159159
Time slicing
160160
============
161161

162-
The lowlevel API provides `ual_write_slice_data` to write only a slice (in the
163-
last dimension, time) to the backend, as well as `ual_begin_slice_action`. After
162+
The lowlevel API provides `al_write_slice_data` to write only a slice (in the
163+
last dimension, time) to the backend, as well as `al_begin_slice_action`. After
164164
that normal `get()` can be used. We have implemented time slicing support, with
165165
two main entry points on :py:class:`IDSToplevel`:
166166

envs/common/25_build_imas_git.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [ ! -L xml ]; then
3939
ln -s ../data-dictionary/ xml
4040
fi
4141

42-
export UAL_VERSION=`git tag | sort -V | tail -n 1`
42+
export AL_VERSION=`git tag | sort -V | tail -n 1`
4343
export IMAS_UDA=no \
4444
IMAS_HDF5=yes \
4545
IMAS_MATLAB=no \

envs/iter-bamboo/only-pytest-iter-al-git-sdcc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set -xeuf -o pipefail # Set default script debugging flags
2323
# just re-use those componants and steal the exports
2424
export IMAS_VERSION=`git -C data-dictionary tag | sort -V | tail -n 1`
2525
pushd access-layer
26-
export UAL_VERSION=`git tag | sort -V | tail -n 1`
26+
export AL_VERSION=`git tag | sort -V | tail -n 1`
2727

2828
export IMAS_PREFIX=`pwd`
2929
export LIBRARY_PATH=`pwd`/lowlevel:${LIBRARY_PATH:=}

imaspy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
db_entry,
3737
dd_helpers,
3838
dd_zip,
39-
imas_ual_env_parsing,
39+
imas_al_env_parsing,
4040
mdsplus_model,
4141
)
4242

imaspy/al_context.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ class ALContext:
2929
- Context managers for creating and automatically ending AL actions
3030
"""
3131

32-
def __init__(self, ctx: int, ull: ModuleType) -> None:
32+
def __init__(self, ctx: int, ll: ModuleType) -> None:
3333
"""Construct a new ALContext object
3434
3535
Args:
3636
ctx: Context identifier returned by the AL
37-
ull: ``imas._ual_lowlevel`` python module that returned this context
37+
ll: ``imas._al_lowlevel`` python module that returned this context
3838
"""
3939
self.ctx = ctx
40-
self.ull = ull
40+
self.ll = ll
4141

4242
@contextmanager
4343
def global_action(self, path: str, rwmode: int) -> Iterator["ALContext"]:
@@ -50,11 +50,11 @@ def global_action(self, path: str, rwmode: int) -> Iterator["ALContext"]:
5050
Yields:
5151
ctx: The created context.
5252
"""
53-
ctx = self._begin_action(self.ull.ual_begin_global_action, path, rwmode)
53+
ctx = self._begin_action(self.ll.al_begin_global_action, path, rwmode)
5454
try:
5555
yield ctx
5656
finally:
57-
self.ull.ual_end_action(ctx.ctx)
57+
self.ll.al_end_action(ctx.ctx)
5858

5959
@contextmanager
6060
def slice_action(
@@ -79,7 +79,7 @@ def slice_action(
7979
f"{interpolation_method}"
8080
)
8181
ctx = self._begin_action(
82-
self.ull.ual_begin_slice_action,
82+
self.ll.al_begin_slice_action,
8383
path,
8484
rwmode,
8585
time_requested,
@@ -88,7 +88,7 @@ def slice_action(
8888
try:
8989
yield ctx
9090
finally:
91-
self.ull.ual_end_action(ctx.ctx)
91+
self.ll.al_end_action(ctx.ctx)
9292

9393
@contextmanager
9494
def arraystruct_action(
@@ -107,12 +107,12 @@ def arraystruct_action(
107107
size: The size of the array of structures (only relevant when reading data)
108108
"""
109109
ctx, size = self._begin_action(
110-
self.ull.ual_begin_arraystruct_action, path, timebase, size
110+
self.ll.al_begin_arraystruct_action, path, timebase, size
111111
)
112112
try:
113113
yield ctx, size
114114
finally:
115-
self.ull.ual_end_action(ctx.ctx)
115+
self.ll.al_end_action(ctx.ctx)
116116

117117
def _begin_action(
118118
self, action: Callable, *args: Any
@@ -122,32 +122,32 @@ def _begin_action(
122122
if status != 0:
123123
raise RuntimeError(f"Error calling {action.__name__}: {status=}")
124124
if rest:
125-
return ALContext(ctx, self.ull), *rest
126-
return ALContext(ctx, self.ull)
125+
return ALContext(ctx, self.ll), *rest
126+
return ALContext(ctx, self.ll)
127127

128128
def iterate_over_arraystruct(self, step: int) -> None:
129-
"""Call ual_iterate_over_arraystruct with this context."""
130-
status = self.ull.ual_iterate_over_arraystruct(self.ctx, step)
129+
"""Call al_iterate_over_arraystruct with this context."""
130+
status = self.ll.al_iterate_over_arraystruct(self.ctx, step)
131131
if status != 0:
132132
raise RuntimeError(f"Error iterating over arraystruct: {status=}")
133133

134134
def read_data(self, path: str, timebasepath: str, datatype: int, dim: int) -> Any:
135-
"""Call ual_read_data with this context."""
136-
status, data = self.ull.ual_read_data(
135+
"""Call al_read_data with this context."""
136+
status, data = self.ll.al_read_data(
137137
self.ctx, path, timebasepath, datatype, dim
138138
)
139139
if status != 0:
140140
raise RuntimeError(f"Error reading data at {path!r}: {status=}")
141141
return data
142142

143143
def delete_data(self, path: str) -> None:
144-
"""Call ual_delete_data with this context."""
145-
status = self.ull.ual_delete_data(self.ctx, path)
144+
"""Call al_delete_data with this context."""
145+
status = self.ll.al_delete_data(self.ctx, path)
146146
if status != 0:
147147
raise RuntimeError(f"Error deleting data at {path!r}: {status=}")
148148

149149
def write_data(self, path: str, timebasepath: str, data: Any) -> None:
150-
"""Call ual_write_data with this context."""
151-
status = self.ull.ual_write_data(self.ctx, path, timebasepath, data)
150+
"""Call al_write_data with this context."""
151+
status = self.ll.al_write_data(self.ctx, path, timebasepath, data)
152152
if status != 0:
153153
raise RuntimeError(f"Error writing data at {path!r}: {status=}")

imaspy/assets/IDSDef2MDSpreTree.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<xsl:stylesheet xmlns:yaslt="http://www.mod-xslt2.com/ns/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0" extension-element-prefixes="yaslt" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:local="http://www.example.com/functions/local" exclude-result-prefixes="local xs">
33
<xsl:param name="DD_GIT_DESCRIBE" as="xs:string" required="yes"/>
4-
<xsl:param name="UAL_GIT_DESCRIBE" as="xs:string" required="yes"/>
4+
<xsl:param name="AL_GIT_DESCRIBE" as="xs:string" required="yes"/>
55
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
66
<!-- This script transforms the IDSDef.xml file into an XML file which will be used to build the MDS+ tree-->
77
<!-- It contains the full data structure and describes it in terms of MDS+ terminology (node, member) and types (TEXT,NUMERIC,SIGNAL)-->
@@ -25,7 +25,7 @@
2525
<member NAME="REF_INFO" USAGE="NUMERIC"/>
2626
<node NAME="VERSION">
2727
<member NAME="DATA_DICT" USAGE="TEXT"><data>"<xsl:value-of select="$DD_GIT_DESCRIBE"/>"</data></member>
28-
<member NAME="ACC_LAYER" USAGE="TEXT"><data>"<xsl:value-of select="$UAL_GIT_DESCRIBE"/>"</data></member>
28+
<member NAME="ACC_LAYER" USAGE="TEXT"><data>"<xsl:value-of select="$AL_GIT_DESCRIBE"/>"</data></member>
2929
<member NAME="BACK_MAJOR" USAGE="NUMERIC"></member>
3030
<member NAME="BACK_MINOR" USAGE="NUMERIC"></member>
3131
</node>

imaspy/command/subcommands/ids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def open_from_file(file, version=None, xml_path=None):
188188
ids = imaspy.ids_root.IDSRoot(
189189
int(shot), int(run), version=version, xml_path=xml_path,
190190
) # use the latest version by default
191-
ids.open_ual_store(file.parent, tree_name, "3", backend, mode="r")
191+
ids.open_al_store(file.parent, tree_name, "3", backend, mode="r")
192192

193193
# Fake time mode homogeneous so we can actually read the file.
194194
# TODO: work around that!

imaspy/db_entry.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ def __init__(
9393
self.user_name = user_name or os.environ["USER"]
9494
self.data_version = data_version or os.environ.get("IMAS_VERSION", "")
9595
self._db_ctx: Optional[ALContext] = None
96-
# TODO: don't import all of IMAS, only load _ual_lowlevel, see
96+
# TODO: don't import all of IMAS, only load _al_lowlevel, see
9797
# https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
98-
# TODO: allow using a different _ual_lowlevel module? See
99-
# imas_ual_env_parsing.build_UAL_package_name
100-
self._ull = importlib.import_module("imas._ual_lowlevel")
98+
# TODO: allow using a different _al_lowlevel module? See
99+
# imas_al_env_parsing.build_AL_package_name
100+
self._ll = importlib.import_module("imas._al_lowlevel")
101101
self._dd_version = dd_version
102102
self._xml_path = xml_path
103103
self._ids_factory = IDSFactory(dd_version, xml_path)
@@ -112,13 +112,13 @@ def dd_version(self) -> str:
112112
"""Get the DD version used by this DB entry"""
113113
return self._ids_factory.version
114114

115-
def _ual_open_pulse(self, mode: int, options: Any) -> None:
115+
def _al_open_pulse(self, mode: int, options: Any) -> None:
116116
"""Internal method implementing open()/create()."""
117117
if self._db_ctx is not None:
118118
self.close()
119119
if self.backend_id == MDSPLUS_BACKEND:
120120
self._setup_mdsplus()
121-
status, idx = self._ull.ual_begin_pulse_action(
121+
status, idx = self._ll.al_begin_pulse_action(
122122
self.backend_id,
123123
self.shot,
124124
self.run,
@@ -127,9 +127,9 @@ def _ual_open_pulse(self, mode: int, options: Any) -> None:
127127
self.data_version,
128128
)
129129
if status != 0:
130-
raise RuntimeError(f"Error calling ual_begin_pulse_action(), {status=}")
131-
self._db_ctx = ALContext(idx, self._ull)
132-
status = self._ull.ual_open_pulse(self._db_ctx.ctx, mode, options)
130+
raise RuntimeError(f"Error calling al_begin_pulse_action(), {status=}")
131+
self._db_ctx = ALContext(idx, self._ll)
132+
status = self._ll.al_open_pulse(self._db_ctx.ctx, mode, options)
133133
if status != 0:
134134
raise RuntimeError(f"Error opening/creating database entry: {status=}")
135135

@@ -176,11 +176,11 @@ def close(self, *, options=None, erase=False):
176176
return
177177

178178
mode = ERASE_PULSE if erase else CLOSE_PULSE
179-
status = self._ull.ual_close_pulse(self._db_ctx.ctx, mode, options)
179+
status = self._ll.al_close_pulse(self._db_ctx.ctx, mode, options)
180180
if status != 0:
181181
raise RuntimeError(f"Error closing database entry: {status=}")
182182

183-
self._ull.ual_end_action(self._db_ctx.ctx)
183+
self._ll.al_end_action(self._db_ctx.ctx)
184184
self._db_ctx = None
185185

186186
def create(self, *, options=None, force=True) -> None:
@@ -201,7 +201,7 @@ def create(self, *, options=None, force=True) -> None:
201201
imas_entry = imaspy.DBEntry(imaspy.ids_defs.HDF5_BACKEND, "test", 1, 1234)
202202
imas_entry.create()
203203
""" # noqa
204-
self._ual_open_pulse(FORCE_CREATE_PULSE if force else CREATE_PULSE, options)
204+
self._al_open_pulse(FORCE_CREATE_PULSE if force else CREATE_PULSE, options)
205205

206206
def open(self, *, options=None, force=False) -> None:
207207
"""Open an existing database entry.
@@ -218,7 +218,7 @@ def open(self, *, options=None, force=False) -> None:
218218
imas_entry = imaspy.DBEntry(imaspy.ids_defs.HDF5_BACKEND, "test", 1, 1234)
219219
imas_entry.open()
220220
""" # noqa
221-
self._ual_open_pulse(FORCE_OPEN_PULSE if force else OPEN_PULSE, options)
221+
self._al_open_pulse(FORCE_OPEN_PULSE if force else OPEN_PULSE, options)
222222

223223
def get(
224224
self,
@@ -557,7 +557,7 @@ def _get_children(
557557
ndim = element.metadata.ndim
558558
if data_type is IDSDataType.STR:
559559
ndim += 1 # STR_0D is a 1D CHARACTER type...
560-
data = ctx.read_data(new_path, timebase, data_type.ual_type, ndim)
560+
data = ctx.read_data(new_path, timebase, data_type.al_type, ndim)
561561
if data is not None:
562562
element.value = data
563563

imaspy/ids_data_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, value) -> None:
3737
"FLT": EMPTY_FLOAT,
3838
"CPX": EMPTY_COMPLEX,
3939
}.get(value, None)
40-
self.ual_type = {
40+
self.al_type = {
4141
"STR": CHAR_DATA,
4242
"INT": INTEGER_DATA,
4343
"FLT": DOUBLE_DATA,

0 commit comments

Comments
 (0)