question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Label docstrings with versionadded / versionchanged

See original GitHub issue

We should be using Sphinx’s versionadded and versionchanged directives to indicate when classes, functions, methods and parameters are added or modified in their semantics. We are not very good at ensuring this labelling is done.

Towards the upcoming release of v0.22, it would be useful if some contributors (or sprinters) scoured the change log and identified whether any added/changed parameters/classes needed a versionadded or versionchanged label, and to produce pull requests adding them when otherwise omitted.

I also note past omissions, for example KBinsDiscretizer and IterativeImputer do not mention their versionadded, while ColumnTransformer does. Recording for each estimator when it was first released would be helpful for users when looking at the documentation.

Suggested procedure

Check the changelog in doc/whats_new/ one what’s a new file at a time. **Make a single PR for an estimator and a specific version. Do not include multiple estimators and multiple versions at once (it makes it difficult to review).

Focus on Public API: if a method has been made private, check the tickbox and move to another.

.. versionadded:: 0.xx

should be included only for new estimators/parameters

.. versionchanged:: 0.xx
   `param_xxx` change from 'xx' to 'yy'

should be included when the default value of a parameter change.

Classes lacking label

The list may be incomplete.

  • ARDRegression PRs #15482 #15973 #16015
  • AdaBoostClassifier
  • AdaBoostRegressor
  • AdamOptimizer
  • AdditiveChi2Sampler
  • AffinityPropagation
  • AgglomerationTransform
  • BaggingRegressor
  • BaseBagging
  • BaseCrossValidator
  • BaseDecisionTree
  • BaseDiscreteNB
  • BaseEnsemble
  • BaseForest
  • BaseGradientBoosting
  • BaseHistGradientBoosting
  • BaseLabelPropagation
  • BaseLibSVM
  • BaseLoss
  • BaseMixture
  • BaseNB
  • BaseRandomProjection
  • BaseSGD
  • BaseSVC
  • BaseSearchCV
  • BaseShuffleSplit
  • BaseSpectral
  • BaseWeightBoosting
  • BernoulliNB
  • BernoulliRBM
  • Binarizer
  • BinaryCrossEntropy
  • BinomialDeviance
  • BinomialDeviance
  • Birch
  • Bunch
  • CCA
  • CalibratedClassifierCV
  • CategoricalCrossEntropy
  • CategoricalNB
  • ChangedBehaviorWarning
  • CheckingClassifier
  • ClassificationLossFunction
  • ClassifierChain
  • ComplementNB
  • ConvergenceWarning
  • CountVectorizer
  • DataConversionWarning
  • DataDimensionalityWarning
  • DictVectorizer
  • DummyRegressor
  • ElasticNet
  • ElasticNetCV
  • EllipticEnvelope
  • EmpiricalCovariance
  • ExponentialLoss
  • ExponentialLoss
  • FactorAnalysis
  • FastICA
  • FeatureHasher
  • FeatureUnion
  • FitFailedWarning
  • ForestClassifier
  • ForestRegressor
  • GaussianNB
  • GaussianRandomProjection
  • GenericUnivariateSelect
  • GraphicalLasso
  • GraphicalLassoCV
  • GridSearchCV
  • GroupKFold
  • HistGradientBoostingClassifier
  • HistGradientBoostingRegressor
  • HuberLossFunction
  • IncrementalPCA
  • IsotonicRegression
  • IterativeImputer Open PR
  • KBinsDiscretizer
  • KFold
  • KMeans
  • KNeighborsClassifier
  • KNeighborsRegressor
  • KernelCenterer
  • KernelDensity
  • KernelRidge
  • KeyValTuple
  • KeyValTupleParam
  • LabelBinarizer
  • LabelEncoder
  • LabelPropagation
  • LabelSpreading
  • Lars
  • LarsCV
  • Lasso
  • LassoCV
  • LassoLars
  • LassoLarsCV
  • LassoLarsIC
  • LeastAbsoluteDeviation
  • LeastAbsoluteError
  • LeastSquares
  • LeastSquaresError
  • LeaveOneGroupOut
  • LeaveOneOut
  • LeavePGroupsOut
  • LeavePOut
  • LedoitWolf
  • LinearClassifierMixin
  • LinearModel
  • LinearModelCV
  • LinearRegression
  • LinearSVC
  • LinearSVR
  • LocalOutlierFactor
  • LocallyLinearEmbedding
  • LossFunction
  • MDS
  • MinCovDet
  • MiniBatchKMeans
  • MissingIndicator Open PR
  • Module_six_moves_urllib
  • Module_six_moves_urllib_error
  • Module_six_moves_urllib_parse
  • Module_six_moves_urllib_request
  • Module_six_moves_urllib_response
  • Module_six_moves_urllib_robotparser
  • MultiLabelBinarizer
  • MultiOutputClassifier
  • MultiOutputRegressor
  • MultiTaskElasticNet
  • MultiTaskElasticNetCV
  • MultiTaskLasso
  • MultiTaskLassoCV
  • MultinomialDeviance
  • MultinomialNB
  • NearestCentroid
  • NearestNeighbors
  • NeighborhoodComponentsAnalysis
  • NeighborsBase
  • NoSampleWeightWrapper
  • NonBLASDotWarning
  • Normalizer
  • NotFittedError
  • NuSVR
  • Nystroem
  • OAS
  • OPTICS
  • OneClassSVM
  • OneHotEncoder
  • OneVsOneClassifier
  • OneVsRestClassifier
  • OrdinalEncoder
  • OrthogonalMatchingPursuit
  • OrthogonalMatchingPursuitCV
  • OutputCodeClassifier
  • PLSCanonical
  • PLSRegression
  • PLSSVD
  • PatchExtractor
  • Pipeline
  • PowerTransformer
  • PredefinedSplit
  • QuantileLossFunction
  • QuantileTransformer
  • RBFSampler
  • RFE
  • RFECV
  • RadiusNeighborsClassifier
  • RadiusNeighborsRegressor
  • RandomizedSearchCV
  • RegressionLossFunction
  • RegressorChain
  • RepeatedKFold
  • RepeatedStratifiedKFold
  • RidgeCV
  • RidgeClassifierCV
  • SGDOptimizer
  • SVR
  • ScaledLogOddsEstimator
  • SelectFdr
  • SelectFpr
  • SelectFwe
  • SelectKBest
  • SelectPercentile
  • SelectorMixin
  • ShrunkCovariance
  • ShuffleSplit
  • SkewedChi2Sampler
  • SkipTestWarning
  • SimpleImputer Open PR
  • SparseCodingMixin
  • SparseRandomProjection
  • SpectralBiclustering
  • SpectralClustering
  • SpectralCoclustering
  • SpectralEmbedding
  • StratifiedKFold
  • StratifiedShuffleSplit
  • TfidfTransformer PRs #15482 #15973 #16015
  • TfidfVectorizer PRs #15482 #15973 #16015
  • TheilSenRegressor
  • TimeSeriesSplit
  • TransformedTargetRegressor
  • TruncatedSVD
  • UndefinedMetricWarning
  • VarianceThreshold

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:38 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
adrinjalalicommented, Apr 8, 2020

I think we’ve covered most of the relevant ones. I personally wouldn’t worry about anything older than 0.18

1reaction
thomasjpfancommented, Nov 2, 2019

Do we need a policy regarding really old versions? I do not know if versionadded: 0.5 is helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[DOCS] Need to fix incorrect use of "versionchanged" directive ...
Description Running the following quick audit bash commands from the root of the repo: # Find weird version name occurrences ...
Read more >
Directives - Sphinx documentation
Similar to versionadded , but describes when and what changed in the named ... Similar to versionchanged , but describes when the feature...
Read more >
2. Example on how to document your Python docstrings
This class docstring shows how to use sphinx and rst syntax ... There are many other directives such as versionadded, versionchanged, rubric, centered,...
Read more >
How to Use Python Docstrings for Effective Code Documentation
Documenting your code is a critical skill for any data scientist or software engineer. This tutorial will show you how using docstrings.
Read more >
Writing documentation — CKAN 2.9.7 documentation
versionadded :: 1.7 CKAN sites can have *tag vocabularies*, which are a way of grouping related tags together into custom fields. ... With...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found