Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/user/config-file/v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,12 @@ You can use several interpreters and versions, from CPython, Miniconda, and Mamb
- ``miniconda3-3.12-24.1``
- ``miniconda3-3.12-24.9``
- ``miniconda-latest`` (alias for the latest version available on Read the Docs)
- ``mambaforge-4.10``
- ``mambaforge-22.9``
- ``mambaforge-23.11``
- ``mambaforge-latest`` (alias for the latest version available on Read the Docs)
- ``mambaforge-4.10`` (deprecated)
- ``mambaforge-22.9`` (deprecated)
- ``mambaforge-23.11`` (deprecated)
- ``mambaforge-latest`` (deprecated - alias for the latest version available on Read the Docs)
- ``miniforge3-25.11``
- ``miniforge3-latest`` (alias for the latest version available on Read the Docs)

build.tools.nodejs
``````````````````
Expand Down
2 changes: 2 additions & 0 deletions readthedocs/builds/constants_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"mambaforge-4.10": "mambaforge-4.10.3-10",
"mambaforge-22.9": "mambaforge-22.9.0-3",
"mambaforge-23.11": "mambaforge-23.11.0-0",
"miniforge3-25.11": "miniforge3-25.11.0-1",
},
"nodejs": {
"14": "14.21.3",
Expand Down Expand Up @@ -98,6 +99,7 @@
_TOOLS["python"]["latest"] = _TOOLS["python"]["3"]
_TOOLS["python"]["miniconda-latest"] = _TOOLS["python"]["miniconda3-3.12-24.9"]
_TOOLS["python"]["mambaforge-latest"] = _TOOLS["python"]["mambaforge-23.11"]
_TOOLS["python"]["miniforge3-latest"] = _TOOLS["python"]["miniforge3-25.11"]
_TOOLS["nodejs"]["latest"] = _TOOLS["nodejs"]["24"]
_TOOLS["ruby"]["latest"] = _TOOLS["ruby"]["3.4"]
_TOOLS["rust"]["latest"] = _TOOLS["rust"]["1.91"]
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def python_interpreter(self):
tool = self.build.tools.get("python")
if tool and tool.version.startswith("mamba"):
return "mamba"
if tool and tool.version.startswith("miniconda"):
if tool and (tool.version.startswith("miniconda") or tool.version.startswith("miniforge")):
return "conda"
if tool:
return "python"
Expand Down
50 changes: 50 additions & 0 deletions readthedocs/config/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,56 @@ def test_conda_key_not_required_for_conda_mamba_when_build_commands(self):
with does_not_raise(ConfigError):
build.validate()

def test_conda_key_required_for_miniforge3(self):
build = get_build_config(
{
"build": {
"os": "ubuntu-22.04",
"tools": {
"python": "miniforge3-25.11",
},
},
}
)
with raises(ConfigError) as excinfo:
build.validate()
assert excinfo.value.message_id == ConfigError.CONDA_KEY_REQUIRED
assert excinfo.value.format_values.get("key") == "conda"

def test_conda_key_not_required_for_miniforge3_when_build_commands(self):
build = get_build_config(
{
"build": {
"os": "ubuntu-22.04",
"tools": {
"python": "miniforge3-25.11",
},
"commands": [
"conda env create --file environment.yml",
],
},
}
)
with does_not_raise(ConfigError):
build.validate()

def test_miniforge3_python_interpreter(self):
build = get_build_config(
{
"build": {
"os": "ubuntu-22.04",
"tools": {
"python": "miniforge3-25.11",
},
},
"conda": {
"environment": "environment.yml",
},
},
)
build.validate()
assert build.python_interpreter == "conda"

@pytest.mark.parametrize("value", [3, [], "invalid"])
def test_conda_check_invalid_value(self, value):
build = get_build_config({"conda": value})
Expand Down
4 changes: 3 additions & 1 deletion readthedocs/rtd_tests/fixtures/spec/v2/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@
"mambaforge-4.10",
"mambaforge-22.9",
"mambaforge-23.11",
"mambaforge-latest"
"mambaforge-latest",
"miniforge3-25.11",
"miniforge3-latest"
]
},
"nodejs": {
Expand Down