diff --git a/docs/README.md b/docs/README.md index 9a1819e33a..acfa2d0be0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -349,6 +349,13 @@ You will first need to run the following command (from the root of the repositor python utils/prepare_for_doc_test.py src docs ``` +If you work on a specific python module, say `modeling_wav2vec2.py`, you can run the command as follows (to avoid the unnecessary temporary changes in irrelevant files): + +```bash +python utils/prepare_for_doc_test.py src/transformers/utils/doc.py src/transformers/models/wav2vec2/modeling_wav2vec2.py +``` +(`utils/doc.py` should always be included) + Then you can run all the tests in the docstrings of a given file with the following command, here is how we test the modeling file of Wav2Vec2 for instance: ```bash