-
Notifications
You must be signed in to change notification settings - Fork 9
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
Expand the developer documentation #144
Conversation
intro contains - guiding principles (with explanatory examples) - naming and organisation of packages in org - suggested default software architecture for brainglobe tools Also this commit - incorporates the intro into the wider website - adds some knowledge that was living in our heads to website text.
Asking for feedback from any active developers who have time to look but in particular
|
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.
Most of my comments that aren't in my section are consequences of VSCode religiously using a markdown linter, so apologies for that 😅
One additional bit of info for the releases section - threw in a mention that ideally we follow the package dependency tree when deciding which order to merge any potential PR chains. Just gives some order to the potential merge chaos.
Co-authored-by: Will Graham <[email protected]>
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.
Thank you @alessandrofelder, this was incredibly useful to read. I added a few comments.
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.
Very nice, thanks @alessandrofelder. I've left a few minor comments.
- One in the [metapackage repository](https://github.com/brainglobe/brainglobe-meta), which pins the new versions of all affected tools at once. | ||
|
||
We should cross-link the latter to the website update, and release all affected packages to PyPI (and conda if appropriate) once they are all merged into `main`. | ||
Ideally, updates and releases should be made in an order that [follows the dependency tree](./repositories/brainglobe-meta/index#dependency-tree) - starting with our lower level tools, than their dependents, then dependents of those dependents, and so on. |
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.
This link is giving me a warning. I don't think sphinx likes section references.
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.
I think it will be happy if you put
./repositories/brainglobe-meta/index.md#dependency-tree
for the link - the .md
gets auto-converted to .html
so there aren't any problems there. I've used this syntax in a number of places in this repo already without any warnings showing up.
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.
I worked around it differently, for now - but good to know :)
Before contributing code, it may be useful to familiarise yourself with the [introduction to the BrainGlobe code for developers](./intro_to_codebase.md) as well as the [testing](./testing.md), [developer tooling](./tooling.md) and [conventions](./conventions.md) sections. | ||
|
||
The core development team will support you in contributing code, irrespective of your experience. | ||
At the same time, they will hold you to the same standards as they do each other on review, to ensure BrainGlobe remains easy-to-maintain. |
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.
Can we make this more friendly? I would suggest that we hold all contributions to the same standard, but not necessarily all developers (i.e. we may go in and fix something ourselves).
At the same time, they will hold you to the same standards as they do each other on review, to ensure BrainGlobe remains easy-to-maintain. | |
At the same time, they will hold you to the same standards as they do each other on review, to ensure BrainGlobe remains easy-to-maintain. |
* ease of installation: through the metapackage, we provide a one-line command to install all BrainGlobe tools at once. None of the packages depend on anything other than Python (we've removed historical compiled code), and are therefore easy to install cross-platform. | ||
* accessibility: we aim to provide a Graphical User Interface (GUI) for all BrainGlobe tools. By asking users for feedback, we ensure that the GUI provides a nice user experience. | ||
* ease of use through Python/interoperability: we aim to provide a well-documented Python API for all BrainGlobe tools. | ||
* performance: By running weekly benchmarks comparing the latest release with the development version, we guarantee that performance will not deteriorate as BrainGlobe evolves. | ||
* species/modality independent: none of the code makes any assumptions about the imaging modality or the species of the model organism of interest. We provide atlases for a variety of model organisms. | ||
* useability: we sacrifice the code simplicity provided by `magicgui` in exchange for fine-grained control of the user experience by writing brainglobe widgets in `qtpy`. This is an example where the first guiding principle takes priority over the second. | ||
* easy-to-maintain: we move functionality used by more than one independent BrainGlobe tool to `brainglobe-utils` to reduce code duplication and make maintenance easier. |
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.
Is there a reason all of these bullets aren't capitalised?
- [`brainglobe-registration`](https://github.com/brainglobe/brainglobe-registration) | ||
- [`brainrender-napari`](https://github.com/brainglobe/brainrender-napari) | ||
|
||
The BrainGlobe Github organisation also hosts the [`brainglobe` (meta-)package](./repositories/brainglobe-meta/index.md) and the [`brainglobe-workflows` collection](./repositories/brainglobe-workflows/index.md) in separate repositories (which are not tools in themselves), as well as the utility packages `brainglobe-utils` and `brainglobe-space`. |
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.
I would argue that brainglobe-space
is a tool. I've used it independently of the BG ecosystem before.
User data is kept in hidden folders, usually in the user's `$HOME` directory. | ||
These folders are named after the tools (e.g. `~/.cellfinder/`) or in appropriate subfolders of `.brainglobe` (e.g. `~/.brainglobe/mpin_zfish_1um_v1.0/`). |
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.
Can we add that although this is the current status, all new locally stored files should go into ~.brainglobe
?
|
||
### Default architecture for BrainGlobe Tools | ||
|
||
By default, each BrainGlobe tool should be organised into three distinct submodules: `core`, `qt`, and `napari`. |
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.
Maybe specify up to three? And we won't have this structure if there's no GUI.
- the modularity ensure each of submodule can (and should be) tested individually in the first instance | ||
- widgets can be re-used outside of napari | ||
- integration tests in the same repo to avoid messy CI dependencies |
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.
Capitalisation?
Description
What is this PR
Why is this PR needed?
As a novice (and even as an experienced contributors), it's currently not easy to get a quick, good overview of the how the BrainGlobe code base is organised.
What does this PR do?
This PR represent a major fleshing out of the developer docs.
This PR adds a high-level introduction to the code base for new and existing contributors. It includes:
This PR further
.brainglobe
folder)Note that some of the information about the tool names is slightly ahead of our renaming/merging tool repos schedule 😬 It considers brainglobe/BrainGlobe#43 as already addressed.
References
Closes brainglobe/BrainGlobe#47
Closes #8
Closes #81
brainglobe/BrainGlobe#16 to be tackled separately to this.
How has this PR been tested?
Inspection of local build of website.
Is this a breaking change?
No
Does this PR require an update to the documentation?
This PR is an update to the documentation
Checklist: