joss-reviews icon indicating copy to clipboard operation
joss-reviews copied to clipboard

[REVIEW]: Pyripherals: A Python Package for Communicating with Peripheral Electronic Devices

Open editorialbot opened this issue 3 years ago • 32 comments
trafficstars

Submitting author: @Ajstros (Abraham Stroschein) Repository: https://github.com/Ajstros/pyripherals Branch with paper.md (empty if default branch): Version: v0.0.2 Editor: @danielskatz Reviewers: @untzag, @askuric Archive: Pending

Status

status

Status badge code:

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

Reviewers and authors:

Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)

Reviewer instructions & questions

@untzag & @askuric, your review will be checklist based. Each of you will have a separate checklist that you should update when carrying out your review. First of all you need to run this command in a separate comment to create the checklist:

@editorialbot generate my checklist

The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @danielskatz know.

Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest

Checklists

📝 Checklist for @askuric

📝 Checklist for @untzag

editorialbot avatar Sep 14 '22 19:09 editorialbot

Hello humans, 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 avatar Sep 14 '22 19:09 editorialbot

Software report:

github.com/AlDanial/cloc v 1.88  T=0.16 s (555.8 files/s, 192120.5 lines/s)
-----------------------------------------------------------------------------------
Language                         files          blank        comment           code
-----------------------------------------------------------------------------------
JavaScript                          14           2405           2473           9223
HTML                                22           2952             66           6383
Python                              27           1008           1647           2916
TeX                                  2             70             14            376
Coq                                  1             40              0            257
reStructuredText                    10            207             88            233
Markdown                             7             81              0            203
YAML                                 2              6             18             31
DOS Batch                            1              8              1             26
TOML                                 1              1              0              9
make                                 1              4              7              9
Verilog-SystemVerilog                1              0              0              4
-----------------------------------------------------------------------------------
SUM:                                89           6782           4314          19670
-----------------------------------------------------------------------------------


gitinspector failed to run statistical information for the repository

editorialbot avatar Sep 14 '22 19:09 editorialbot

Wordcount for paper.md is 1360

editorialbot avatar Sep 14 '22 19:09 editorialbot

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1063/1.5001312 is OK
- 10.1016/j.bpj.2021.11.1391 is OK
- 10.5281/zenodo.777229 is OK
- 10.1080/08940886.2019.1608121 is OK

MISSING DOIs

- 10.1145/2851581.2890266 may be a valid DOI for title: FrontPanel®

INVALID DOIs

- https://doi.org/10.5281/zenodo.3732545 is INVALID because of 'https://doi.org/' prefix

editorialbot avatar Sep 14 '22 19:09 editorialbot

:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:

editorialbot avatar Sep 14 '22 19:09 editorialbot

Note: @askuric will be delayed in starting their review until 25 Sept.

danielskatz avatar Sep 14 '22 19:09 danielskatz

@untzag and @askuric - Thanks for agreeing to review this submission. This is the review thread for the paper. All of our communications will happen here from now on.

As you can see above, you each should use the command @editorialbot generate my checklist to create your review checklist. @editorialbot commands need to be the first thing in a new comment.

As you go over the submission, please check any items that you feel have been satisfied. There are also links to the JOSS reviewer guidelines.

The JOSS review is different from most other journals. Our goal is to work with the authors to help them meet our criteria instead of merely passing judgment on the submission. As such, reviewers are encouraged to submit issues and pull requests on the software repository. When doing so, please mention openjournals/joss-reviews#4762 so that a link is created to this thread (and I can keep an eye on what is happening). Please also feel free to comment and ask questions on this thread. In my experience, it is better to post comments/questions/suggestions as you come across them instead of waiting until you've reviewed the entire package.

We aim for reviews to be completed within about 2-4 weeks. Please let me know if either of you require some more time. We can also use editorialbot (our bot) to set automatic reminders if you know you'll be away for a known period of time.

Please feel free to ping me (@danielskatz) if you have any questions/concerns.

danielskatz avatar Sep 14 '22 19:09 danielskatz

