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

Add functionality for installing extensions #637

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

ehennestad
Copy link
Collaborator

@ehennestad ehennestad commented Nov 23, 2024

Motivation

Provide an easy way to install extensions from the Neurodata Extension Catalog in matnwb.

How to test the behavior?

nwbInstallExtension("ndx-miniscope")

Todo

  • Write tests
  • Workflow for updating nwbInstallExtension if the records of the Neurodata Extension Catalog has been updated
  • Set up deploy keys and allow GitHub Actions to write to main branch using deploy key
  • Set up external trigger from nwb-extensions.github.io Use cronjob workflow in this repo instead
  • Add link to https://nwb-extensions.github.io in the docstring of nwbInstallExtension

Checklist

  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XX where XX is the issue number?

@ehennestad
Copy link
Collaborator Author

This PR adds the user-facing/convenience function nwbInstallExtension.

In order to provide users with an overview of available (official) extensions, a list of extensions from the Neurodata Extension Catalog is hardcoded in the docstring and in the validator for the extensionNames in the function's arguments block.

In order to ensure this function is kept up-to-date with the neurodata extension catalog, I propose to add a workflow that runs regularly and updates the nwbInstallExtension if changes are detected to the Neurodata Extension Catalog.

This workflow should ideally push the updated nwbInstallExtension function back to the main branch. But, the main branch is protected, and one way to permit the workflow to push the the main branch is to set up a Deploy Key and add the Deploy Key to the bypass list in the ruleset for protecting the main branch.

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 93.00699% with 10 lines in your changes missing coverage. Please review.

Project coverage is 95.18%. Comparing base (bb9acbf) to head (0bc735f).

Files with missing lines Patch % Lines
+matnwb/+extension/+internal/downloadZippedRepo.m 77.77% 4 Missing ⚠️
+matnwb/+extension/installExtension.m 89.65% 3 Missing ⚠️
...+extension/+internal/downloadExtensionRepository.m 88.88% 2 Missing ⚠️
+matnwb/+extension/listExtensions.m 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #637      +/-   ##
==========================================
- Coverage   95.24%   95.18%   -0.07%     
==========================================
  Files         117      124       +7     
  Lines        4901     5044     +143     
==========================================
+ Hits         4668     4801     +133     
- Misses        233      243      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ehennestad ehennestad marked this pull request as ready for review December 12, 2024 13:38
@bendichter
Copy link
Contributor

Could you please add a docs page on how to use these tools?

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.

2 participants