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

Expose loading functions from main module interface #361

Open
vigji opened this issue Dec 10, 2024 · 4 comments
Open

Expose loading functions from main module interface #361

vigji opened this issue Dec 10, 2024 · 4 comments
Labels
enhancement New optional feature

Comments

@vigji
Copy link
Collaborator

vigji commented Dec 10, 2024

Is your feature request related to a problem? Please describe.
I find it a bit cumbersome to remember every time that loading functions need to be imported from movement.io.load_poses or whatever other module.

Describe the solution you'd like
I'm sure you people have been discussing about this and maybe do not want to prematurely expose functions from a module and then force people to refactor their code if you move those functions/rename etc. I guess this must be the issue, as otherwise since any movement-related project would at some point import functions from the io module additional dependencies loading time should not really be a factor here.

However, since every project indeed starts with such imports, I would really like to be able to use a function to load my files directly from the movement module interface (movement.load_file? movement.load_pose?)

What are your thoughts on this?

@adamltyson
Copy link
Member

Sounds like a good idea to me.

@niksirbi
Copy link
Member

Agree the current imports are cumbersome, especially for io.
Just to clarify, is this sth like the interface you envision?

import movement as mvt

# instead of movement.io.load_poses.from_file()
mvt.load_poses(file_path)

# instead of movement.io.load_bboxes.from_file()
mvt.load_bboxes(file_path)

@vigji
Copy link
Collaborator Author

vigji commented Dec 10, 2024

yup! I see how that would entail renaming functions from current load_poses module, but maybe that can be done gradually with duplication and warnings. I feel it would be important to lower friction for an entry user :)

@niksirbi
Copy link
Member

Yeah, we could do that gradually end with deprecation warnings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New optional feature
Projects
Status: 🤔 Triage
Development

No branches or pull requests

3 participants