You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently classes such as BaseCodemodTest and BaseIntegrationTest are defined within our tests directory which is not part of the published package.
We want to enable external developers to create custom codemod plugins, which means that we should make these test utilities part of the published API.
This means moving these class definitions (and any dependencies) out of the tests directory (which should never be part of the package distribution) and into some kind of utilities module. My initial thought is that they should go somewhere like src/codemodder/codemods/test_utilities/ although maybe there are better options.
This will enable external packages to import things like BaseCodemodTest and use them within their own packages. We should do our best to remove any hard-coded assumptions in these base classes about directory paths, etc.
The text was updated successfully, but these errors were encountered:
This also means that any test dependencies that are required for the base classes must be moved to actual package dependencies. This doesn't mean we need to include dependencies that are used for specific tests (e.g. flask, django) but it probably means things like GitPython (although I think there's a way to do this without using git that involves temporary directories. But that might be another ticket).
I don't think it can go under src/test/ but it could go under src/codemodder/test. Otherwise test is going to get published as a top-level package.
I think ideally I'd like it to go under src/codemodder/codemods/test since these tests aren't for the framework itself but rather for individual codemods.
Currently classes such as
BaseCodemodTest
andBaseIntegrationTest
are defined within ourtests
directory which is not part of the published package.We want to enable external developers to create custom codemod plugins, which means that we should make these test utilities part of the published API.
This means moving these class definitions (and any dependencies) out of the
tests
directory (which should never be part of the package distribution) and into some kind of utilities module. My initial thought is that they should go somewhere likesrc/codemodder/codemods/test_utilities/
although maybe there are better options.This will enable external packages to import things like
BaseCodemodTest
and use them within their own packages. We should do our best to remove any hard-coded assumptions in these base classes about directory paths, etc.The text was updated successfully, but these errors were encountered: