-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Declare public interfaces explicitly
As suggested by pep8: https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces Not doing so trips up flake8's F401, since the imports are not used. Imports are an implementation detail and should not directly be relied upon to declare the public API. Two exceptions to this are csrank/__init__.py and csrank/dataset_reader/__init__.py, where the API is too big. This will likely change in the future. See #105.
- Loading branch information
Showing
11 changed files
with
120 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
__version__ = "1.1.0" | ||
|
||
from .choicefunction import * | ||
from .core import * | ||
from .dataset_reader import * | ||
from .discretechoice import * | ||
from .objectranking import * | ||
from .tunable import Tunable | ||
from .tuning import ParameterOptimizer | ||
# We should re-evaluate if we really want to re-export everything here and then | ||
# use __all__ properly. | ||
|
||
from .choicefunction import * # noqa: F401 | ||
from .core import * # noqa: F401 | ||
from .dataset_reader import * # noqa: F401 | ||
from .discretechoice import * # noqa: F401 | ||
from .objectranking import * # noqa: F401 | ||
from .tunable import Tunable # noqa: F401 | ||
from .tuning import ParameterOptimizer # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
from .choicefunctions import * | ||
from .discretechoice import * | ||
from .dyadranking import * | ||
from .expedia_dataset_reader import ExpediaDatasetReader | ||
from .labelranking import * | ||
from .objectranking import * | ||
from .synthetic_dataset_generator import SyntheticIterator | ||
# We should re-evaluate if we really want to re-export everything here and then | ||
# use __all__ properly. | ||
|
||
from csrank.dataset_reader.choicefunctions import * # noqa: F401 | ||
from csrank.dataset_reader.discretechoice import * # noqa: F401 | ||
from csrank.dataset_reader.dyadranking import * # noqa: F401 | ||
from csrank.dataset_reader.expedia_dataset_reader import ExpediaDatasetReader # noqa: F401 | ||
from csrank.dataset_reader.labelranking import * # noqa: F401 | ||
from csrank.dataset_reader.objectranking import * # noqa: F401 | ||
from csrank.dataset_reader.synthetic_dataset_generator import SyntheticIterator # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
from .sushi_dyad_ranking_dataset_reader import SushiDyadRankingDatasetReader | ||
|
||
__all__ = [ | ||
"SushiDyadRankingDatasetReader", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
from .intelligent_system_group_dataset_reader import IntelligentSystemGroupDatasetReader | ||
from .survey_dataset_reader import SurveyDatasetReader | ||
|
||
__all__ = [ | ||
"IntelligentSystemGroupDatasetReader", | ||
"SurveyDatasetReader", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
from .cmp_net import CmpNet | ||
from .expected_rank_regression import ExpectedRankRegression | ||
from .fate_object_ranker import FATEObjectRanker | ||
from .fatelinear_object_ranker import FATELinearObjectRanker | ||
from .feta_object_ranker import FETAObjectRanker | ||
from .fetalinear_object_ranker import FETALinearObjectRanker | ||
from .list_net import ListNet | ||
from .rank_net import RankNet | ||
from .rank_svm import RankSVM | ||
from .baseline import RandomBaselineRanker | ||
from .cmp_net import CmpNet | ||
from .expected_rank_regression import ExpectedRankRegression | ||
from .fate_object_ranker import FATEObjectRanker | ||
from .fatelinear_object_ranker import FATELinearObjectRanker | ||
from .feta_object_ranker import FETAObjectRanker | ||
from .fetalinear_object_ranker import FETALinearObjectRanker | ||
from .list_net import ListNet | ||
from .rank_net import RankNet | ||
from .rank_svm import RankSVM | ||
from .baseline import RandomBaselineRanker | ||
|
||
__all__ = [ | ||
"CmpNet", | ||
"ExpectedRankRegression", | ||
"FATEObjectRanker", | ||
"FATELinearObjectRanker", | ||
"FETAObjectRanker", | ||
"FETALinearObjectRanker", | ||
"ListNet", | ||
"RankNet", | ||
"RankSVM", | ||
"RandomBaselineRanker", | ||
] |