👋 @Ajstros (Abraham Stroschein) - please work on the possibly missing DOI and incorrectly prefixed DOI that editorialbot suggests, but note that the missing one may be incorrect. Please feel free to make changes to your .bib file, then use the command @editorialbot check references to check again, and the command @editorialbot generate pdf when the references are right to make a new PDF. editorialbot commands need to be the first entry in a new comment.

danielskatz avatar Sep 14 '22 19:09 danielskatz

@editorialbot check references

Ajstros avatar Sep 18 '22 00:09 Ajstros

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1063/1.5001312 is OK
- 10.1016/j.bpj.2021.11.1391 is OK
- 10.5281/zenodo.777229 is OK
- 10.5281/zenodo.3732545 is OK
- 10.1080/08940886.2019.1608121 is OK

MISSING DOIs

- 10.1145/2851581.2890266 may be a valid DOI for title: FrontPanel®

INVALID DOIs

- None

editorialbot avatar Sep 18 '22 00:09 editorialbot

@editorialbot generate pdf

Ajstros avatar Sep 18 '22 00:09 Ajstros

:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:

editorialbot avatar Sep 18 '22 00:09 editorialbot

@danielskatz Thank you for the note. The invalid DOI has been fixed, and the suggested missing DOI is incorrect.

Ajstros avatar Sep 18 '22 01:09 Ajstros

👋 @untzag and @askuric - please go ahead and use the command @editorialbot generate my checklist to create your review checklist. @editorialbot commands need to be the first thing in a new comment. Then you can get started on your reviews, and track which criteria you feel are satisfied by the submission and which need discussion with or action from the author

danielskatz avatar Sep 27 '22 12:09 danielskatz

Review checklist for @askuric

Conflict of interest

  • [x] I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • [x] Repository: Is the source code for this software available at the https://github.com/Ajstros/pyripherals?
  • [x] License: Does the repository contain a plain-text LICENSE file with the contents of an OSI approved software license?
  • [x] Contribution and authorship: Has the submitting author (@Ajstros) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?
  • [x] Substantial scholarly effort: Does this submission meet the scope eligibility described in the JOSS guidelines
  • [x] Data sharing: If the paper contains original data, data are accessible to the reviewers. If the paper contains no original data, please check this item.
  • [x] Reproducibility: If the paper contains original results, results are entirely reproducible by reviewers. If the paper contains no original results, please check this item.
  • [x] Human and animal research: If the paper contains original data research on humans subjects or animals, does it comply with JOSS's human participants research policy and/or animal research policy? If the paper contains no such data, please check this item.

Functionality

  • [x] Installation: Does installation proceed as outlined in the documentation?
  • [x] Functionality: Have the functional claims of the software been confirmed?
  • [x] Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • [x] A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • [x] Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • [x] Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • [x] Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • [x] Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • [x] Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • [x] Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • [x] A statement of need: Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work?
  • [x] State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • [x] Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • [x] References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?

askuric avatar Sep 27 '22 13:09 askuric

Review checklist for @untzag

Conflict of interest

  • [x] I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • [x] Repository: Is the source code for this software available at the https://github.com/Ajstros/pyripherals?
  • [x] License: Does the repository contain a plain-text LICENSE file with the contents of an OSI approved software license?
  • [x] Contribution and authorship: Has the submitting author (@Ajstros) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?
  • [x] Substantial scholarly effort: Does this submission meet the scope eligibility described in the JOSS guidelines
  • [x] Data sharing: If the paper contains original data, data are accessible to the reviewers. If the paper contains no original data, please check this item.
  • [x] Reproducibility: If the paper contains original results, results are entirely reproducible by reviewers. If the paper contains no original results, please check this item.
  • [x] Human and animal research: If the paper contains original data research on humans subjects or animals, does it comply with JOSS's human participants research policy and/or animal research policy? If the paper contains no such data, please check this item.

Functionality

  • [x] Installation: Does installation proceed as outlined in the documentation?
  • [x] Functionality: Have the functional claims of the software been confirmed?
  • [x] Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • [x] A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • [x] Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • [x] Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • [x] Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • [x] Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • [x] Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • [x] Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • [x] A statement of need: Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work?
  • [x] State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • [x] Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • [x] References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?

