mxstack / mxdev

A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.
https://pypi.org/project/mxdev/
Other
8 stars 2 forks source link

Add a CLI option to check for discrepancies between mxdev.ini branches and what is actually running. #44

Open ewohnlich opened 7 months ago

ewohnlich commented 7 months ago

The best practice is probably to only change branches through changing the mxdev.ini settings, but in the real world they may differ because mxdev can't stop you from just running git commands. I have my own CLI that does something like this to check for discrepancies using pygit2:

(venv) PS C:\Users\wohnlice\PycharmProjects\Plone6> imsplone branches -c .\mxdev.ini
ims.contacts: `fake` differs from setting: `master`
ims.opensearch: `development` differs from setting: `master`
ims.portals.prevent: `plone6` differs from setting: `master`
WARNING: `ims.upload` is not found in this config file!
ims.users: `i70385` differs from setting: `master`
WARNING: `plone.documentation` is not found in this config file!
WARNING: `plone.squish` is not found in this config file!

If you think this would be useful I can put in a PR to run this if some flag is passed.

rnixx commented 7 months ago

Hi, to me this sounds good. maybe adding a command like mxdev status which might contain other useful information as well can be helpful. @jensens what do you think?

jensens commented 7 months ago

@rnixx sounds useful.

ewohnlich commented 7 months ago

Is it possible to have more than one target path (e.g. "sources" dir) defined and are you allowed to have untracked packages in there? If so I guess it wouldn't be possible to find packages that aren't in your mx.ini but perhaps should be.

jensens commented 7 months ago

it should be restricted to vcs folders handled by mx.ini. Otherwise we exceed the scope of mxdev.