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.

Apply doctest to existing documents.

See original GitHub issue

Though we’ve introduced doctest in #702, many existing examples are still incompatible with doctest. This issue is to ~list up those examples and~ apply doctest to them.

Below are files to be fixed, listed up in https://github.com/optuna/optuna/issues/734#issuecomment-586678423. (Thanks @keisuke-umezawa for your consolidating the information!)

  • optuna/visualization/parallel_coordinate
  • optuna/visualization/slice
  • optuna/visualization/intermediate_values
  • optuna/visualization/optimization_history
  • optuna/visualization/contour
  • optuna/logging
  • optuna/storages/rdb/storage
  • optuna/trial
  • optuna/pruners/successive_halving
  • optuna/pruners/nop
  • optuna/pruners/median
  • optuna/pruners/percentile
  • optuna/integration/cma
  • optuna/integration/lightgbm
  • optuna/integration/mxnet
  • optuna/integration/chainermn
  • optuna/integration/fastai
  • optuna/integration/keras
  • optuna/integration/pytorch_ignite
  • optuna/integration/tensorflow
  • optuna/integration/sklearn
  • optuna/integration/skopt
  • optuna/integration/pytorch_lightning
  • optuna/integration/xgboost
  • optuna/integration/tfkeras
  • optuna/integration/chainer
  • ~optuna/structs~
  • optuna/samplers/tpe/sampler
  • optuna/samplers/random
  • optuna/exceptions

Issue Analytics

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

github_iconTop GitHub Comments

6reactions
keisuke-umezawacommented, Feb 23, 2020

I greped files which use .. code ::. I think it means we need to fix them.

  • optuna/visualization/parallel_coordinate
  • optuna/visualization/slice
  • optuna/visualization/intermediate_values
  • optuna/visualization/optimization_history
  • optuna/visualization/contour
  • optuna/logging
  • optuna/storages/rdb/storage
  • optuna/trial
  • optuna/pruners/successive_halving
  • optuna/pruners/nop
  • optuna/pruners/median
  • optuna/pruners/percentile
  • optuna/integration/cma
  • optuna/integration/lightgbm
  • optuna/integration/mxnet
  • optuna/integration/chainermn
  • optuna/integration/fastai
  • optuna/integration/keras
  • optuna/integration/pytorch_ignite
  • optuna/integration/tensorflow
  • optuna/integration/skopt
  • optuna/integration/pytorch_lightning
  • optuna/integration/xgboost
  • optuna/integration/tfkeras
  • optuna/integration/chainer
  • optuna/structs
  • optuna/samplers/tpe/sampler
  • optuna/samplers/random
  • optuna/exceptions

Also, I greped by >>>. Additionally above, we found the following files.

  • optuna/storages/rdb/storage
  • optuna/integration/sklearn
2reactions
nuka137commented, Feb 26, 2020

@g-votte @keisuke-umezawa

Thanks for listing up!

optuna/exceptions.py (#958) and optuna/trial.py (#882) are already merged. Could you mark them as completed? Also, doctest for optuna/structs is removed in this discussion.

I will tackle optuna/pruners/** next. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

doctest — Test interactive Python examples — Python 3.11.1 ...
Another simple application of doctest is testing interactive examples in a text file. This can be done with the testfile() function:.
Read more >
Python's doctest: Document and Test Your Code at Once
With doctest , you can execute test cases from your documentation, your dedicated test files, and the docstrings in your code files. In...
Read more >
doctest – Testing through documentation - PyMOTW
doctest lets you test your code by running examples embedded in the documentation and verifying that they produce the expected results.
Read more >
How To Write Doctests in Python - DigitalOcean
In a program, we can import and call the doctest module in our if __name__ == "__main__": clause at the bottom of our...
Read more >
How to run doctests — pytest documentation
By default, all files matching the test*.txt pattern will be run through the python standard doctest module. You can change the pattern by...
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