untzag avatar Sep 29 '22 20:09 untzag

@Ajstros you might want to look into formatting details for your paper, some of the lines are escaping the page.

untzag avatar Sep 29 '22 21:09 untzag

@editorialbot generate pdf

Ajstros avatar Oct 01 '22 18:10 Ajstros

:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:

editorialbot avatar Oct 01 '22 18:10 editorialbot

Thanks @untzag, those lines have been fixed now.

Ajstros avatar Oct 01 '22 18:10 Ajstros

Hi everyone, My review of Pyripherals is here:

Pyripherals

Pyripherals is a python pip package facilitating the communication to different FPGA based peripheral devices. It provides an user-friendly abstraction layer to different communication protocols and implements interfaces to many different standard FPGA based data acquisition devices. This all makes Pyripherals an useful tool for setting up an experiments requiring real-time data exchange.

Paper comments

Text:

  • line 12: "yet the Python developments are generally useful to interface to electronic chips containing registers."
    • Maybe a bit too general, as all the electronics chips and microcontrollers contain registers at some level. Maybe you could you be a bit more specific and say that it is for the "communication".
  • line 37: " The Opal Kelly XEM7310 FPGA that we use for communication controllers to demonstrate pyripherals is common in research environments which allows other labs to accelerate their development of FPGA to electronic chip interfaces using pyripherals."
    • Some commas are probably necessary here :D
  • table page 2:
    • It would be maybe good to have a caption and to explain each one of the table entries to the reader, as not everyone will be able to understand those. And maybe refer how the name 'ABC012' corresponds to the table entries, if it does. If it doesn't, maybe it would be a good idea to use a more descriptive name that 'ABC012', like 'MyPeripheral' or something like that.
  • line 69: "The line below shows an example that defines an endpoint named “WRITE_IN” that belongs to peripheral “ABC012” with an address of 0x04 and a bit_width of 32 that adds 7 to the address every time it is advanced."
    • I would suggest to add a sentence or two before this line (or after the line 65) to explain what the endpoint actually is and how it is defined. It would probably be easier to understand each of the parameters than learning it directly from the example.
    • I'd also suggest to change the name of the endpoint to something more descriptive, "WRITE_IN" an input I imagine, but an input of the FPGA or the PC?
    • Also, maybe it would be a good idea to mention that the 8'h means 8 bit hex number for the sake of clarity, even though it is described in the documentation.
  • line 86: "Using the Endpoint class in pyripherals with a definitions file extends the capabilities of the Opal Kelly FrontPanel API by automatically linking the Python and Verilog endpoint data.
    • Few commas missing, maybe also repharse it to be more clear.
  • Something to consider
    • Maybe it would be a good idea to add a paragraph at the begging of the Summary section explaining in broad terms the functioanllity of the code and the general stracture. We have a PC, a FPGA and the communication protoclo which has registers and endpoints.
    • Also there you coul add a schematic of the peripheral communication showing a PC, FPGA, the communication and maybe endpoints or registers, I'm not sure how it should look exactly. But a visual could help in understanding better all the components.

Documentation commnets

  • tests:
    • the line py -m pytest -m usable, I am not sure if it's just me by py does not work only with pytest installed. I'd suggest to use python -m pytest -m usable.
    • I've also have one of the tests failing: https://github.com/Ajstros/pyripherals/issues/22
    • You could also look into setting up the testing procedure using github CI (the github actions). That way every github commit would be automatically tested.
  • Community guidelines:
    • You have a very nice guide for contributing the new peripheral.
    • However it might be a good idea to make it more general, if people are motivated to contribute by adding a functionality to the existing code, correcting bugs, improve the code efficiency or any other form of contribution.

Code comments

  • The code is well structured and written, and the unit tests are provided.
  • I was not able to test the functionality of the code as I do not have the hardware necessary.
  • The installation procedure is well documented and I had no trouble installing the package and running simple examples.

askuric avatar Oct 02 '22 08:10 askuric

@Ajstros - can you respond to the comments from @askuric above?

danielskatz avatar Oct 04 '22 14:10 danielskatz

Thanks @untzag, those lines have been fixed now.

@untzag - can you now make further progress on your review? Or is anything blocking you?

danielskatz avatar Oct 04 '22 14:10 danielskatz

Yes, I will work on addressing those comments this week. Thanks for the feedback!

Ajstros avatar Oct 05 '22 00:10 Ajstros

Just waiting for some more time, sorry to be slow! Working on review again now.

untzag avatar Oct 06 '22 14:10 untzag

Similar DAQ systems (Leibrandt & Heidecker, 2015; Yu et al., 2018) create MHz bandwidth servos for physics experiments but these works do not expose the host software.

To me, it's unclear what you mean by "expose" here. I think you mean that their host software is not open source or freely available? I think for me it's down to the word "expose", consider choosing a different word.

untzag avatar Oct 06 '22 15:10 untzag

Quoting from @askuric

Maybe it would be a good idea to add a paragraph at the begging of the Summary section explaining in broad terms the functioanllity of the code and the general stracture. We have a PC, a FPGA and the communication protoclo which has registers and endpoints.

As somebody who is a little bit further away from the FPGA world, I strongly advise you to add some more description here. Your statement of need is motivating---I would LOVE to have microsecond latency real-time feedback in some of the instruments I'm responsible for. Personally I cannot discern the big picture of how pyripherals fits into this system.

Here's my best attempt to describe what we have here. I'm wrong I'm sure, but perhaps my lack of understanding will be illustrative :smile:

  • users create register spreadsheets corresponding to IC internals
  • all ICs are connected to FPGA
  • pyripherals somehow tells the FPGA about which ICs are connected to which buses, and which registers those ICs have
  • does this involve verilog code generation?
  • pyripherals offers a python interface to the ICs where the FPGA somehow acts as a host bus adapter

Presumably the host python <-> FPGA bus is not particularly real-time, so where does my real-time feedback live?

Honestly as I write this out it gets more confusing. Again I'm not in the FPGA world so I'm going to need it spelled out slowly. I think new users of pyripherals might be in a similar place.

untzag avatar Oct 06 '22 15:10 untzag

Quoting again from @askuric

You could also look into setting up the testing procedure using github CI (the github actions). That way every github commit would be automatically tested.

In my opinion this should be blocking for publication. This is a good opportunity to get real CI set up and running.

I understand that many of these code paths aren't possible to run without hardware, but you do have no_fpga tests. Even just showing that the package can be installed and imported with CI is useful for dealing with potential chaos from new contributors.

As long as you're working on CI, consider adding a workflow for publishing to PyPI---that's a great feature for a package that's going to get worked on by multiple people.

untzag avatar Oct 06 '22 16:10 untzag

Pyripherals seems like a great project and it's clearly a powerful tool which has already been used to drive a variety of experiments. I'm thinking I need to buy an OpalKelly FPGA! I recommend publication and congrats on the great work.

I think pyripherals needs one more round of documentation work with an eye towards high-level explanation for outsiders wanting to start from scratch. You've built a system with a lot of moving parts, and it's opaque to me as a reader how those fit together into an experimental control system. I think you can expect a basic understanding of busses, registers, and the concept of a Python API---but readers like me need help with the layers between.

untzag avatar Oct 06 '22 16:10 untzag

@untzag - I'll just point out here that JOSS's criterion on testing does not require automated testing, so while I think that using CI would be great, it shouldn't be a blocker for acceptance.

Again, your suggestions (CI & PyPI) are great and would really benefit the software and the community, but they are not strictly required by JOSS

Quoting again from @askuric

You could also look into setting up the testing procedure using github CI (the github actions). That way every github commit would be automatically tested.

In my opinion this should be blocking for publication. This is a good opportunity to get real CI set up and running.

I understand that many of these code paths aren't possible to run without hardware, but you do have no_fpga tests. Even just showing that the package can be installed and imported with CI is useful for dealing with potential chaos from new contributors.

As long as you're working on CI, consider adding a workflow for publishing to PyPI---that's a great feature for a package that's going to get worked on by multiple people.

danielskatz avatar Oct 07 '22 16:10 danielskatz