-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(core): export several util functions #997
Conversation
@manzt Could you review this to see if this makes sense to you? Open to any suggestions regarding how we want to expose utility functions to users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. Although I wonder about exporting these under a namespace like _interval
for now. What's the plan in versioning Gosling with relation to these utilities going forward? A namespace like _internal
or _util
might suggest to most users "use with caution" or carry other semantics compared to the rendering logic.
import { _internal } from "gosling.js";
const { getRelativeGenomicPosition } = _internal;
I think ideally we'd have a separate library for these shared utilities in a monorepo (e.g., @gosling-lang/utils
) which could be versioned separately from gosling as a whole. That way folks could have that versioned separately. However, in the short term this seems to be a fine solution.
…y funcs (#1001) feat: Create separate entrypoint for gosling.js/utils
@manzt Given that the code has been changed after I merged your update, would you suggest adding export {
getRelativeGenomicPosition as _getRelativeGenomicPosition,
computeChromSizes as _computeChromSizes,
getChromInterval as _getChromInterval,
getChromTotalSize as _getChromTotalSize,
parseGenomicPosition as _parseGenomicPosition
} from './core/utils/assembly';
export { sanitizeChrName as _sanitizeChrName } from './data-fetchers/utils'; I think we want to support the |
I think it's fine as is (no We should keep utilities which are only used by a given package (e.g., Utilities can be "promoted" to this package if they end up used across projects or by end users, but this "promotion" should come with a consideration of the API and process of making it public. |
Fix #983
Change List
Checklist