From 8b9e50e153f1cbab600c2d42794c92e8d87ee0ac Mon Sep 17 00:00:00 2001 From: ptresson <paul.tresson@ird.fr> Date: Wed, 23 Oct 2024 16:27:21 +0200 Subject: [PATCH] update doc config --- .readthedocs.yaml | 5 ++++- docs/environment.yml | 10 ++++++++++ docs/source/Tutorials.rst | 22 +--------------------- docs/source/conf.py | 16 ++++++++++++++-- 4 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 docs/environment.yml diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 0d497fa..e140a8f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,8 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "mambaforge-22.9" + # python: "3.12" # You can also specify other tool versions: # nodejs: "19" # rust: "1.64" @@ -30,3 +31,5 @@ sphinx: # python: # install: # - requirements: docs/requirements.txt + conda: + environment: docs/environment.yml diff --git a/docs/environment.yml b/docs/environment.yml new file mode 100644 index 0000000..d5750b9 --- /dev/null +++ b/docs/environment.yml @@ -0,0 +1,10 @@ +name: iamap +channels: + - conda-forge + +dependencies: + - python + - myst-parser + - pip: + - pydata-sphynx-theme + - sphynx_favicon diff --git a/docs/source/Tutorials.rst b/docs/source/Tutorials.rst index 2761ace..e15bd8a 100644 --- a/docs/source/Tutorials.rst +++ b/docs/source/Tutorials.rst @@ -58,33 +58,13 @@ Keep in mind that the more points you place the better the results will be. - - -Using a new encoder --------------------- -If you use Windows and you want to use a new encoder, you first need to create it in the OSGEO4W shell. -For that, you can open OSGEO4W shell and run the following commands (assuming that "name" is the name of your encoder of choice) : -:: - python - import timm - #print(timm.__version__) if you want to see which timm version you are currently using - model = timm.create_model(name, pretrained=True) - print(model) #to verify it was indeed created - exit() - -After those lines of code you should be able to use the new model by going into the "backbone choice" option in the encoder interface and typing -the name of the model you want to use. - -As timm is a library regularly updated, be sure that the version you use is compatible with the model you want to use. - - - Changing the parameters of the Random Forest ----------------------------------------------- If you want to change the parameters of the random forest (such as the random state, number of trees, etc...), go to the random_forest.py file of this plugin. You can then go to the line 278 and 292 of this code which should look this : :: + rf_classifier = RandomForestClassifier(n_estimators=100, min_samples_split=4, random_state=42) You can then change the parameters of the random forest freely. Please make sure to use the same parameters in both of those two lines of code diff --git a/docs/source/conf.py b/docs/source/conf.py index d959a48..6153eac 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,16 +14,28 @@ release = '0.5.9' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = [] +import pydata_sphinx_theme + +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + "myst_parser", + "sphinx_favicon", +] templates_path = ['_templates'] exclude_patterns = [] +source_suffix = { + '.rst': 'restructuredtext', + '.md': 'markdown', +} # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'classic' +html_theme = 'pydata_sphinx_theme' html_static_path = ['_static'] +html_favicon = "./../../icons/encoder_tool.svg" -- GitLab