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

Add sudachipy like import path #96

Merged

Conversation

mh-northlander
Copy link
Collaborator

#84.

We can still use direct import path like from sudachi import Dictionary

python/src/lib.rs Outdated Show resolved Hide resolved
@@ -15,7 +15,8 @@
import os
import unittest

from sudachi import Dictionary, Tokenizer
Copy link
Collaborator

@eiennohito eiennohito Oct 15, 2021

Choose a reason for hiding this comment

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

I think that original imports were better, we are promoting new ways of import as the correct usage, am I correct?

But we still need to have a test that old ways of import do not break (a new one, which only does imports inside test methods).

Copy link
Collaborator Author

@mh-northlander mh-northlander Oct 15, 2021

Choose a reason for hiding this comment

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

I think that original imports were better, we are promoting new ways of import as the correct usage, am I correct?

Currently we don't have concrete plan about this.
I personally think we can put everything in the root module since the amount is not so large.

In the future we will change the API along with the rust API and may want a different module structure.
For that time, I guess we can keep current (old) path as default.

Copy link
Collaborator

@eiennohito eiennohito Oct 15, 2021

Choose a reason for hiding this comment

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

I personally think we can put everything in the root module since the amount is not so large.

Completely agree with that, and it is also easier to use it that way.

I would think that we should move to having the public API under the main package (sudachi) by default and keep the old modules only for compatibility (without deprecating them though).

@mh-northlander mh-northlander merged commit cef208b into WorksApplications:develop Oct 15, 2021
@mh-northlander mh-northlander deleted the sudachipy-import-path branch October 15, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants