Closed editorialbot closed 1 year ago
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
Software report:
github.com/AlDanial/cloc v 1.88 T=0.18 s (938.0 files/s, 75212.4 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Python 90 991 3128 7444
reStructuredText 61 394 190 617
Markdown 5 35 0 115
YAML 3 9 22 102
TeX 1 11 0 84
DOS Batch 1 8 1 26
Bourne Shell 1 0 3 12
make 1 4 7 9
Dockerfile 1 4 5 6
CSS 1 0 0 3
-------------------------------------------------------------------------------
SUM: 165 1456 3356 8418
-------------------------------------------------------------------------------
gitinspector failed to run statistical information for the repository
Wordcount for paper.md
is 1392
Reference check summary (note 'MISSING' DOIs are suggestions that need verification):
OK DOIs
- None
MISSING DOIs
- 10.3139/9783446470460.fm may be a valid DOI for title: Apache Kafka
- 10.5040/9781784602314.00000002 may be a valid DOI for title: pandas
INVALID DOIs
- None
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
Installation for a MAC with Intel chip was checked and proceeded as outlined in the documentation.
@eminizer Could you point me to the simplest example to try this package on my own system(s)?
Hi @lucask07,
Yes! Certainly the simplest program would be "UploadDataFile", which will break a given file into chunks and Produce those chunks as messages to a Kafka topic.
To run that program (or any others), though, you will need access to a Kafka cluster as enumerated in the "external requirements" section of the documentation. It's fairly quick and easy to set up a Kafka cluster to use on Confluent Cloud, though there is a subscription fee to use that service.
If you'd like, for purposes of the review, maybe I could send you the access keys to our group's cluster and you could try passing data through there? Using our cluster would also make it very easy for you to run our CI tests on your own machine once you set the server/username/password as environment variables on your system(s).
Sorry for the trouble; this package is designed to simplify passing streaming data through Kafka, but users generally need to have their own external access to a broker to use. Let me know if you'd like me to send you our access keys through something more secure.
Thanks for your efforts, Maggie
Thanks @eminizer I would like to try an actual test. This would help my understanding of the overall architecture. If there is an easy way for you to allow me to access your cluster I would try passing data through there. However, if this becomes a project in itself let's not bother. My email is koerner dot lucas @ stthomas dot edu.
Thank you, Lucas
A paper comment. An example of a real dataset would be helpful. What are typical file types and sizes? Is there a typical rate at which the data is generated/consumed?
And a related side question: is there a guideline for maximum filesize when using Apache Kafka?
Thank you, @lucask07, and again sorry for the trouble. Some responses in line:
I would like to try an actual test. This would help my understanding of the overall architecture. If there is an easy way for you to allow me to access your cluster I would try passing data through there.
Of course! We would definitely want you to try running the code yourself, that's why we're here : )
I wasn't sure how the review would proceed, but using our cluster would definitely be fastest and easiest. I've just emailed you the information for how to connect to it.
There are a number of topics there for the CI tests (listed here, and the default topic called "test" also exists), but I just created another one called "joss_review" for you to use however you'd like. I set the retention time on that new topic to an hour, so it'll clear itself out regularly, and I otherwise left all the settings at their defaults (6 partitions, ~1MB max message size, etc.). If you would like me to create any other topics for you to use just let me know.
An example of a real dataset would be helpful. What are typical file types and sizes?
Good questions. We've deployed OpenMSIStream in a variety of lab environments, so some examples of the file data we're moving include .csv and .raw data files, bitmap and .tif images, .xml and .txt description files, and even some proprietary file formats for automated backups. These files range in size from about 1.5KB to about 4.5GB. We also move data that don't come originally from files, in the form of JSON-formatted strings of extracted metadata information.
The PARADIM group with whom we work hosts a number of public domain datasets at https://data.paradim.org/ if you would like to use any of those as examples of real-world data. Other than that, though, the software is generally agnostic to the type (and, to a point, size, see below) of files, so you should be able to test with pretty much anything.
Is there a typical rate at which the data is generated/consumed?
Generally upload and download speeds are limited mostly by the network and the read/write speed of the disks on which the filess are stored, so we typically get upload and download rates of 60MB/s or so on wide average. We usually set up a DataFileUploadDirectory on different lab machines to passively wait for new files to be added, so the exact rate of data production/consumption depends on when experiments are performed and new data are saved.
is there a guideline for maximum filesize when using Apache Kafka?
There is (theoretically) no limit to the size of files, because OpenMSIStream breaks files of any size into individual chunks, and each chunk is Produced as a message. Kafka limits the sizes of individual messages to 1MB by default, and OpenMSIStream creates messages of about 16KB each by default, but these are both configurable through Kafka and OpenMSIStream, respectively. When we're moving very large files we use our own on-prem broker where we can set the max message size on the relevant topic to 32MB, and then we configure OpenMSIStream to send messages of 8-17MB each.
In practice, however, there is more latency through both Kafka and OpenMSIStream when using larger message sizes, and reconstructed files are held in memory unless they're being written to disk, so those are both considerations. I think those 4.5GB files I mentioned are starting to push the edge of what is practically feasible on standard hardware.
Let me know if there's any other way I can be helpful, and thank you! Maggie
Hello @eminizer
I have added the Kafka environmental variables and now am moving further with the tests. Progress!
----------------------------------------------------------------------
Ran 49 tests in 175.359s
FAILED (failures=2, errors=4, skipped=4)
Seems that most of the issues are FileExistsError:
FileExistsError: [Errno 17] File exists: '/somepaths/joss/openMSIstream/openmsistream/test/test_reco'
After removing these files the tests advanced further
test_initial_properties (test_upload_data_file.TestUploadDataFile) ... ok
test_upload_whole_file_kafka (test_upload_data_file.TestUploadDataFile) ... ok
======================================================================
FAIL: test_data_file_stream_processor_restart_kafka (test_data_file_stream_processor.TestDataFileStreamProcessor)
Test restarting a DataFileStreamProcessor from the beginning of the topic after failing to process a file
----------------------------------------------------------------------
Traceback (most recent call last):
File "/somepaths/joss/openMSIstream/openmsistream/test/unittests/test_data_file_stream_processor.py", line 132, in test_data_file_stream_processor_restart_kafka
self.assertFalse(TEST_CONST.TEST_STREAM_PROCESSOR_OUTPUT_DIR_RESTART.is_dir())
AssertionError: True is not false
======================================================================
FAIL: test_data_file_stream_processor_restart_encrypted_kafka (test_data_file_stream_processor_encrypted.TestDataFileStreamProcessorEncyrpted)
Test restarting an encrypted DataFileStreamProcessor after failing to process a file
----------------------------------------------------------------------
Traceback (most recent call last):
File "/somepaths/joss/openMSIstream/openmsistream/test/unittests/test_data_file_stream_processor_encrypted.py", line 26, in test_data_file_stream_processor_restart_encrypted_kafka
self.assertFalse(TEST_CONST.TEST_STREAM_PROCESSOR_OUTPUT_DIR_RESTART_ENCRYPTED.is_dir())
AssertionError: True is not false
----------------------------------------------------------------------
Ran 49 tests in 200.716s
FAILED (failures=2, skipped=4)
My tests (on a MAC) were initially throwing an SSL error like:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
I removed this error by adding
CERT_PATH=$(python -m certifi)
export SSL_CERT_FILE=${CERT_PATH}
export REQUESTS_CA_BUNDLE=${CERT_PATH}
to my bash_profile as described at this StackOverflow question.
The paper reads very well. Nice work!
A few boxes I will wait for feedback to check off:
The
State of the field: Do the authors describe how this software compares to other commonly-used packages?
in the paper could use a revisit. The authors mention and cite Bluesky from NSLS but do not note if this fulfills the need. Are there other Python packages that enable streaming of data?
Hopefully, I can get all the tests working as well!
Hi @lucask07,
Thanks for the detailed look!
First, in terms of the tests, I just released a new version on PyPi (v1.1.6) that should prevent the failures you were seeing. If you update your install and try again hopefully you'll have more success this time!
Second, I love your idea of including concrete examples in the repo and documentation. I'll absolutely work on this soon, and I'll link a PR to the issue you opened for it. I'll also do the same for some documentation updates to better explain the usage of the configuration files. These later updates might take a bit longer due to the short week, but I'll get to them as soon as I'm able.
We can also flesh out that section in the paper to provide more context, and I'll also add to the troubleshooting section in the documentation to reflect the solution you found to that SSL verification error.
Thanks again for all of your attention to detail and for your help in improving our body of work : )
Best, Maggie
Great, thanks @eminizer and nice work, all tests pass.
----------------------------------------------------------------------
Ran 49 tests in 339.638s
OK (skipped=4)
All unittest checks complete : )
SKIPPING GIT REPOSITORY CHECKS
All tests passed!
In terms of the paper and documentation edits you are in control of the timeline. Just mention me when there is new material to review.
Hi again @lucask07,
I've just released version 1.2.0 of OpenMSIStream, which includes some extra documentation for how to use configuration files see and a brand new section with detailed tutorials for uploading/downloading files, transferring files to S3 buckets, and making plots and extracting metadata from files on streams. The tutorials are covered by CI tests, as well. Please take a look and let me know what you think! If you'd like to try the tutorials, I've created topics with the appropriate names on our Kafka broker and you should be all good to go with then environment variables you've already set.
The edit to the paper text we will likely put together at the start of next week; we'd like to gather a little more context first.
Thanks as always for your continued help and for the improvements to our work that you've inspired : )
Best, Maggie
Hi @eminizer, The tutorials are very nicely done. Great work! I have checked off the 'Example Usage' box. Unfortunately, with the end of the semester approaching, I won't have time to try these out.
I will check back when the paper edits are posted.
Best, Lucas
@editorialbot generate pdf
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
Hi again @lucask07 ,
I've just merged a PR that updates the last paragraph in the "Statement of Need" section of the paper to elaborate a bit on how OpenMSIStream fits in with other existing open source Python libraries. I gave some examples in the paper, but the overarching idea is that existing packages tend to fall into one of three categories: complete streaming libraries, libraries that "stream" collected data to local or remote files, and libraries that can be used to design and execute "streaming" workflows entirely locally. OpenMSIStream would integrate well with any of them, but it also fills a gap they share by providing a full streaming solution using a remote broker while remaining accessible to lab users and students.
Complete streaming libraries (like Bytewax, or the confluent_kafka wrapper itself on which OpenMSIStream is built) are very low-level and require direct interaction with the underlying streaming infrastructure, whereas OpenMSIStream is higher level and abstracts away the details of its underlying streaming solution to remain more accessible to lab users. OpenMSIStream provides a way for lab students and scientists to very easily convert analysis scripts or metadata extractors that run on local or remote files into running on files moving through streams as groups of arbitrarily-sized messages.
The Bluesky collection framework doesn't actually yet implement a full streaming solution with a remote broker (as erroneously stated in the original draft of our paper), but rather it can update local and remote files as data are collected. OpenMSIStream publishes data to/reads data from the central Kafka broker.
Streamz and other "local-only" streaming solutions are great for automating local workflows on single machines. OpenMSIStream can be run across multiple machines all interacting with the remote broker to bring different parts of the streaming ecosystem to where they are best suited computationally.
Please let me know if we can do a better job of conveying these ideas, or if there's anything else I can help with.
Thanks for your continued help, and best wishes as always, Maggie
@eminizer great paper and excellent Python package! @pibion I fully approve this paper for publication.
@lucask07 thank you so much for this excellent review!
@eminizer we still need another reviewer and I'm hoping to have someone working on this within the week. The work you've done already should help that review proceed nicely :)
@pibion I just wanted to check in and ask if we're still on the radar for a second reviewer? Thank you!
@eminizer my second reviewer won't be able to start soon, so I'm looking for additional seconds! Apologies for the delay on this - if you have any suggested reviewers that's always helpful.
Hi again @pibion, and thank you for the update! No apologies necessary whatsoever, this is a totally weird time of year, everyone is busy, and above all we're grateful for your consideration.
I checked with some contacts, and I was able to rustle up three suggestions for potential second reviewers: Peter Kraus (@PeterKraus), Thomas Caswell (@tacaswell), and William Godoy (@williamfgc). All three seem to be good options with materials science domain knowledge in addition to software expertise.
Please let me know if there's anything else we can do to help out, and thanks for your continued help!
I am happy to contribute a review.
For a full disclosure, I should mention that we've invited @eminizer to contribute towards our activities over at https://github.com/marda-alliance/metadata_extractors (which is a project co-initiated by @davidelbert who's also on this paper). To me, this is not a conflict of interest, but the editors might see this differently.
@eminizer I'd like to apologize as the notification slipped off my radar. If there is still a need for a reviewer I'd like to propose my colleague @SergeyYakubov who has broad expertise in the field of facility data streaming and management. Thanks!
@williamfgc no problem at all, we didn't have any expectations of you. Thank you for your engagement and suggestion!
@pibion is there anything we should be doing to help this submission move forward at this time? I think we have several proposed second reviewers in the thread. Thank you!!
@arfon do you have thoughts on if @PeterKraus has a conflict of interest that would prohibit them from serving as a reviewer?
@SergeyYakubov, would you be interested and willing to review this paper for JOSS?
@pibion, sure, would be glad to
Thank you @SergeyYakubov !
@editorialbot assign @SergeyYakubov as reviewer
I'm sorry human, I don't understand that. You can see what commands I support by typing:
@editorialbot commands
@editorialbot commands
Hello @pibion, 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, a reviewer or the editor 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
# Set a value for repository
@editorialbot set https://github.com/organization/repo as repository
# Mention the EiCs for the correct track
@editorialbot ping track-eic
# Generates the pdf paper
@editorialbot generate pdf
# Recommends the submission for acceptance
@editorialbot recommend-accept
# Generates a LaTeX preprint file
@editorialbot generate preprint
# 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
@editorialbot add @SergeyYakubov as reviewer
@SergeyYakubov added to the reviewers list!
@SergeyYakubov could you generate your review checklist with the command, @editorialbot generate my checklist
?
Yay, thank you everyone!
@SergeyYakubov when you're ready to get started, could you please send me your email (or reach out to me at margaret.eminizer@gmail.com) so that I can send you some secrets you'll need to set as environment variables to run the CI tests and connect to our Kafka cluster on Confluent Cloud?
Hi @eminizer .
great work, openmsistream can be quite useful for a broader community. The paper reads good, no issues there.
I have a couple of issues related to testing: https://github.com/openmsi/openmsistream/issues/32
And a general suggestion to use local Kafka broker (at least document how to do that and maybe provide a couple of scripts): https://github.com/openmsi/openmsistream/issues/33
Hi @SergeyYakubov,
Thank you so much for your detailed evaluation and your excellent suggestions. I love your ideas, and I'll get to work on them right now : )
I'll merge some PRs and let you know when we have a next version ready.
Thank you again! And best wishes, Maggie
Hi again @SergeyYakubov,
I've just published v1.3.0 of OpenMSIStream, which includes updates from two pull requests, one for each issue you opened. It's really cool to be able to fully test the package using a local broker, and I'm so pleased that the package and its tutorials are now so much more accessible and flexible : )
Thank you again for your excellent suggestions, and please let me know if you run into anything further I should address.
Best wishes, Maggie
Hi @eminizer. Everything works on my machine now (except for S3 tests because I didn't set expected environment variables, I guess). Great work!
@pibion - I fully approve the paper for publication.
@editorialbot check references
Reference check summary (note 'MISSING' DOIs are suggestions that need verification):
OK DOIs
- None
MISSING DOIs
- 10.3139/9783446470460.fm may be a valid DOI for title: Apache Kafka
- 10.5040/9781784602314.00000002 may be a valid DOI for title: pandas
INVALID DOIs
- None
@editorialbot generate pdf
Submitting author: !--author-handle-->@eminizer<!--end-author-handle-- (Margaret Eminizer) Repository: https://github.com/openmsi/openmsistream Branch with paper.md (empty if default branch): Version: v1.3.1 Editor: !--editor-->@pibion<!--end-editor-- Reviewers: @lucask07, @SergeyYakubov Archive: 10.5281/zenodo.7713196
Status
Status badge code:
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
@lucask07, 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:
The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @pibion 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 @lucask07
📝 Checklist for @SergeyYakubov