Prefix top-level modules: * -> raft.* #176
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is semi-automated and relies on the python-rope/rope refactoring library:
This change augments generic names like
core
andutils
, which are unspecific and may cause conflicts when used as top-level, with project name as the prefix. This change makes it easier to just composeraft
in the same environment with other projects without "human intervention" or microservices. In particular, this makes it easier to run comparisons against the exact code, rather than reimplementations. E.g.sys.path
manipulations and git-submodules -> raft used as a libraryOne of the commits also adds
pyproject.toml
: this was just the easiest way to have wheels and entry points automatically generated, both when used withpip
, and when packaging for other distributions (wheels have been somewhat of an exchange format lately)I didn't try restructuring
alt_cuda_corr
, other than prefixing the.so
and the.dist-info
withraft_
, because there are other projects that intend to ship this exact same module, but may actually diverge in the implementation. I thought it reasonable that each project would use its own version of the kernel, because that's safer and not much more expensiveThe top-level project declares
raft-alt-cuda-corr
asRequires-dist:
. The intention is that, when used outside the dev environment, the kernel package is just installed first. Cf. an exampleI can revert any particular bit if you like, but it would be nice if you agreed with the prefix thing, because that really makes consumption easier, regardless of distro/environment/etc