Splitting code into modules
Status: proposal
Champion:
Initiative Description:
Currently we have a “monolith” at https://github.com/sourcecred/sourcecred. Which comes with a number of issues. Especially when trying to build upon or extend SourceCred there will be components you’d want to use as a library.
This initiative is to refactor SourceCred to be split into (NPM) modules.
Benefits:
- Installation and managing versions will be easier from the user perspective.
- Reusing SourceCred core code will be easier.
- Will force making clean APIs at the module integration points.
- Allows using as a library dependency for example in the UI, widgets, or notebooks.
Implementation plan:
- Set up a mono-repo, multi-module structure to create and manage the modules from.
- Bring in several small modules, like the CLI ones proposed for Publish SourceCred on NPM
- Set up initial shared CI/CD tools that work across multiple modules.
- Break up
sourcecred/sourcecred
into several modules. Where at least a “core” comes out of it which we can use as a library.
Estimated Work (hours):
The full scope of work needed to rework all the tooling and refactor code is hard to estimate. But I would be surprised if we can do this within a week.
Dependencies:
References
Contributions:
TBD