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

Adding option to skip loading models from subdirectories #767

Merged
merged 6 commits into from
May 8, 2020

Conversation

ethanbresler
Copy link
Contributor

Currently the models annotator automatically attempts to find a class with a matching name at the bottom of project's directory tree before going up into specific engine's models. This causes issues with models that share names with classes in other engines or lower classes in the project's directory. This PR adds the option to skip attempts to load classes from lower directories and just uses the model's file path directly.

#674

cc @maxh

@drwl
Copy link
Collaborator

drwl commented Mar 8, 2020

@ethanbresler I apologize for the delay in reviewing. Thanks for this patch. Would it be possible to add tests for this?

@drwl drwl added the reviewed label Mar 8, 2020
@ethanbresler
Copy link
Contributor Author

@ethanbresler I apologize for the delay in reviewing. Thanks for this patch. Would it be possible to add tests for this?

@drwl Added tests, but the CI tests are failing due to an 'install sql lite' error. Is this something on my end or a problem with the integration tests?

@maxh
Copy link

maxh commented Apr 3, 2020

@drwl can we get another review of this? thanks!

@drwl
Copy link
Collaborator

drwl commented Apr 5, 2020

@maxh I apologize for the delay. @ethanbresler can you try rebasing? I believe that should be fixed.

@ethanbresler
Copy link
Contributor Author

@drwl rebased and checks are passing. Thanks for your help with this.

cc @maxh

@ethanbresler
Copy link
Contributor Author

@drwl any updates here? Can I get this merged? Thanks so much!

Copy link
Collaborator

@drwl drwl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch & tests -- I apologize for the delay in getting this in.

@drwl drwl merged commit 508d06a into ctran:develop May 8, 2020
ocarta-l pushed a commit to ocarta-l/annotate_models that referenced this pull request Jun 18, 2021
Currently, the models annotator automatically attempts to find a class with a matching name at the bottom of project's directory tree before going up into specific engine's models.  This causes issues with models that share names with classes in other engines or lower classes in the project's directory.   This PR adds the option to skip attempts to load classes from lower directories and just uses the model's file path directly. 

ctran#674
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants