audeering / audobject

Generic Python interface for serializing objects to YAML
https://audeering.github.io/audobject/
Other
1 stars 0 forks source link

Store package name if it does not match module #37

Closed frankenjoe closed 2 years ago

frankenjoe commented 2 years ago

Closes #36

In case module and package name do not match the class key is now extended from $<module>.<class>==version to $<package>:<module>.<class>==version. This is handled by a new internal utility function utils.create_class_key(). The function utils.split_class_key(), which takes care of splitting the key, will return the module name as package name if no explicit package name is given.

codecov[bot] commented 2 years ago

Codecov Report

Merging #37 (441c9d3) into master (973528e) will not change coverage. The diff coverage is 100.0%.

Impacted Files Coverage Δ
audobject/core/define.py 100.0% <100.0%> (ø)
audobject/core/object.py 100.0% <100.0%> (ø)
audobject/core/utils.py 100.0% <100.0%> (ø)
frankenjoe commented 2 years ago

It looks like the tests were not triggered by the last commit. Do we know why this can happen?

hagenw commented 2 years ago

It looks like the tests were not triggered by the last commit. Do we know why this can happen?

I don't know. I also didn't found a way how to manually trigger the missing test. So I guess you have to add additional commit(s) to trigger the test.

frankenjoe commented 2 years ago

Of course pip-autoremove is not working on Windows:

ModuleNotFoundError: No module named 'pip_autoremove'

So I switched back to pip uninstall ... and it works again. Quite annoying, because when you run the tests locally multiple times you have to manually remove dohq-artifactory every time as it is a left-over from installing audbackend in the last test...

hagenw commented 2 years ago

Of course pip-autoremove is not working on Windows:

ModuleNotFoundError: No module named 'pip_autoremove'

So I switched back to pip uninstall ... and it works again. Quite annoying, because when you run the tests locally multiple times you have to manually remove dohq-artifactory every time as it is a left-over from installing audbackend in the last test...

You can add a clean up part in the tests that could uninstall dohq-artifactory at the end, compare https://github.com/audeering/audeer/blob/master/tests/conftest.py#L6-L31

frankenjoe commented 2 years ago

Yes, I'm already preparing a PR.