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

Calculate distance in a git monorepo just for the current project's path #1056

Open
ovidiu-eremia opened this issue Jul 17, 2024 · 7 comments

Comments

@ovidiu-eremia
Copy link

ovidiu-eremia commented Jul 17, 2024

Hello,

I'm trying to use this great tool for versioning different projects in the same git monorepo.
Is there a possibility to calculate the distance just for commits done on the current project's path?

Thank you,
Ovi

@ovidiu-eremia ovidiu-eremia changed the title Calculate distance in a monorepo just for the current project's path Calculate distance in a git monorepo just for the current project's path Jul 17, 2024
@RonnyPfannschmidt
Copy link
Contributor

that requires a custom git query - gi describe doesnt provide that

a gitpython backend may be able to provide that, but implementation is not on my personal planning horizon

@ovidiu-eremia
Copy link
Author

ovidiu-eremia commented Jul 17, 2024

Thank you for your quick reply @RonnyPfannschmidt !

I perfectly understand why this is not on your roadmap, as a monorepo wasn't on mine either :-) but I need to work with it.
So, if you could please provide some guidance on where could I plugin this functionality in setuptools_scm and maybe how would that be expected to look like, I'd really appreciate it!

Thanks,
Ovi

@RonnyPfannschmidt
Copy link
Contributor

right now we dont have a good extension point to plug this in - it may be necessary to add a functionality to explicitly choose the backend in the configuration and/or a new entrypoint + possibly a ordering mechanism for the entrypoints

a little brainstorming on how to enable this is necessary

also im not opposed to adding this directly into setuptools_scm - a key addition would be reading git Details based on a new plugin

something similar is also needed to deal with parse checkouts

@ovidiu-eremia
Copy link
Author

ovidiu-eremia commented Jul 17, 2024

Ok, I don't think I can help you with the brainstorming... :-)
So, I suppose I should wait for you to have an idea on what is the best approach on solving this and come back to me with a direction on how should I proceed implementing it?

@RonnyPfannschmidt
Copy link
Contributor

im unlikely to work on this alone - in particular since i dont have a own need and dont want to mess it up

@ovidiu-eremia
Copy link
Author

ovidiu-eremia commented Jul 17, 2024

Ok, then I'll try to be the driver of this feature and maybe if you could help me navigating through all the options, please?
Should I start by looking into how could I write a plugin just for reading the git details?
I guess we'd rather go with something that could be reused also for git sparse checkouts, this is the idea, right?

@RonnyPfannschmidt
Copy link
Contributor

the starting point is a acceptable mechanism for picking a alternate data source
then adding one that allows to use a git python binding to calculate the difference per subpart of the monoroep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants