-
Notifications
You must be signed in to change notification settings - Fork 25
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
Export common functionality #983
Comments
Hi @dvmoritzschoefl! Thanks for the suggestion, and we fully agree that it will be useful to expose utility functions for developers. Since there are a large number of utility functions in Gosling.js, and we are still figuring out which utility functions we want to make public, we would need to expose selected functions having clear use cases for developers. In your case, it seems like functions in
Can you confirm if these were the functions that you need to rewrite? Please also let me know if you have other utility functions in mind since that would be very helpful for us. |
@manzt Would you have any general suggestions on this? |
Yes @sehilyi these were exactly the functions we needed. In addition I also think there was one called |
@dvmoritzschoefl I made a PR for this (#997). Please let me know if it reflect on your use cases! |
Yes that would cover everything we need. However most libraries would export it in a style like this
This way auto import would still work (I think with the solution in the mentioned PR this would not be recognized by vscode) |
Ah, good point. I followed how HiGlass supports utils functions (i.e., making import { computeChromSizes, ... } from '@gosling-lang/util'; Do you have any suggestions on how we can achieve your suggested syntax? i.e., import { computeChromSizes, ... } from 'gosling.js/util (@manzt might have an idea!) |
Ah just catching up here, I think I like the suggestion of having a separate package entrypoint for these utils in lieu of a separate package (i.e., Ideally we could set up the
However, this would require setting up out build to generate |
We implemented a custom data fetcher for a track and therefore needed some functionality which was already in gosling, like functions to convert from absolute to relative genomic positions and vice versa. However these utility functions are not exported from the gosling library and therefore we had to rewrite/copy them, which is not optimal. It would be nice if all utility functions would be exported so they can be used from outside of gosling.
The text was updated successfully, but these errors were encountered: