Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: remove numpy.str usage in MDSplus #2537

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

santorofer
Copy link
Contributor

In MDSplus python/mdsscalar.py, in the String class, resides the only usage of the numpy.str method. This method has been deprecated in numpy versions >= 1.24.

The fix consists in using Python's own str method instead.

@santorofer
Copy link
Contributor Author

santorofer commented Feb 23, 2023

Tests:

BEFORE the fix:

fsantoro at mfews-fsantoro in ~ 
$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import MDSplus
>>> MDSplus.String('a string')
/usr/local/mdsplus/python/MDSplus/mdsscalar.py:422: FutureWarning: In the future `np.str` will be defined as the corresponding NumPy scalar.  (This may have returned Python scalars in past versions.
  if not isinstance(self._value, _N.str):
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/mdsplus/python/MDSplus/mdsscalar.py", line 422, in __init__
    if not isinstance(self._value, _N.str):
  File "/home/fsantoro/.local/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'str'
>>> 

AFTER the fix:

fsantoro at mfews-fsantoro in ~ 
$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import MDSplus
>>> MDSplus.String('a string')
'a string'
>>> 

@joshStillerman joshStillerman merged commit 6f906d0 into MDSplus:alpha Feb 24, 2023
WhoBrokeTheBuild added a commit that referenced this pull request Mar 21, 2024
* Fix: mdstcpip memory issue with jscope (#2318)

* Fix: mdstcpip memory issue with jscope

* given that jscope seems to be the only client that sets SupportsCompression flag but does not support Desc responce disable it

* Fix: add PULSE to phases (same as PON) (#2316)

Co-authored-by: Timo Schroeder <cloud@ipp.mpg.de>

* Gm marte2 updates (#2324)

* Fix:improve error messages

* Some minor fixes

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Fix: Compare ctx.value instead of ctx, fixes #2325 (#2326)

* Compare ctx.value instead of ctx, fixes #2325

When instance of active tree is created (i.e. Tree()), comparing ctx
of node and tree result in node seeming to be from another tree

* Update tree.py

Consistently fix python ctypes.c_void_p compare

Co-authored-by: Timo Schroeder <zack-vii@users.noreply.github.com>

* Fix: explicitly setting the WRTD_TICKNS from tree node value (#2323)

* Fix: explicitly setting the WRTD_TICKNS from tree node value

* Modify some node options

* Clean the node entries for better readability

* Fix: Add vaildation of sample rate frequencies for SC devices (#2328)

* Feature: jDevices setup form for WRTD (#2315)

* Feature: New Java form for a WRTD device setup

* Improving the GUI options

* Add better names to fields in GUI

* Add new setting (TICKNS)

* Add back TIGA PG site N message ID GUI

* Change RX/TX tab name

* Add labels explaining each of the parameters

* Replace device labes with awt labes

* Fix some node sources in the java code of the GUI

* Add TICKNS selection and general improvements

* Improve label for tick ns

* Redesigned tabs

* Increase of input field sizes

* Improve some text readability

* Rewrote label

* Fix: removed extra free method in PutRecordRemote (#2331)

* missing STATUS_OK in MdsIpGetDescriptor

* fix: removed extra free method in PutRecordRemote

* cleanup: Rename ans to xd

* added MDSIP_MAX_VERSION env option to limit client version for debugging and testing

* external functions should have a prefix

* Fixed: RemoteAccess: connection cleanup

* take more care about file descriptors, keep remote connection open by keeping one link open

* tditest: test remote versions and tree cleanup

Co-authored-by: Keith Erickson <kerickso@pppl.gov>

* Feature: Add extern entrypoint CamXlateLogicalname (#2321)

A user wants to call xlate_logicalname in camshr.  New entrypoint
added to expose this routine.

Closes issue:
#2319

* Fix: change wait mode from 'Default' to 'Busy' (#2336)

Default Wait mode does not seem to work in all circumstances.  this
commit changes it to 'Busy' wait instead.

Also: Encode strings for Python3 compatability.

* Fix:change incorrect jScope property file (#2346)

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Feature: New TDI python function that query Influxdb data from an MDSplus node (#2348)

* Feature: New TDI python fun to read data from Influxdb from an MDSplus tree

* Only use getTimeContext. Query was improved to be more general

* Add small comment

* Read credentials from file

* Change input order. Add address and credentials

* Address and credentials input as MDSplus tree nodes

* Add small comment

* Consolidate WHERE and time start and end tiime

* Refactor code

* Several changes to input parameters and variable names

* Fix to the 435st class so that the trig_time node is correctly populated with the star time of the shot

* Add file in kernel packaging list

* Fix: remove #pragma once from the code (#2349)

User reported that #pragma once, which is a nonstandard feature
is not supported by their compiler.  As it is 'nonstandard' it
seemed sensible to revert to #ifndef _FILENAME_EXT  instead

* Build: el7 has no python-numpy (#2338)

* Fix: TreeShr cleanup connections only at key locations of the code (#2353)

* Fix: TreeShr added TreeCleanupConnections and cleanup only at key location inthe code

* Build: avoid warning by using definition for unique size

* Fx: ReuseCheck takes length argument which should match HOST_UNIQUE_SIZE

* Fix:changed decompile() no more supported to toString() (#2351)

Co-authored-by: mdsplus <mdsplus@scdevail.rfx.local>

* Fix: Get clock plan and calculate the correct nanosec per ticks for the ACQ2106 WRTD TICKNS. (#2355)

* Fix: Set the WRTD_TICKNS from loaded clock plan

* Fix the value of the 5M12 frequency

* Improve some comments

* Improve error handling

* Remove 2 unused nodes

* Remove un-necessary check logic and use sync_role query to check plan

* Remove a small bug when building the plan string

* Fix: Influxdb signal with delta step (#2356)

* Refactor code to include Influx aggregation parameter to deal with setTimeContext() delta step

* Add debug statements

* Add comment remove TODO

* Add changes to 435st and 423st so that the start time is recorded at the beginning

* Build: get git revision during bootstrap and generate m4/ax_git_revision.m4

* Build: fixed chmod of deploy/git_revision.sh

* Fix: we have fixed branch name length; use it; cleanup mdsversion.h

* Build: clang-format

* Build: fixed package dependencies

* Build: python use setuptool as default (#2366)

i merge it now so i have time to fix it in case it does not work

* Fix: matlab support for 2021a; removed deprecated stuff (#2365)

* Fix: matlab support for 2021a; removed deprecated stuff

* Build: upodated matlab packages

* Docs:  Fix name of TreeShrHook.py example (#2332)

The distributed TreeHook.py.example is old and would not be called
if put in place.  This new one will work if enabled.

* Build: Add support for nix packaging (flake) (#2361)

* Added flake file for nix support

* Added symlink to unwrapped mdsplus installation.

* Updated readme for nix

* Minor improvements to InfluxHistorian (#2299)

* start time now uses >=
* fVal/iVal/bVal is now discovered at runtime

* Fix: python exceptions, pep, and fixed bytes_list (#2369)

* Fix: mdsmisc GetXYSignalXd() invalid free xd on error (#2373)

* Bug fix for camshr, when hostID > 9 and sg device > 7 (#2367)

* Fix: python setup, setupkw (#2376)

manually tested with and without setuptools,

* Gm tree thread (#2371)

* Updates to support library for National Devices

* Fix:required changes for trees in threads

These changes are required aftera MDSplus update that requests reopening a tree for every created thread

* New and updated devices

* Update rpm

* Fix wrong nid

* Fix wrong nid

* Python3 compatibility

* Ermove commented

* e Please enter the commit message for ynund comments r changes. Lines starting

* type

* Wrong fix

* MARTE2_SUPERVISOR improvements

* Further devices

* Updated pkg

* Open tree in every thread

* clang-format

* somee python cleanup

Co-authored-by: mdsplus <mdsplus@mcpsl.nbtf>
Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>
Co-authored-by: cloud <timo.schroeder@ipp.mpg.de>

* Fix: on some systems UIDs are > 16 bits (alternative) (#2379)

* Fix: on some systems UIDs are > 16 bits

On systems using active directory uids can be constructed from
AD SIDs and may have bits in their high word set.  This PR
addresses #2375

If their are bits set in the high word of the UID then do not or in
the group.

When displaying in TCL, if the the low 16 bits of the owner do not
translate to a user, then try to translate all 32 bits to an owner

* Fix: remove grp from tcl and added flag2 bit for 32uid

* Tests: fixed owner to show uid only

Co-authored-by: Josh Stillerman <jas@psfc.mit.edu>

* Build: ac_default_prefix (#2385)

* Fix: check for previous installation (#2386)

* Fix: add list fall-back implementation to support older servers (#2383)

* Fix: add list fall-back implementation to support older servers

MdsIpTunnel is special MdsIpFile, support space ' ' as %20

* Fix: handle Process stream closed

* Fix: fixed/suppressed all warnings

* Build: added possible suppression for existing definite in dlopen

* Fix: check message header before trying to read MSGLEN more bytes

* Fix: drop read and trigger install by env var, default should be by PYTHONPATH (#2388)

* mdsplus-api: improve mdsip, all by String (#2389)

* Fix: substitute stdout with stderr on mdsip -P tunnel (#2390)

* Gm fix cpp ctx (#2394)

* Fix:change incorrect jScope property file

* Fix:handle tree context in different threads

A diffent tree context is now created whenever the the thread owning the tree object has changed

* Fix:tree context in multithreaded applications

This version computes the correct, thread-dependent, context

* Fix error compiler

* Fix compiler error

* Make sure ctx vector is empty

* Windows portability

* Windows compiler issues

* Remove Finalize()

* Fix leaks

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Mitica update (#2402)

* Fix : Asynchronous data segments acquisition fixed.

:

* Fix: Add device reset, nisync_reset, in init operation

* Added devices

* Add3ed MARTe2 devices

* Fix: Added delay of 500ms in the trigger method to ensure the correct synchronization of timing signals.

* Updared interface

* Updated deployment

Co-authored-by: mdsplus <mdsplus@mcpsl.nbtf>
Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Fix broken windows build (#2406)

Switch from lib.exe to dlltool
Move .lib generation from windows_docker_build.sh to Makefile
Add search for dlltool to configure.ac

* Jas add compression methods two (#2407)

* Feature: add NCI attribute compression_method

Use the NCI field spare2 to hold a 1 byte compression_method which
will be used to determine which of the supported (distributed)
compression methods will be used to compress this node.

1 --> 'standard'
2 --> 'gip'

this is a work in progress.
Still need:
  tcl_set_node - keep a stack of error strings since now we have a
                 warning, which will keep going.

  tcl dir/full - display this
  tdi SETNCI and GETNCI
  treeshr (use the compression method)

* 

Use the NCI field spare2 to hold a 1 byte compression_method which
will be used to determine which of the supported (distributed)
compression methods will be used to compress this node.

1 --> 'standard'
2 --> 'gip'

this is a work in progress.
Still need:
  tcl_set_node - keep a stack of error strings since now we have a
                 warning, which will keep going.

  tcl dir/full - display this
  tdi SETNCI and GETNCI
  treeshr (use the compression method)

* Fix: use DESCRIPTOR_CSTRING not DESCRIPTOR macro (#2409)

The DESCRIPTOR macro uses the size of its argument.  Since the code
    is passing a pointer to a string, instead of an array, this is wrong.

* Gm fix marte2 (#2411)

* Fix:change incorrect jScope property file

* Fix:possible deadlock in state machine

Removed Mode=ExpectsReply in generated configuiration file

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Fix: can not get cli_get_value a qualifier twice (#2410)

* Fix: can not get cli_get_value a qualifier twice

Can not and should not anyway ask for the value of the same
qualifier more than one time.

This change gets the compression method, if specified, outside of
the node loop.

* Fix: fix misspelled exception names (#2400)

* Fix: fix misspelled exception names

closes: #2395

* Gm fix treenode (#2414)

* Fix:change incorrect jScope property file

* Fix:wrong management of nid data un getXXX() methods

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Gm fix resample (#2415)

* Fix:change incorrect jScope property file

* Fix:wrong management of nid data un getXXX() methods

* Fix:reset time context in resampling in order to get the current timebase

This is required in case the dimension expressions refers to other segmented nodes. In this case resampling must be avoided.

* Copy XTreeshr arguments

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Fix: can not get/set current shot over thick (#2418)

The code to access the current shot id for thick client was checking
that the connection ID > 0.  0 is a valid (1st) connection ID>

test failed due to an unrelated warning in helgrind

* Fix: Inconsistent behavior for empty records (#2401) (#2408)

* For mdsip, accept 0 as dimension when data length is also 0
* For Tdi1GetNci, do not throw error for RECORDs with empty values

* Feature: New Acq2106 423ELF transient device (#2241)

* Feature: Add transient capture for 2106 423ELF

* Remove calibration comment

* Add Debian and Redhat entries for deplay packaging

* Change INIT parameter name

* Change if statement logic for the init() parameter

* Remove double calls to acq400_hapi

* Fix transient init() input parameter

* Add to store a call to getUUT()

* Add extra comment. Arm from INIT

* #2419: fixed monitor queue (#2420)

* Feature: mdsplus-api: trust in jsch when handling config (#2422)

* Reverted PR 2361 changes that added nix support. (#2430)

Co-authored-by: Daniel Austin <daustin@zap.energy>

* Switch Ubuntu18 to use python3-numpy (#2433)

* Fix: move tree copyy to run() in MDSWorker thread (#2425)

* Fix: Setting of Ac2106 435 Signal Conditioning Gains and Offsets in a more efficient way, i.e using PyEpics. (#2432)

* Fix: add new setChanScaleGlobal() to correctly set the global gains and offsets of the signal

* Different approach to setting gains and offsets: no global values

* Remove def_gains and def_offset from parts values

* Change setGainsOffsets to only set when node has a new value

* Improve the change setGainsOffsets to only set when node has a new value

* Add 3 threads for each call to setGainsOffsets() to change the gains and offsets for each card

* Using EPICS calls to set all the gains. Ask for the hostname of the ACQ.

* Bring back the setting of offsets, for consistency

* Improved comment on the EPICS PV variable definitions

* Remove threading when setting each of the sites' gains

* Feature: New acq2106 435ELF transient device (#2240)

* Feature: Add transient capture for 2106 435ELF

* Improve node definition formating

* Add raw input and expression to get the calibrated input

* Add calibrated signal

* Add colibration expression in the input node

* Add Numpy right_shift() to the raw data

* Remove commented out calibration expression section from store

* Add comment on right_shift() usage

* Add deplay packageing for debian and redhat noarch

* Change INIT parameter name and some formatting

* Change if statement logic

* Add second argument to call to init()

* Change resampling parameter value to be False/True value

* Small formatting changes

* Some formatting

* Try to fix a broken rebase. Code is same as alpha mdsplus + the two new changes

* Another small function parameters formatting

* Fix bug on setting the NACC when defaulting to nacc=1

* Reword a warning message

* Fix: Gm fix bagel (#2438)

* Fix:change incorrect jScope property file

* Fix:wrong management of nid data un getXXX() methods

* Fix:correct behavior of downsampling between threads

* Use PickSampleGAM

* Use PickSampleGAM

* Same behavior in subsampling also for GAMs

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Fix: Gm fix bagel (#2440)

* Fix:change incorrect jScope property file

* Fix:wrong management of nid data un getXXX() methods

* Fix:correct behavior of downsampling between threads

* Use PickSampleGAM

* Use PickSampleGAM

* Same behavior in subsampling also for GAMs

* Fix field misalignment

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Gm redp dac (#2443)

* Fix:change incorrect jScope property file

* Fix:wrong management of nid data un getXXX() methods

* Feature:RedPitaya DAC

Added device & support for RedPitaya DAC device

* packages updated

Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>

* Feature: Gm marte2 dtt (#2457)

* Added MARTe2 DTT Devices

* Added Drag&Drop for MARTe2 device fields

* Feature:new MARTe2 devices

Added MARTe2 devices for DTT simulation and UDP communication

* rpm updated

* Feature:add the possibility of passing var args via array in MDSplus:… (#2459)

* Feature:add the possibility of passing var args via array in MDSplus::compileWithArgs and MDSplus::executeWithArgs

* Fix:need to change name of compileWithArgs and executeWithArgs for array args

* Back to original name

* added debian-bullseye (#2460)

* added debian11

* fixed package building script for modern python

Co-authored-by: cloud <cloud@ipp.mpg.de>

* Gm fix mdsip ast (#2462)

* Fix:Wrong shell files

Shell files CompileTree and DecompileTree did not make correct reference to java classes (now in mds.jtraverser package)
On many linux systems xinetd /etc/rc.d/init.d/xinetd  does not exist anymore and service command must be called instead.

* Fix:mdsip event ast

After core re-organization, the information associated with event ast were no long consistent. Connection info is now passed directly in the MdsEventList structure in clace of the connection id that cannot be any longer used since the structures it refers to happen to be deallocated before.

Co-authored-by: mdsplus <mdsplus@ropc1.rfx.local>

* Gm dev ext attr (#2465)

* Fix:Wrong shell files

Shell files CompileTree and DecompileTree did not make correct reference to java classes (now in mds.jtraverser package)
On many linux systems xinetd /etc/rc.d/init.d/xinetd  does not exist anymore and service command must be called instead.

* Feature:extended attribute in devices

Added keyword 'ext_options' in part dictionary definition for device constructor. When keyword present, it will refer to a dictionaly of extended attributes key:value

Co-authored-by: mdsplus <mdsplus@ropc1.rfx.local>

* Fix: MdsShr->LibTimeToVMSTime: Avoid separate calls for current seconds and microseconds (#2467) (#2469)

* Add afixed-length string specifier to the printf for buildtag() (#2475)

There was an error generated if your branch was 12 or more characters. The string would be truncated by git_revision.sh, but it would throw an error about printing a "non-null-terminated string".

* Gm sync redp (#2478)

* Feature:new redpitaya functionality

Added the possibility of synchronizing to a 1 MHz clock that is maintained in sync with the system cklock

* Feature:
 message for your changes. Lines starting

Co-authored-by: AndreaRigoni <andrea.rigoni@igi.cnr.it>

* Add configuration for building on Ubuntu 22.04 (#2485)

* Add configuration for building on Ubuntu 22.04
Fix errors reported by gcc 11

* Add Ubuntu22 to linux.xml

* Gm fix connection (#2489)

* Fix:Wrong shell files

Shell files CompileTree and DecompileTree did not make correct reference to java classes (now in mds.jtraverser package)
On many linux systems xinetd /etc/rc.d/init.d/xinetd  does not exist anymore and service command must be called instead.

* Fix:Connection object

Fixed wrong check of connectionId returned by MdsConnect. It can be zero

Co-authored-by: mdsplus <mdsplus@ropc1.rfx.local>

* Gm wrtd timer (#2491)

* Support for WRTD timer

* Added devices

* Fix: Multiple parameter/qualifier madness in mdsdcl (#2492)

When calling a method with multiple qualifiers, the strange behaviour occurs:

TCL> do /method NODE method /ARGUMENT=1 /ARGUMENT=2 /ARGUMENT=3
doing \TREE::TOP:NODE(DEVICE).method(1,2,1,3,1,2,1)

This was due to an issue in cli_get_value where parameters/qualifiers would get reprocessed

After this, the output is:

TCL> do /method NODE method /ARGUMENT=1 /ARGUMENT=2 /ARGUMENT=3
doing \TREE::TOP:NODE(DEVICE).method(1,2,3)

* Fix:WRTDTimer related devices and dw setup (#2497)

* Fix Python Tree's normal() function to honor the shot supplied (#2499)

Co-authored-by: Josh Stillerman <jas@psfc.mit.edu>

* Gm wrtd driver (#2502)

* Fix:MARTE2_COMPONENT & MARTE2_STREAM

* Fix:DeviceInputs bean

* Fix: Gm wrtd driver (#2504)

* Fix:MARTE2_COMPONENT & MARTE2_STREAM

* Fix:DeviceInputs bean

* Fix DTT MARTe2 Device setup

* Fix MARTe2 DeviceInputs Bean

* Fix wrong segment len for OUT TIME

* Fix:pass missed ronly flag passed to Tree constructor

Co-authored-by: mdsplus <mdsplus@scdevail.rfx.local>

* Use PickSampleGAM when required (#2505)

Co-authored-by: mdsplus <mdsplus@scdevail.rfx.local>

* Fix wrong type in MDSWriter (#2506)

Co-authored-by: mdsplus <mdsplus@scdevail.rfx.local>

* Fix: Add potential fix to Issue #2509 (#2514)

Python 3.8 introduce winmode to CDLL, if not specified it can lead to conflicts with libiconv

* Fix: Error in Python's Tree::__del__ (#2520)

* Fix: APD/EmptyData deserialization (#2518)

* fix: APD/EmptyData deserialization

* Fix: cleaner and faster code by eliminating __getattr__

* Add socket/service files for running per-connection mdsip servers with systemd (#2510)

* Fix: Support thick mixed with local and distributed in a tree path (#2526)

* Fix failure to get/set shot id with :: at end of path

When getting/setting the current shot with a multi-part tree path that ends with ::,
we currently fail to traverse the list of paths.

For example:
```
$ export "cmod_path=/tmp;alcdata-new::"
$ mdstcl show current cmod
Connect failed to host: /tmp;alcdata-new
Failed to get shotid.
```

This commit allows traversal of the list of paths, so this now works:
```
$ export "cmod_path=/tmp;alcdata-new::"
$ mdstcl show current cmod
Current shot is 1170112002
```

If there is a more standard way to traverse the list of paths, I would love to use it.

* Feedback from Josh

* Fix: Bug in PR #2526 (#2533)

Replace exp with experiment_lower in TreeGetCurrentShotId() and TreeSetCurrentShotId().

* Fix:corrected missing copy of isEdit flag in Tree(Tree *) constructor (#2534)

* Fix: remove numpy.str usage in MDSplus (#2537)

* Add context information also to partameter help, units and validation (#2540)

* Major update of NI6683, NI6368EV and fix on CRIO_MPAG devices (#2539)

Co-authored-by: mdsplus <mdsplus@mcpsl-pcf.codac.iter.org>
Co-authored-by: Andrea Rigoni <andrea.rgn@gmail.com>

* Add RHEL9 build, remove xinetd package dependency, bug fixes (#2541)

Add rhel9.opts to use mdsplus/builder:rhel9 (which is based on Rocky Linux 9.1, as CentOS 9 does not exist)
Remove xinetd as a package requirement in linux.xml.
If /etc/xinet.d/ is present, it will still install the config files, but the packages will no longer depend on it. This is because we now have systemd files as an alternative, and RHEL9 has officialy dropped support for it, so this seems like a good time to cut ties.
When installing the `mdsplus-*-kernel` package on a system without xinetd or systemd, the post install script will throw errors trying to copy files. Instead, we wrap them in if statements to only copy the files if those directories exist.
Replace `.getiterator()` with `.iter()` to fix error when using `xml.ElementTree` with python3 in `redhat_build_rpms.py` and `alpine_build_apks.py`
This already seemed to be fixed in `debian_build_debs.py`
Removed seemingly duplicate include for `libdc1394_support*.so` in linux.xml

* Fix: standardizing on pass by reference for exception handling (#2544)

* Fix: standardizing on pass by reference for exception handling

* Went to far removing .what(). In this case it was needed.

* Missed changing two files to pass by reference

* Refactoring per Gabriele's comments.

Undo removal of what() from printf
Undo removal of what() from ostream <<

* Gm fix events (#2543)

* Add context information also to partameter help, units and validation

* Fix:MDS events over mdsip

The management of events over mdsip was broken due to the change in the namagement of static variabled in mdstcip.

* Check for arg null

* Check for return status in connect

* Build: Add issue templates (#2549)

* Add issue templates

* Add University to Affiliation question

* Fix: Tdi SPREAD function does not work on scalars (#2517)

* Fix: Tdi SPREAD function does not work on scalars

The TDI SPREAD and REPLICATE functions were treating the pointer 'pa'
as an array descriptor, while it was copied from a scalar descriptor.

Instead just copy the first sizeof(struct descriptor) bytes, and at
the bottom of Tdi1Trans Build the array descriptor that we want.

* Fix: Same fix for REPLICATE as SPREAD

* Fix: style as per slw

* Fix: Change public SendArg decl match private (#2556)

As per #2404, changed the
public include to match the private one.  MDSplus source code still
compiles without warnings.

* Improved the setting of gains and offsets (#2484)

* Improved setChanScale format, setGainOffsets and added computeGains()

* Fixed setGainOffsets()

* Improved argument names for setChanScale()

* Fixed resampled node call to setChanScale()

* Fixed bug in setGainsOffsets

* Fixed bug in computeGains()

* Modified setChanScale for D-Tacq firmware is v498 or greater

* Imrpoved comment

* Improved comment in setChanScale

* Added a resetting function for the Gains and offsets, in case this is needed to solve Amy's findings

* Reverted changes added to reset gains

* Fixed a bug in setGainOffsets()

* Added posibility that the SC_GAIN node contains a list of G1 and G2, not just G12

* Fixed adding the  posibility that the SC_GAIN node contains a list of G1 and G2, not just G12

* Added error handling for the gain inputs

* Corrected error text

* Removed try/except from setGainsOffsets. Added a float conversion instead.

* In the 423/435 stream devices, dev.copy() was moved back to the main process. (#2477)

* Moved the tree copy (dev.copy()) from the MDSWorker thread back to the main process thread.

* Moved the creation of chans[] and decim[] to MDSWorker thread.

* For 423 devices, dev.copy() has also been moved

* Converted self.chans and self.decim to chans and decim.

* Added static variable NUM_CHANS_PER_SITE

* Corrected the calls to the static variable NUM_CHANS_PER_SITE

* Create a tuple containing an instant of the tree to be used in the MDSWorker thread (instead of using .copy()

* Break tuple into 3 variables

Replace info tuple with tree, shot and path to bring a copy of the tree to the worker thread.

* Fix: PutMany bug (#2566)

* Gm dtacq (#2562)

* New devices&forms for DTACQ devices

* Make Java happy

* Added devices

* Import under try

* Remove print

---------

Co-authored-by: AndreaRigoni <andrea.rigoni@igi.cnr.it>

* Fix: improve an error message for MIT devices (#2565)

* Fix:reversed dimensions in thin client in respect of distributed/local (#2568)

* Fixed check for returned socket (#2567)

* Gm fix java apd (#2569)

* Fix:APD management in Java

Added fixed to both Apd.java and mdsobjects.c

* Fixed Dictionary

* Gm matlab apd (#2573)

* Use APD to map MATLAB (arrays of)structures

* Feature:allow any MATLAB type including recursive (array of) structures be stored and retrieved in MDSplus via APD

Some fixes required as well as MATLAB routine extensions

* Adedd support routines for generic structure storage

* removed debug printf

---------

Co-authored-by: AndreaRigoni <andrea.rigoni@igi.cnr.it>

* Fix: add xrender false to fix rendering on XQuartz (#2564)

* Fix: Replace np.float() with float() (#2574)

Causes error on recent numpy version

* Update influxSignal.py (#2577)

Change the * to a + in the regex replace triggered by deltaTime being set. This was leading to a strange bug (possibly caused by going from python2 to python3) where it would match the entire fieldKey, and then match the empty space at the end of the line. 

So instead of:
`MEAN(fVal)`
it would become:
`MEAN(fVal)MEAN()`

.. which would then make InfluxDB reject our query.

* Gm update devices (#2578)

* Fix:last fixes for DTACQ support

* Forgotten interface

* Fixed EPICS time; Removed deadclock source

* to allowalpha pull

* A few fixes after MDSPlus course for DEMO ADC and Streamed ADC

* Added support for ANY usage

* Added dispatch monitor features

* Support library for camera devices updates

* Device setup updates

* Python devices updates

* Tdi device updates

* Test programs for ELAD front end modules

* New device setup form

* New python devices

* New functions support

* Test Elad front end program

* Fix xmin xmax limit in EvaluationShots method`

* Added RFX devices

* forgotten fix

* make python3 compatible

* Added semicolon to avoit debug messages (#2582)

* Fix: socket returned can now be zero (#2581)

* Fix: socket returned can now be zero

IdlConnectToMds can now return zero as a valid answer.

This is true at least on linux.  It should be tested on
other platforms, the code may need further adjustment.

There is specific conditional code for MacOS.

Please approve this PR so that a linux customer can proceed

* remove debug print

* Fixed error in getMany signature (#2595)

* Fix: issue 2589 -- tostring() deprecated since numpy 1.19.0, replaced with tobytes() (#2591)

* Fix: tostring() deprecated since numpy 1.19.0, replaced with tobytes()

* Fix: issue 2589 changes for rhel7 and ubuntu14

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Fix #2600 remove bad forward ref to MdsGetAnSFN (#2602)

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* MacOS now has working OFD locks (#2603)

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Gm fix connection (#2606)

* Fix:Connection thread safe C++ object

Made now thread safe

* Fix

* Removed comments

* Fix: Use _Exit() instead of exit() from forked process in tunnel_routines->io_disconnect (#2500)

Co-authored-by: Timo Schroeder <zack-vii@users.noreply.github.com>

* Fix: changed tditest/test-mdsip test case so works on macOS (#2610)

The mdsip.hosts file was not being processed correctly
because MDSplus user authentication failed on macOS.

* Fix: minor change to UDT4 protocol for CMake and macOS (#2611)

The UDT4 protocol was failing on macOS Ventura because
the CMake build does not define the OSX environment variable.

* Fix: change ports on test case to avoid conflict on macOS Big Sur (#2612)

On Josh's Intel macOS Big Sur, a test failed because port 7000 was
already being used by ControlCenter.

* Fix: solve socket binding problems causing test cases to fail (#2613)

On Josh's Intel macOS Big Sur, this change was needed to fix
some failing test cases (Java's MDSplus.MdsTreeNodeTest?).

* Build.sh now has a --disable-labview option, plus allows comment lines in deploy/os/*.opts files (#2583)

* Allow comment lines (using hash) in deploy/os/*.opts files.

* Build.sh now has an option to disable LabVIEW

* In build.sh switch to grep

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Info: add comments explaining MDSplus status codes (#2617)

* Info: add comments explaining MDSplus status codes

* Edit comments regarding SsINTERNAL

* Fix:invalid tree context in Data::execute (#2621)

* Fix - on macOS disable iPhone check for LabVIEW (#2624)

* Gm fix devices (#2622)

* Fix:fixed several issues

* Fix:fixed lasr issue

* Fix:fixed another last  issue

* Fix:fixed another last  issue

* Added devices

* Allow APD data be accessed via thin client via Connection.get() (#2620)

* Fix:Connection thread safe C++ object

Made now thread safe

* Fix

* Removed comments

* Feature:allow PAD data be returned by Connection.get

Implemented by retrieving serialized version and deserializing it locally

* Fix: 2625 - start connection IDs at 1 (not zero)  (#2626)

* Proposed fix for Issue 2625

* Proposed change (part 2) for Issue 2625

* Edit a comment for Issue 2625

* Fix: 2625 - Restore do loop for integrity check

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Revert "Fix: 2625 - start connection IDs at 1 (not zero)  (#2626)" (#2627)

This reverts commit 389ed86.

* Fix: 2625 v2 - only change IDL for socket 0 issue (#2628)

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Revert "Fix: 2625 v2 - only change IDL for socket 0 issue (#2628)" (#2630)

This reverts commit 443018e.

* Fix: 2625 v4 -- IDL socket 0 issue and partial revert of PR #2620 (#2635)

* Fix: 2625 - IDL only by replace keyword_set()

* Fix: 2625 - Integrity check when add connection

* Fix: 2625 v4 - update debian packaging for IDL

* Fix: 2625 - correct typo in comment

* Fix: 2625 v4 - mdsdisconnect now correctly passes connection ID to the C library, mdsipshr

* Fix: 2625 v4 - more explanation of why mds_keyword_set() is needed

* Fix: 2625 v4 - revert PR 2620 connection.py change

* Fix: 2625 v4 -- add new IDL file to package for RHEL / Rocky

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Gm rfx devices (#2636)

* Feature:new RFX devices

* Removed obsolete device

* Demo ready for ICALEPCS

* Fix unsupported Use case

* added devices

* import serial in try block

* It broke another thing

* Fix:untested use cases (#2641)

* Fix: Change forking to simple in the systemd mdsip service (#2644)

Type=forking is expecting the parent process to die, which I thought ours was doing but apparently isn't

* Issue 2625 - IDL test harness (#2643)

* Issue 2625 - IDL test harness

* Issue 2625 -- exclude IDL test harness from packaging

* Issue 2625 - correct IDL-2638-loop test, comment failing tests for future bug fixes

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Fix: dir /full segfault (#2647)

* Fix: dir /full segfault #2646

This bug was introduced when alternate compression methods were added
commit 9829bf6

That code allocated the NCI byte `spare2` to hold the index of the
compression method.  It assumed that if it was not filled in it would be
zero.  This turned out not to be the case for some nodes in some trees.

This PR adds a DBI that says wether or not to look at this byte.  The
** the default value of this DBI is ignore the compression method byte. **
To enable alternate compression methods, which have been seldom used
(never?) set the DBI DbiADVANCED_COMPRESSION to true.

- open the tree for edit
- call TreeSetDbi with DbiADVANCED_COMPRESSION set to 1
- write the tree

There will be TCL verbs to set and get this database attribute.

The database characteristics (DBI) have been initialized to zero since
https://github.com/MDSplus/mdsplus/blame/263cc8bce631b291f17ae2c3e09164c55a067b93/treeshr/TreeOpen.c#L659

Example that sets the flag:
```
int main()
{
  int status;
  int length;
  int one = 1;
  DBI_ITM cmp_itm[2];
  const char *tree = "test";
  const int shot = 42;

  cmp_itm[0].buffer_length=1;
  cmp_itm[0].code = DbiADVANCED_COMPRESSION;
  cmp_itm[0].pointer = (void *)&zero;
  cmp_itm[0].return_length_address = &length;
  cmp_itm[1].code = DbiEND_OF_LIST;

  status = TreeOpenEdit(tree, shot);
  if (!(status & 1)) {
    printf("open - status = %d\n", status);
    exit(1);
  }
  status = TreeSetDbi(cmp_itm);
  if (!(status & 1)) {
    printf("SetDBI - status = %d\n", status);
    exit(1);
  }
  status = TreeWriteTree("nb", 196500);
  if (!(status & 1)) {
    printf("Write - status = %d\n", status);
    exit(1);
  }
}
```

---------

Co-authored-by: Stephen Lane-Walsh <slwalsh@psfc.mit.edu>
Co-authored-by: Fernando Santoro <fsantoro@psfc.mit.edu>

* Gm redpitaya (#2653)

* Added RFX_TRIGUART device and support C code

* New RedPitaya with synchronous 1MHz clock

* New RedPitaya with synchronous 1MHz clock

* removed useless file

* New RedPitaya release

* New RedPitaya release

---------

Co-authored-by: AndreaRigoni <andrea.rigoni@igi.cnr.it>

* Added Basler USB cameras support (#2666)

* Build: Initial Jenkinsfile (#2672)

* Initial Jenkinsfile

Add a basic Jenkinsfile that will build and test
Includes fixes for deploy/*.sh scripts that didn't work on the new jenkins

* Add build badge to README, add --rm to platform_build.sh

* Remove docker networks from build.sh

* Build: Add cleanWs() after build to the Jenkinsfile (#2675)

* Fix: tdic uses correct env var and path to launch tcl (#2676)

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Fix: baseline.fun needs ` ` around `..` (#2669)

The baseline.fun function which is called by integrate.fun uses a
range that is not delimited by spaces.  Changes to TdiLex.l and
TdiYacc.y have broken the syntax of `n..m` requiring spaces around
the `..`.

Fixes issue #2667

* Build: Fix build.sh to test the ExitCode from docker (#2677)

After modifying build.sh to be more Ctrl+C friendly, it no longer tests the result of the docker command properly
This will wait for `docker logs` to return, meaning the container has exited, and then it will check the ExitCode property through `docker inspect`.

* Build: Fix test event port, collect and import test results into Jenkins (#2678)

The event port is now computed from OSList.indexOf(OS) instead of $EXECUTOR_NUMBER
Artifacts will now archive regardless of the build result

Add followSymlinks: false to archiveArtifacts
Replace glob.glob with pathlib.Path.glob because it doesn't follow symlinks

* Build: Isolate each build/test in their own network (#2680)

Add --dockernetwork to build.sh
Default to "jenkins-$EXECUTOR_NUMBER-$OS_INDEX"
    e.g. jenkins-3-ubuntu22
Create/Use/Delete the network with docker, if specified

* Gm fix apd (#2661)

* Fix for APD management

* Fix APD arguments (now serialized)

* Fix:Required to handle serialized arguments

* Fix compiler error

* Fix:handle returned code errors, added support for writing APD data

* Remove ` in experssion

* remove `

* $ requires a different handling

* Workaround for Tdi Compiler bugs

* Fix missing parenthesis

* Fix forgotten Dtype definition for List

* Fix:fixed wrong size and shape

* Added cell support for matlabe interface

* Fix string array

* non numeric data support added

* Packages updated

* Make tdi test tab happy

---------

Co-authored-by: AndreaRigoni <andrea.rigoni@igi.cnr.it>

* Add define for DbiTREE_VERSION to alpha (#2682)

* Build: Add IDL tests to the Jenkinsfile (#2679)

* Work on adding the IDL tests to the Jenkinsfile

Refactor idl/testing/run_tests.py to use argparse instead of env variables
Add defaults so we don't have to specify them all in the Jenkinsfile
Leave a stub for adding MATLAB later

* Fix Jenkins truncating JUnit logs

* Add set +x to quiet sourcing setup.sh

* Build: Restructure the Jenkinsfile (#2685)

* Restructure the Jenkinsfile

Remove the dependency on 'camunda-community'
Use a try/finally to collect test results immediately, instead of in the global post {}

* Groovy syntax error

* Add withEnvironment

* Groovy syntax error

* Groovy syntax error

* Build: Begin work on publishing (#2686)

Add the publishing step, which will:

Calculate the new version with get_new_version.py, which replaces commit_type_check.sh
Build a release with that version for each distro with build.sh --release=VERISON
Publish each distro with build.sh --publish=VERSION
Create a github release
All debian and redhat platforms will also generate tgz files for the GitHub release
One tgz for /usr/local/mdsplus, and one for all the debs or rpms

* Build: Treat unprefixed commits as "Fix:" (#2692)

* Build: Give the tgz files absolute paths (#2694)

* Build: Add darren as an Admin so he can build PRs (#2699)

* more parameters for marte2_simulink_generic (#2700)

* Build: Sign packages with Jenkins, upload Windows installers to GitHub (#2701)

Rename `tarfiles/` folder to `packages/`

* Build: Actually publish to the real directory (#2702)

* Fix: corrected typo that caused MdsPut2() to clear all flags (#2703)

* Fix: corrected typo that caused MdsPut2() to clear all flags

* Fix: source formatting re mds_put/2_vargs()

* Fix: more minor soure formatting in mds_put/2_vargs

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Fix: Release versioning was always 1 behind (#2705)

Jenkins now re-runs bootstrap after calculating and tagging the new version
This also moves the --release/--publish=VERSION into a separate parameter called --version=VERSION
This now properly passes the BRANCH/RELEASE_VERSION into bootstrap for us to override the git info

* Fix: Restructure the Jenkinsfile to better support versioning (#2707)

Move the Calculate Version step to the top
Call Bootstrap once with the version (or 0.0.0 for PRs)
Instead of having Test Packaging/Release steps, just have one Release step

* Fix: User provided fix to prevent rare segfault on device deletion (#2706)

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Build: add MATLAB tests (not using mdsip) (#2674)

* First draft of MATLAB tests

* Exclude the MATLAB tests from packaging

* Build: MATLAB tests rewritten using argparse

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Fix: Switch to pyproject.toml and stub setup.py for better pip / setuptools compatibility (#2698)

* Change to pyproject.toml with stub setup.py

* actually this requirest setuptools >= 60.0.0 for the blank setup.py

* add pyproject.toml to dist files

* enable python2.7 and setuptools<60 support

* using slightly cleaner api

* change correspondence email

* Build: configure PYTHONPATH for IDL test harness (#2711)

* Build: configure PYTHONPATH for IDL test harness

* Build:  minor edit to MDSPLUS_DIR for the IDL test

* Build: another syntax correction for MDSPLUS_DIR on IDL tests

* Build: enhance IDL test harness by adding write tests and more read tests (#2656)

* Build: enhanced IDL tests now use argparse

* Build: parameterize the "write" tree for IDL tests

- no longer uses hard coded tree name and shot number
- also changed file permissions on run_tests.py

* Build: use temporary directory for transient files

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Build: parameterize the "write" tree for MATLAB tests (#2712)

* Build: parameterize the "write" tree for MATLAB tests

- no longer uses hard-coded tree name and shot number
- also deleted a comment that was no longer applicable

* Build: MATLAB tests now use a temporary directory

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Fix: mdsip no longer accepts connections from unauthorized users (#2714)

* Fix: Now properly handles SsINTERNAL in AcceptConnection()

* Don't add connection if user is unauthorized

---------

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Revert "Feature: PR #2620 and PR #2661 (#2720)"

* Revert "Gm fix apd (#2661)"

This reverts commit bde7c51.

* Revert "Allow APD data be accessed via thin client via Connection.get() (#2620)"

This reverts commit d996b0c.

* Build: correctly format expected output for a MATLAB test (#2722)

Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>

* Fix: "set current" now works with thick-client (#2723)

- fix is same as PR #2418 for "show current"

* Add 'Release' as a commit prefix (#2727)

Using 'Release' will now use the exact version that commit is tagged with, instead of trying to bump the version based on the other commits
Add comments to get_new_version.py

---------

Co-authored-by: Timo Schroeder <zack-vii@users.noreply.github.com>
Co-authored-by: Timo Schroeder <cloud@ipp.mpg.de>
Co-authored-by: GabrieleManduchi <gabriele.manduchi@igi.cnr.it>
Co-authored-by: GabrieleManduchi <andrea.rgn@gmail.com>
Co-authored-by: Cenk Yildiz <scyildiz@gmail.com>
Co-authored-by: Fernando Santoro <44955673+santorofer@users.noreply.github.com>
Co-authored-by: Keith Erickson <kerickso@pppl.gov>
Co-authored-by: Josh Stillerman <jas@psfc.mit.edu>
Co-authored-by: mdsplus <mdsplus@scdevail.rfx.local>
Co-authored-by: cloud <timo.schroeder@ipp.mpg.de>
Co-authored-by: Daniel Austin <dan@fluffynukeit.com>
Co-authored-by: Kyle Morgan <granolanator@gmail.com>
Co-authored-by: mdsplus <mdsplus@mcpsl.nbtf>
Co-authored-by: Antoine Merle <antoine.merle@epfl.ch>
Co-authored-by: Daniel Austin <daustin@zap.energy>
Co-authored-by: mdsplus <mdsplus@ropc1.rfx.local>
Co-authored-by: AndreaRigoni <andrea.rigoni@igi.cnr.it>
Co-authored-by: mdsplus <mdsplus@mcpsl-pcf.codac.iter.org>
Co-authored-by: mwinkel-dev <122583770+mwinkel-dev@users.noreply.github.com>
Co-authored-by: jdanz-psfc <130538589+jdanz-psfc@users.noreply.github.com>
Co-authored-by: Severin Denk <60154343+AreWeDreaming@users.noreply.github.com>
Co-authored-by: Mark Winkel <mwinkel@psfc.mit.edu>
Co-authored-by: Fernando Santoro <fsantoro@psfc.mit.edu>
Co-authored-by: fmolon <31769662+fmolon@users.noreply.github.com>
Co-authored-by: Darren Garnier <garnier@mit.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

np.str deprecated for numpy >= 1.24.0 - breaks MDSplus python
2 participants