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

Improve ContextTask documentation #279

Merged
merged 18 commits into from
Sep 5, 2024
Merged

Improve ContextTask documentation #279

merged 18 commits into from
Sep 5, 2024

Conversation

jonnew
Copy link
Member

@jonnew jonnew commented Sep 3, 2024

jonnew and others added 5 commits August 26, 2024 14:26
- Move jargon from summary to remarks.
- Expand remarks to explain jargon a bit and provide link to ONI spec.
- V2e and V2eBeta inherit from this interface
- Modified V2e dialogs to accept the interface
- V2eBeta operators call the V2e dialogs, due to the common interface, and modify strings as needed to specify 'Beta'
- Consolidated XML comments, now the summary is inherited from the interface for shared properties of NeuropixelsV2 devices
- Add details to class description about what the operator does and what
  it produces without cref links to clroni
- Fix typo in BitHelper
- More details in class description
@jonnew jonnew added this to the 0.3.0 milestone Sep 3, 2024
@jonnew jonnew requested a review from cjsha September 3, 2024 15:02
bparks13 and others added 5 commits September 3, 2024 13:52
Standardize names for Neuropixels probes
- I was writing NeuropixelsV2eBeta.REC_MODE instead of
  NeuropixelsV2eBeta.OP_MODE which was preventing the probes from
  streaming data.
@cjsha
Copy link
Member

cjsha commented Sep 4, 2024

Can you confirm this? That these remarks for ContextTask's BlockReadSize might more aptly belong to StartAcquisition's ReadSize (which already has a decent description actually).
https://github.com/open-ephys/onix-bonsai-onix1/blob/6c67f9b0072721a8d0c66384432416fe155149bf/OpenEphys.Onix1/ContextTask.cs#L409-L416

@cjsha
Copy link
Member

cjsha commented Sep 4, 2024

I decided to keep reading on the ContextTask page. There are a bunch of members of contextTask which would might be helpful knowing how/when/where they are set. For instance, it might be worth mentioning that BlockReadSize and BlockWriteSize are set by ReadSize and WriteSize properties in StartAcqusition.

Copy link
Member

@cjsha cjsha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to line-by-line comments, I also made a couple more regarding other remarks on the ContextTask.cs file that I want you to read before merging.

This PR is approved but please go through and consider all the comments - I'm not sure it requires another review cycle after you address them (though you can re-request me if you want)

OpenEphys.Onix1/ContextTask.cs Outdated Show resolved Hide resolved
OpenEphys.Onix1/ContextTask.cs Outdated Show resolved Hide resolved
OpenEphys.Onix1/ContextTask.cs Show resolved Hide resolved
OpenEphys.Onix1/ContextTask.cs Outdated Show resolved Hide resolved
OpenEphys.Onix1/ContextTask.cs Show resolved Hide resolved
Fix register write in NP2.0-beta streamong configuration
- Fix many typos in CreateContext XML comments
Improve the CreateContext documentation
Improve StartAqcuisition documentation
- More details in class description
@jonnew
Copy link
Member Author

jonnew commented Sep 5, 2024

Can you confirm this? That these remarks for ContextTask's BlockReadSize might more aptly belong to StartAcquisition's ReadSize (which already has a decent description actually).

https://github.com/open-ephys/onix-bonsai-onix1/blob/6c67f9b0072721a8d0c66384432416fe155149bf/OpenEphys.Onix1/ContextTask.cs#L409-L416

Good find. It turns out that if we do the following:

/// <summary>
/// Gets the number of bytes read per cycle of the <see cref="ContextTask"/>'s acquisition
/// thread.
/// </summary>
/// <inheritdoc cref = "StartAcquisition.ReadSize"/>
public int BlockReadSize => ctx.BlockReadSize;

then we override the summary (since this property only has a getter) but we import the remarks from StartAcquisition.ReadSize. Very useful.

@jonnew
Copy link
Member Author

jonnew commented Sep 5, 2024

I decided to keep reading on the ContextTask page. There are a bunch of members of contextTask which would might be helpful knowing how/when/where they are set. For instance, it might be worth mentioning that BlockReadSize and BlockWriteSize are set by ReadSize and WriteSize properties in StartAcqusition.

I decided to keep reading on the ContextTask page. There are a bunch of members of contextTask which would might be helpful knowing how/when/where they are set. For instance, it might be worth mentioning that BlockReadSize and BlockWriteSize are set by ReadSize and WriteSize properties in StartAcqusition.

I understand the concern, but they are not actually set by StartAcquisition. They are set either by hardware (everything besides read and write size) via setup handshake that is require by ONI or by whoever calls ContextTask.StartAsync, which happens to be by StartAcquisition in the bonsai editor.

- Try to remove all crefs to clroni and replace with hrefs to the
  specification itself.
@jonnew jonnew merged commit cebb7b9 into main Sep 5, 2024
7 checks passed
@jonnew jonnew deleted the issue-208 branch September 5, 2024 14:19
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.

Improve ContextTask XML comments for docs
3 participants