title: Readthedocs build ignores submodules when dependency requires authentication (ex: when python package requires Google Earth Engine)
body: <p>My package has Google Earth Engine's Python API (package name: ee) as a dependency. Using sphinx to auto-generate documentation (for ultimate storage on readthedocs) works locally, however all of the submodules which import ee do not build on readthedocs.com. The error messages in the build log indicate that this is because ee requires authentication, and readthedocs cannot authenticate it.</p>
  <p><strong>Question:</strong> Is there a way to save my own authentication token for readthedocs so that my documentation can build properly for all of my submodules? For example in my setup.py file or in my readthedocs.yaml or environment.yaml files? Or is there another workaround to host my locally built documentation without having readthedocs try to run the code itself?</p>
  <p><strong>In Summary:</strong></p>
  <p>Desired behavior: All of the submodules show their functions and documentation automatically.</p>
  <p>Actual behavior: Only the modules that don't import ee (currently waterpyk.calcs) have information in the docs, the rest are blank with titles only. I believe this is because ee requires authentication.</p>
  <p><strong>Reproducibility:</strong></p>
  <p>GitHub repo: <a href="https://github.com/erica-mccormick/waterpyk" rel="nofollow noreferrer">https://github.com/erica-mccormick/waterpyk</a></p>
  <p>Readthedocs webpage: <a href="https://waterpyk.readthedocs.io/en/latest/" rel="nofollow noreferrer">https://waterpyk.readthedocs.io/en/latest/</a></p>
  <p>Readthedocs build raw: <a href="https://readthedocs.org/api/v2/build/17058090.txt" rel="nofollow noreferrer">https://readthedocs.org/api/v2/build/17058090.txt</a></p>
  <p>For more information on ee's authentication, see here about the ee python installation:<a href="https://developers.google.com/earth-engine/guides/python_install" rel="nofollow noreferrer">https://developers.google.com/earth-engine/guides/python_install</a>. I am using conda for package management.</p>
  <p>Here is a sample of the error (it continues on after this, repeating. See the raw link above):</p>
  <pre><code>WARNING: autodoc: failed to import module 'main' from module 'waterpyk'; the following exception was raised:
  Traceback (most recent call last):
    File &quot;/home/docs/checkouts/readthedocs.org/user_builds/waterpyk/conda/latest/lib/python3.8/site-packages/ee/data.py&quot;, line 223, in get_persistent_credentials
      return Credentials(None, **oauth.get_credentials_arguments())
    File &quot;/home/docs/checkouts/readthedocs.org/user_builds/waterpyk/conda/latest/lib/python3.8/site-packages/ee/oauth.py&quot;, line 72, in get_credentials_arguments
      with open(get_credentials_path()) as creds:
  FileNotFoundError: [Errno 2] No such file or directory: '/home/docs/.config/earthengine/credentials'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/home/docs/checkouts/readthedocs.org/user_builds/waterpyk/conda/latest/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py&quot;, line 70, in import_module
      return importlib.import_module(modname)
    File &quot;/home/docs/checkouts/readthedocs.org/user_builds/waterpyk/conda/latest/lib/python3.8/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1014, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 991, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 975, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 671, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 843, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;/home/docs/checkouts/readthedocs.org/user_builds/waterpyk/checkouts/latest/waterpyk/main.py&quot;, line 4, in &lt;module&gt;
      ee.Initialize()
    File &quot;/home/docs/checkouts/readthedocs.org/user_builds/waterpyk/conda/latest/lib/python3.8/site-packages/ee/__init__.py&quot;, line 122, in Initialize
      credentials = data.get_persistent_credentials()
    File &quot;/home/docs/checkouts/readthedocs.org/user_builds/waterpyk/conda/latest/lib/python3.8/site-packages/ee/data.py&quot;, line 225, in get_persistent_credentials
      raise ee_exception.EEException(
  ee.ee_exception.EEException: Please authorize access to your Earth Engine account by running
  
  earthengine authenticate
  
  in your command line, and then retry.
  </code></pre>