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

[PRE REVIEW]: SwiftVISA: Controlling Instrumentation with a Swift-based Implementation of the VISA Communication Protocol #4257

Closed
editorialbot opened this issue Mar 19, 2022 · 58 comments
Assignees
Labels

Comments

@editorialbot
Copy link
Collaborator

editorialbot commented Mar 19, 2022

Submitting author: @OHildreth (Owen Hildreth)
Repository: https://github.com/SwiftVISA/SwiftVISASwift.git
Branch with paper.md (empty if default branch):
Version: 1.0.0
Editor: @dhhagan
Reviewers: @MatthieuDartiailh
Managing EiC: Kristen Thyng

Status

status

Status badge code:

HTML: <a href="https://joss.theoj.org/papers/2c7d5cc7cbf2d71652aecba6f34ee790"><img src="https://joss.theoj.org/papers/2c7d5cc7cbf2d71652aecba6f34ee790/status.svg"></a>
Markdown: [![status](https://joss.theoj.org/papers/2c7d5cc7cbf2d71652aecba6f34ee790/status.svg)](https://joss.theoj.org/papers/2c7d5cc7cbf2d71652aecba6f34ee790)

Author instructions

Thanks for submitting your paper to JOSS @OHildreth. Currently, there isn't an JOSS editor assigned to your paper.

@OHildreth if you have any suggestions for potential reviewers then please mention them here in this thread (without tagging them with an @). In addition, this list of people have already agreed to review for JOSS and may be suitable for this submission (please start at the bottom of the list).

Editor instructions

The JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:

@editorialbot commands
@editorialbot
Copy link
Collaborator Author

Hello human, I'm @editorialbot, a robot that can help you with some common editorial tasks.

For a list of things I can do to help you, just type:

@editorialbot commands

For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

Software report:

github.com/AlDanial/cloc v 1.88  T=0.07 s (461.0 files/s, 74866.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JavaScript                       5             19             16           1807
HTML                             6             81              0           1224
CSS                              2             50             59            514
Swift                            7             71            107            365
Markdown                         2             62              0            203
TeX                              1             16              4            126
JSON                             2              0              0             62
XML                              3              0              0             35
SVG                              1              0              0             28
YAML                             1              1              4             18
-------------------------------------------------------------------------------
SUM:                            30            300            190           4382
-------------------------------------------------------------------------------


gitinspector failed to run statistical information for the repository

@editorialbot
Copy link
Collaborator Author

Wordcount for paper.md is 1542

@editorialbot
Copy link
Collaborator Author

Failed to discover a valid open source license

@editorialbot
Copy link
Collaborator Author

@kthyng
Copy link

kthyng commented Mar 19, 2022

Hi @OHildreth and thanks for your submission. I see your note saying the submission is spread across 8 repositories... can you list them here, or are they already listed somewhere?

@kthyng
Copy link

kthyng commented Mar 19, 2022

Also can you take a look at the error in your paper compilation?

@danielskatz
Copy link

To check the compilation error, you can click on the error link above. In general, please follow the example paper. You can use the command @editorialbot generate pdf after making changes to the .md file to make a new PDF. editorialbot commands need to be the first entry in a new comment.

@danielskatz
Copy link

The error says "found a tab character that violate indentation while scanning a plain scalar at line 23 column 11 (Psych::SyntaxError)"

@OHildreth
Copy link

Hi @kthyng,

The repositories are in the SwiftVISA Organization page and are listed here:
https://github.com/orgs/SwiftVISA/repositories

  • SwiftVISASwift
  • CoreSwiftVISA
  • SwiftVISAMessenger
  • NISwiftVISA
  • NISwiftVISAMessenger
  • CVISATypes
  • SwiftVISA
  • NISwiftVISAService

We have made multiple repositories to separate code responsibilities and capabilities. The original SwiftVISA wrapper only works on macOS 11.15 and lower. To overcome this issue, we made a number of smaller Packages and Services that would allow users to control VISA compatible instruments on iOS, padOS, and macOS along with macOS up to 12.3.

@OHildreth
Copy link

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

@OHildreth
Copy link

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@OHildreth
Copy link

@danielskatz

Thanks for finding the error. It compiled when I checked everything earlier, but I certainly wouldn't not have figured out what the error was without your help.

Thanks,
Owen

@danielskatz
Copy link

👋 @gkthiruvathukal - Would you be able to edit this submission?

@danielskatz
Copy link

@editorialbot invite @gkthiruvathukal as editor

@editorialbot
Copy link
Collaborator Author

Invitation to edit this submission sent!

@gkthiruvathukal
Copy link

@editorialbot commands

@editorialbot
Copy link
Collaborator Author

Hello @gkthiruvathukal, here are the things you can ask me to do:


# List all available commands
@editorialbot commands

# Add to this issue's reviewers list
@editorialbot add @username as reviewer

# Remove from this issue's reviewers list
@editorialbot remove @username from reviewers

# Get a list of all editors's GitHub handles
@editorialbot list editors

# Assign a user as the editor of this submission
@editorialbot assign @username as editor

# Remove the editor assigned to this submission
@editorialbot remove editor

# Remind an author or reviewer to return to a review after a 
# certain period of time (supported units days and weeks)
@editorialbot remind @reviewer in 2 weeks

# Check the references of the paper for missing DOIs
@editorialbot check references

# Perform checks on the repository
@editorialbot check repository

# Adds a checklist for the reviewer using this command
@editorialbot generate my checklist

# Set a value for version
@editorialbot set v1.0.0 as version

# Set a value for archive
@editorialbot set 10.21105/zenodo.12345 as archive

# Set a value for branch
@editorialbot set joss-paper as branch

# Generates the pdf paper
@editorialbot generate pdf

# Recommends the submission for acceptance
@editorialbot recommend-accept

# Flag submission with questionable scope
@editorialbot query scope

# Get a link to the complete list of reviewers
@editorialbot list reviewers

# Open the review issue
@editorialbot start review

@danielskatz
Copy link

@editorialbot assign me as editor is also a valid command 🙂

@gkthiruvathukal
Copy link

@danielskatz Yes, I was trying to remember the correct incantation. I cannot take this one on right now. I sent you short message on Slack to explain. I will be able to help a bit more starting end of April. Thank you for understanding. (Chairperson life.)

@danielskatz
Copy link

👋 @dhhagan - are you able to edit this submission?

@danielskatz
Copy link

@editorialbot invite @dhhagan as editor

@editorialbot
Copy link
Collaborator Author

Invitation to edit this submission sent!

@dhhagan
Copy link

dhhagan commented Mar 25, 2022

Hey @danielskatz I don't know that I have the right skillset to edit this paper, but I can oversee it if there is no one else better suited.

1 similar comment
@dhhagan
Copy link

dhhagan commented Mar 25, 2022

Hey @danielskatz I don't know that I have the right skillset to edit this paper, but I can oversee it if there is no one else better suited.

@dhhagan
Copy link

dhhagan commented Apr 22, 2022

👋 @innat @xiaohk @jarrah42 do any of you have the time to review this manuscript?

@dhhagan
Copy link

dhhagan commented May 24, 2022

@OHildreth I have been running into trouble finding reviewers with Swift experience both online and offline - do you have any recommended reviewers?

@OHildreth
Copy link

@dhhagan. I don't know anyone approaching automation this way. This is a side-project to address some issues I've had controlling my equipment Most academic-level equipment programming is being done ad-hoc using LabView, which everyone hates. I know some Swift developers that I've taken workshops with that I can recommend. They aren't academics but they are amazing programmers. I also know some people at Los Alamos that are extremely excited about this work because they would love to move away from LabView. I don't know if they would have github accounts since they aren't programmers. I've put their contact information below.

Are you looking for code-review or manuscript review? I've listed a few names that I quickly thought of, but I could probably find more if I knew specifically what you are looking for:

Mikey Ward

Daniel Hooks

  • Group leader at Los Alamos with projects requiring automation
  • dhooks@lanl.gov

@OHildreth
Copy link

@dhhagan, did that help? Do you want more reviewers?

@dhhagan
Copy link

dhhagan commented Jun 29, 2022

@OHildreth thanks! I should have an answer for you shortly. (sorry about the delay...)

@OHildreth
Copy link

@dhhagan Thanks for the update. I was thinking, we could look at the people committing to the pyVISA project: https://github.com/pyvisa/pyvisa/graphs/contributors. They might have relevant experience for our SwiftVISA project.

@dhhagan
Copy link

dhhagan commented Jul 5, 2022

👋 @hgrecco @MatthieuDartiailh would either of you be able/willing to review this manuscript for JOSS?

@MatthieuDartiailh
Copy link

I can try to give this a look though I am familiar with Swift.

I am not familiar with JOSS review process either. Where can I find the pdf and under which format should submit my review ?

@kyleniemeyer
Copy link

@MatthieuDartiailh JOSS reviews are a bit different than traditional academic journals: the reviews are checklist driven and take place openly in a GitHub issue like this one (this specific issue is just for getting the review process ready though).

The paper PDF is linked above in a prior comment, copied here for convenience:

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

but you can always get the latest version with the command @editorialbot generate pdf in a comment.

The software package itself is located at https://github.com/SwiftVISA/SwiftVISASwift.git

@MatthieuDartiailh
Copy link

Thanks for the explanation. I will start looking at the paper and the code but may not be able to test the code (I do not own a Mac and I do not have access to a linux VM at the moment). What will be the next steps and timeline ?

@MatthieuDartiailh
Copy link

Currently my main issue with the paper is the claim: SwiftVISASwift uses CoreSwiftVISA types and protocols and implements communication over TCI/IP instruments. This claim is overly broad since as far as I can tell this is limited to TCPIP:SOCKET resources and no support is offered for instruments relying on the VXI-11 protocol or the more recent hislip protocol.

@OHildreth
Copy link

@MatthieuDartiailh
I must not have worded things as clearly as I thought in the manuscript. I'm happy to fix that. The project is divided into multiple Repositories and evolutions. The original one, SwiftVISA, wraps National Instruments pre-compiled VISA framework and has most of the functionality that pyVISA does (USB, TCI/IP, etc.).

Using the original SwiftVISA requires both installing the VISA framework and recompiling SwiftVISA as you change Swift version. Additionally, it acts as a Framework, which is more work to use than a Swift Package. To address the Framework vs. Swift Package issue, we developed the NISwiftVISA along with the NISwiftVISAService. This still uses the underlying VISA framework, but has an intermediary NISwiftVISAService that handles communicating to the devices. Because it is still relying on the VISA framework, it handles communicating with all the main VISA instrument types (USB, TCI/IP, etc.).

NISwiftVISA solved the Package issue, but it had some MAJOR limitations starting with macOS Monterey. Specifically, the VISA framework not longer works under Monterey because Apple effectively blocked kernel extensions. If there are work arounds, National Instruments hasn't implemented them yet. That is why we wrote SwiftVISASwift. This latest iteration is a pure Swift Implementation. It doesn't rely on the VISA framework and is imported into your project as a Swift Package. The reason it is limited to TCI/IP is because 1) Apple's new USB driver system was very poorly documented and 2) the DriverKit entitlement was specific to vendors. Since we weren't Keysight, we couldn't request a DriverKit entitlement to Keysight devices. For the time, we settled for implementing the TCI/IP protocol. This hasn't hindered us or our calibrators since almost every instrument we had in the lab (10+) had an ethernet port. The few that didn't (mass flow controllers, furnaces) also didn't have USB ports either, so we used an Arudino as a communication bridge.

To address the USB limitation, we are considering using the recently released ORSSerialPort Package (previously a framework). That is still under debate because ORSSerialPort is limited to macOS and we are trying to make SwiftVISASwift work with iOS and padOS operating systems.

I haven't seen the HiSLIP protocol before, but it is something we can look into for the future. Overall, this has been a big project stretching over 4 years for us mainly done by one student, Connor Barnes. Reimplementing VISA is a big project and we've tried to provide multiple solutions based upon the needs of the user (HiSLIP for example would likely work with SwiftVISA), easy of use (NiSwiftVISA as a package instead of a framework), and preparing for the future (SwiftVISASwift).

Overall, I was hoping that this publication would help bring some attention to the project and help get more collaborators to expand it (for example, someone that needs HiSLIP might be able to help implement it). I recently had some people from Los Alamos out and they were extremely excited about the work, we are currently working on writing an NSF REU to train CS students to write instrumentation software during the year at the University and then do a summer internship at a National Lab to help them update their instrumentation control software using some implementation of SwiftVISA (depending on the equipment and requirements).

I hope this helps and I'm more than happy to expand the manuscript to make things clearer. The journal guidelines said to keep the manuscript short and let the repository document the code and intent. So maybe I was too short in my discussions.

@MatthieuDartiailh
Copy link

Sorry if I gave the impression your paper was unclear. It is not so and I did follow the split between the different packages. Since this is only a pre-review and I don't think the actual issue to do the review was opened I just decided to share the one thing that bothered me and did not expand on the overall quality of the paper.

To make my point clearer, the VISA specification (https://www.ivifoundation.org/downloads/Architecture%20Specifications/vpp43_2022-05-19.pdf) makes a distinction between two kind of resource classes that can be used over TCPIP.

  • One is the INSTR resource class. This resource class is not specific to the TCPIP bus and rely on either the VXI-11 protocol (most common case) or the hislip protocol. Typically this resource class does not require a port and its address string is typically of the form TCPIP::192.168.0.10::INSTR. The INSTR resource class is expected to support events (even though pyvisa-py does not support them). As far as I understand you do not support this resource class.
  • the other is specific to the TCPIP bus and is the SOCKET resource class. The socket resource does not support any of the advanced mode of VISA (events, status byte reading through non text messages, etc) and is easy to use outside VISA since it does not rely on a specific protocol and any socket in any programming language can be used for communication.

What would make your paper more "correct" in a sense is to explicitly say that SwiftVISASwift only support TCPIP::SOCKET resources and that support for TCPIP::INSTR and USB::INSTR may be added in the future/is planned (whatever wording agrees the best with your actual plans).

@OHildreth
Copy link

@MatthieuDartiailh Thanks for the comment. That is a great point and easy to address in the manuscript with your suggestion. We currently only support TCIP::SOCKET as you pointed out and that the ::INSTR is planned for the future. The ::SOCKET was an easy test case to start with.

@OHildreth
Copy link

@MatthieuDartiailh I've updated the manuscript with a section listing known limitations (such as the TCIP:SOCKET you listed above) and future work. I also provided some examples of the actor branch of SwiftVISASwift that shows how to easily access resources asynchronously.

@MatthieuDartiailh
Copy link

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@OHildreth
Copy link

@MatthieuDartiailh @kyleniemeyer
Hi, I was wondering if there is anything I can do or issues I could address to help move the review forward?

Thanks,
Owen

@MatthieuDartiailh
Copy link

I had no chance to look at the latest version but the changes you described addressed my comments. Since this is a pre-review I have no idea what else I can do to help.

@arfon
Copy link
Member

arfon commented Sep 10, 2022

@dhhagan – given that @MatthieuDartiailh has shown their willingness to start the review here (thank you @MatthieuDartiailh!) I think we should move this forward to the main review stage and look for a second reviewer once the submission is under review.

@arfon
Copy link
Member

arfon commented Sep 10, 2022

@editorialbot add @MatthieuDartiailh as reviewer

@editorialbot
Copy link
Collaborator Author

@MatthieuDartiailh added to the reviewers list!

@arfon
Copy link
Member

arfon commented Sep 10, 2022

@editorialbot start review

@editorialbot
Copy link
Collaborator Author

OK, I've started the review over in #4752.

@arfon
Copy link
Member

arfon commented Sep 10, 2022

@MatthieuDartiailh @OHildreth – see you over in #4752 where the actual review will take place.

@editorialbot editorialbot added the Track: 3 (PE) Physics and Engineering label Sep 10, 2022
@jarrah42
Copy link

do you still need me to review this manuscript, or would it be better if I took a look at a different one?

@dhhagan
Copy link

dhhagan commented Sep 13, 2022

Hi @jarrah42 yes, it would be very helpful. Let me add to the review thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants