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

RFC 8 Reorganization of Repositories #159

Conversation

nielsleadholm
Copy link
Contributor

This RFC proposes how we might reorganize our repositories to be comprehensible and maintain code quality going forward.

@nielsleadholm nielsleadholm added the rfc:proposal This issue tracks an RFC proposal label Jan 28, 2025
Copy link
Contributor

@vkakerbeck vkakerbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for outlining this! I left a few comments, let me know what you think.

@nielsleadholm
Copy link
Contributor Author

Thanks for the useful comments @vkakerbeck , have made some adjustments.

@tristanls tristanls added the triaged This issue or pull request was triaged label Jan 28, 2025
- Local forks of `monty_lab` can be used by contributors to track in-progress work. However, this does not mean that such code, once mature enough to be shared, should necessarily be merged into the main `monty_lab` repository.
- In general, if the code is likely to be re-used in the future, or forms part of a paper, it should *not* go in `monty_lab` (more on this below).
- Circle-CI does not include style or unit-test checks on new code.
- When merging a discontinued project, PR review does not need to be as thorough as for code pushed to the main `tbp.monty` repository.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: I think having a lesser standard for some repositories over others will be toilsome in the long run. The code standards are not there to make the code look pretty but to reduce the cognitive load of contributors and speed up our ability to change the code without breaking existing functionality. After two and a half months of its existence, I was already asked to improve the code quality of monty_lab.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean you would prefer if we didn't have some code which we say can be of a lesser standard?

Are you referring to the review of floppy? That was specifically highlighted because it does not fit in with the other code found in monty_lab, which is why we are having this discussion to presumably move it into its own package-like repository.

The idea for having a different standard in monty_lab is that it would essentially be an archive of discontinued work.

Copy link
Contributor

@tristanls tristanls Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔, I think I was responding to monty_lab as it is currently being used and did not imagine it in the state described in this RFC.

suggestion: Going back through and thinking of monty_lab as outlined in the RFC, I would say that we should probably make it an archive and no longer merge code to it. If we have some future code that we want to archive, we could archive the repo that the code is in and not go through the effort of moving it over.

Copy link
Contributor Author

@nielsleadholm nielsleadholm Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok yeah I liked this idea, so essentially archive the current monty_lab and discontinue its use going forward. For future code that needs archiving, we can just use the archive functionality. @vkakerbeck @scottcanoe @hlee9212 @ramyamounir any objections to this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point Ramy about how to name these. So if we are using repository tags as you suggest @tristanls , would archived repositories (and therefore effectively all repositories) have the tbp.* prefix? If there's no issue with this, then I'll make sure this is part of the description.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nielsleadholm, I have no issues with tbp.* prefix for all repos, as they're likely to be Python, and we're using that to avoid PyPi name collisions.

note: There are currently exceptions, for example https://github.com/thousandbrainsproject/cla, which does not have a tbp.* prefix.

suggestion: Maybe highlight why we put the tbp.* prefix in front of things? Again, as far as I understand, we originally put the tbp.* prefix in tbp.monty because a monty project already existed on PyPi. So, this was to deconflict the name of a published package. By having our Python repositories and packages retain the tbp.* prefix, we are carving out our own namespace in the PyPi global namespace. In other contexts, this may not be necessary. For example, conda has the concept of organizations, where our prefix is thousandbrainsproject::. Other languages offer namespacing solutions as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok yeah I liked this idea, so essentially archive the current monty_lab and discontinue its use going forward. For future code that needs archiving, we can just use the archive functionality. @vkakerbeck @scottcanoe @hlee9212 @ramyamounir any objections to this?

I know I already gave LGTM but I came back to read this portion a bit more carefully. To @nielsleadholm I am fine with this approach.

Pretty exciting how this will pan out!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks Tristan, I'll make sure to highlight that. I believe that was while I was on PTO, so just double checking with @vkakerbeck that you have the same memory as Tristan as to the reason for the tbp.* prefix? I can update the guidance to advise that this should be used for all Python repositories.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, avoiding name collisions was the reason we added the tbp. prefix to monty. I like the idea of keeping that as a convention for other repositories, as it seems like a nice branding opportunity to clearly associate our repos and Pypi packages with this project. However, if there is a strong argument against doing this for repos without naming conflicts (for example to avoid unnecessary nesting of folders) I also don't mind not doing this.

- If a given paper is separated into multiple repositories, will this create unecessary challenges for someone who wants to replicate the results (e.g. generating a figure)? We can think about how to structure results folders to make this as easy as possible.
- Should we be open to merging code into `monty_lab`'s `main` as a form of staging before it is eventually moved to a final repository? This would be akin to what has organically happened with the recent paper work.
- An advantage of this would be to make it easier for maintainers to review provisional code that is not yet ready for a final repository.
- What would be a good place for providing an overview of all the repositories in the codebase, with descriptions and links to them? Perhaps on https://thousandbrainsproject.readme.io/docs/ ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: With helpful descriptions and tags, the built-in GitHub page can serve this purpose: https://github.com/orgs/thousandbrainsproject/repositories

Copy link

@hlee9212 hlee9212 Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, for this my thought was creating a GitHub profile README page.

image
It looks like above - if someone comes to our org, then they should see like a README, which can contain overview of all repositories. I think this profile README can be created by creating a repo that is the same name as the username.

The only thing is I'm not sure if it works for organizations (I have done it on personal account). @tristanls would you happen to know?

Update: If creating a new .github repo would be too much overhead (e.g. I wouldn't want to make one for 191 repos if I had that many), then I'm also totally fine with tagging and descriptions.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: Yes, it is possible to add profile README to organizations - you create a .github repo and add a README file.
CleanShot 2025-01-30 at 12 36 06

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The organization's README page is a good idea. I think that meets the intent better than the repositories page.

Copy link

github-actions bot commented Mar 3, 2025

📚 Documentation Preview

✅ A preview of the documentation changes in this PR is available for maintainers at:
https://thousandbrainsproject.readme.io/v0.0-nielsleadholm-RFC-7-Reorganizing-Repositories

Last updated: 2025-03-03 15:04 UTC

@nielsleadholm
Copy link
Contributor Author

nielsleadholm commented Mar 3, 2025

Thank you everyone for your feedback on this, I'd like to now motion for final comment period (FCP). All Maintainers please indicate your final views on the RFC.

To summarize the changes I have made following feedback:

  • Clarified that a paper will have a single repository dedicated to it, with sub-folders used to separate experiments / code using diverse frameworks (e.g. Monty vs. Pytorch).
  • Clarified that monty_labs will be discontinued (archived). Future projects should create their own repository, all of which should use the tbp. prefix.
  • We will add an organization README to help someone coming to the main TBP github page learn about the different repositories that exist.

Copy link
Contributor

@ramyamounir ramyamounir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All are great changes, thank you! I vote for merging.

Copy link
Contributor

@tristanls tristanls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for putting this together. I left one non-blocking suggestion. I think this is good to merge 👍.

Copy link

@hlee9212 hlee9212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

Copy link
Contributor

@vkakerbeck vkakerbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you for writing this up and all the updates!

1. `tbp.monty` - This is the main repository for the Monty framework.
2. `monty_lab` - This is what `nupic.monty/projects` used to be, and is currently a catch-all for code that is not part of the main Monty framework.

The high-level proposal is to discontinue the use of `monty_lab` (archiving the existing repository), and instead have a very low threshold for creating new, independent repositories for different projects.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we need to archive monty_lab? At what point would we archive other repos? I'm just thinking, especially since monty_lab contains a bunch more experiment configs as well as the monty meets world app code we/other people may still want to use the code in there (and occasionally add fixes) even if we don't actively add more project folders to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good point, I've updated the guidance on this. Let me know if it still isn't clear.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@codeallthethingz
Copy link
Contributor

Looks good! 🏅

Copy link
Contributor

@scottcanoe scottcanoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, much appreciated!

@nielsleadholm nielsleadholm changed the title RFC Reorganization of Repositories RFC 8 Reorganization of Repositories Mar 7, 2025
@nielsleadholm nielsleadholm merged commit f4ffb50 into thousandbrainsproject:main Mar 7, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc:proposal This issue tracks an RFC proposal triaged This issue or pull request was triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants