Closed desilinguist closed 4 years ago
Hello @desilinguist! Thanks for updating this PR.
setup.py
:Line 41:101: E501 line too long (113 > 100 characters)
skll/config/__init__.py
:Line 769:101: E501 line too long (106 > 100 characters)
tests/test_classification.py
:Line 1115:101: E501 line too long (114 > 100 characters) Line 1117:101: E501 line too long (114 > 100 characters) Line 1119:101: E501 line too long (117 > 100 characters) Line 1165:101: E501 line too long (114 > 100 characters) Line 1167:101: E501 line too long (114 > 100 characters) Line 1169:101: E501 line too long (117 > 100 characters)
Merging #601 into master will increase coverage by
0.10%
. The diff coverage is96.87%
.
@@ Coverage Diff @@
## master #601 +/- ##
==========================================
+ Coverage 95.06% 95.16% +0.10%
==========================================
Files 20 26 +6
Lines 2977 3021 +44
==========================================
+ Hits 2830 2875 +45
+ Misses 147 146 -1
Impacted Files | Coverage Δ | |
---|---|---|
skll/metrics.py | 96.87% <ø> (-0.27%) |
:arrow_down: |
...utils/commandline/compute_eval_from_predictions.py | 97.18% <ø> (ø) |
|
skll/utils/commandline/filter_features.py | 98.41% <ø> (ø) |
|
skll/utils/commandline/generate_predictions.py | 98.59% <ø> (ø) |
|
skll/utils/commandline/join_features.py | 98.14% <ø> (ø) |
|
skll/utils/commandline/print_model_weights.py | 94.91% <ø> (ø) |
|
skll/utils/commandline/run_experiment.py | 96.77% <ø> (ø) |
|
skll/experiments/utils.py | 93.51% <93.51%> (ø) |
|
skll/config/utils.py | 96.00% <96.00%> (ø) |
|
skll/learner/utils.py | 96.31% <96.31%> (ø) |
|
... and 16 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 1d64e25...996d44f. Read the comment docs.
This PR closes #600.
The various SKLL modules
learner.py
,experiments.py
,config.py
etc. were getting really long as single files and unwieldy when it came to adding new development. This PR tries to address this issue by converting these modules into sub-packages instead with specific functions moved to different modules under these sub-package.Here's what the SKLL code tree looks like today:
With this PR, it will look like:
In addition, some functions that were previously indicated to be private (with a leading underscore) are now public since they can actually be quite useful as part of the API. Some examples include
experiments.input.load_featureset()
andexperiments.output.generate_learning_curve_plots()
.Specifically, this PR:
__init__.py
for these sub-packages such that most of the idiomatic SKLL imports work just like they do now.skll
namespace. Right now only the following are importable fromskll
-FeatureSet
,Learner
, andrun_configuration
.logutils.py
toutils/logging.py
utils/constants.py
.utils/commandline/
and adjustssetup.py
accordingly._import_custom_learner()
function to a public function calledload_custom_learner()
which does not modifyglobals()
directly but just returns the loaded learner to the caller which then modifiesglobals()
on its end.test_logutils.py
andtest_utilities.py
totest_logging_utils.py
andtest_commandline_utils.py
.