sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 482 forks source link

Features for interpreter interfaces #32866

Closed mkoeppe closed 2 years ago

mkoeppe commented 3 years ago

Follow-up from #32649

CC: @kwankyu @seblabbe

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 944bb74

Reviewer: Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/32866

mkoeppe commented 3 years ago

Branch: u/mkoeppe/features_for_interpreter_interfaces

mkoeppe commented 3 years ago

New commits:

eaec400src/sage/features/interfaces.py: New
mkoeppe commented 3 years ago

Author: Matthias Koeppe, ...

mkoeppe commented 3 years ago

Commit: eaec400

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from eaec400 to 52ac51e

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

827ca03src/sage/features/interfaces.py: Fix and doctest exception handling
52ac51esrc/sage/features/interfaces.py (all_features): New
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 52ac51e to 8081f29

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

7754faesrc/sage/features/interfaces.py: Fix and doctest exception handling (fixup)
8081f29src/sage/doctest/external.py: Use sage.features.interfaces
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

945132bsrc/sage/features/interfaces.py: Fix up
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 8081f29 to 945132b

mkoeppe commented 3 years ago

Changed author from Matthias Koeppe, ... to Matthias Koeppe

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 945132b to 944bb74

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

944bb74src/sage/features/interfaces.py: Add doctests
seblabbe commented 2 years ago
comment:8

Looks good to me. Doctests pass. Patchbot is green. The coverage is not 100% because of few docstring missing in staticmethods __classcall__ but these are doctested in the doc of the the class just above. So, LGTM. I tested the functionnality. In particular, I get:

sage: from sage.features.interfaces import all_features
sage: [(f,f.is_present()) for f in all_features()]
[(Feature('magma'), FeatureTestResult('magma', False)),
 (Feature('matlab'), FeatureTestResult('matlab', False)),
 (Feature('mathematica'), FeatureTestResult('mathematica', False)),
 (Feature('maple'), FeatureTestResult('maple', False)),
 (Feature('macaulay2'), FeatureTestResult('macaulay2', False)),
 (Feature('octave'), FeatureTestResult('octave', True)),
 (Feature('scilab'), FeatureTestResult('scilab', False))]

which is sometimes True and sometimes False. Therefore, the routine works.

seblabbe commented 2 years ago

Reviewer: Sébastien Labbé

mkoeppe commented 2 years ago
comment:9

Thank you!

vbraun commented 2 years ago

Changed branch from u/mkoeppe/features_for_interpreter_interfaces to 944bb74