-
-
Notifications
You must be signed in to change notification settings - Fork 688
sage.features.topcom
#37858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
sage.features.topcom
#37858
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7212185
sage.features.topcom: New
mkoeppe cd2eb15
PointConfiguration._have_TOPCOM: Handle FeatureNotPresentError
mkoeppe aedbf61
src/doc/bootstrap: Only generate parts of src/doc/en/reference/spkg/i…
mkoeppe 21cc69a
src/doc/en/reference/spkg/index.rst: No longer auto-generated, use '.…
mkoeppe b2298a6
bootstrap: Do not put src/doc/en/reference/spkg/index.rst in the conf…
mkoeppe 1c6e248
bootstrap, Makefile (bootstrap-clean): Do not recurse into autodoc di…
mkoeppe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| .. _spkg: | ||
|
|
||
| Packages and Features | ||
| ===================== | ||
|
|
||
| Standard Packages | ||
| ----------------- | ||
|
|
||
| The Sage distribution includes most programs and libraries on which | ||
| Sage depends. It installs them automatically if it does not find | ||
| equivalent system packages. | ||
|
|
||
| .. include:: index_standard.rst | ||
|
|
||
|
|
||
| Optional Packages | ||
| ----------------- | ||
|
|
||
| For additional functionality, you can install some of the following | ||
| optional packages. | ||
|
|
||
| .. include:: index_optional.rst | ||
|
|
||
|
|
||
| Features | ||
| -------- | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| sage/features | ||
| sage/features/join_feature | ||
| sage/features/all | ||
| sage/features/sagemath | ||
| sage/features/pkg_systems | ||
| sage/features/bliss | ||
| sage/features/csdp | ||
| sage/features/databases | ||
| sage/features/dvipng | ||
| sage/features/ffmpeg | ||
| sage/features/four_ti_2 | ||
| sage/features/gap | ||
| sage/features/graph_generators | ||
| sage/features/graphviz | ||
| sage/features/imagemagick | ||
| sage/features/interfaces | ||
| sage/features/internet | ||
| sage/features/kenzo | ||
| sage/features/latex | ||
| sage/features/latte | ||
| sage/features/lrs | ||
| sage/features/mcqd | ||
| sage/features/meataxe | ||
| sage/features/mip_backends | ||
| sage/features/normaliz | ||
| sage/features/pandoc | ||
| sage/features/pdf2svg | ||
| sage/features/polymake | ||
| sage/features/rubiks | ||
| sage/features/tdlib | ||
| sage/features/topcom | ||
|
|
||
|
|
||
| Distribution Packages of the Sage Library | ||
| ----------------------------------------- | ||
|
|
||
| .. include:: index_sagemath.rst | ||
|
|
||
|
|
||
| Experimental Packages | ||
| --------------------- | ||
|
|
||
| Some packages that provide additional functionality are marked as | ||
| "experimental". Developers are needed in order to improve the | ||
| integration of these packages into the Sage distribution. | ||
|
|
||
| .. include:: index_experimental.rst | ||
|
|
||
|
|
||
| All External Packages | ||
| --------------------- | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| index_alph | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # sage_setup: distribution = sagemath-environment | ||
| r""" | ||
| Features for testing the presence of topcom executables | ||
| """ | ||
|
|
||
| # ***************************************************************************** | ||
| # Copyright (C) 2022-2024 Matthias Koeppe | ||
| # | ||
| # Distributed under the terms of the GNU General Public License (GPL) | ||
| # as published by the Free Software Foundation; either version 2 of | ||
| # the License, or (at your option) any later version. | ||
| # https://www.gnu.org/licenses/ | ||
| # ***************************************************************************** | ||
|
|
||
| from . import Executable | ||
| from .join_feature import JoinFeature | ||
|
|
||
|
|
||
| class TOPCOMExecutable(Executable): | ||
| r""" | ||
| A :class:`~sage.features.Feature` which checks for executables from the :ref:`TOPCOM <spkg_topcom>` package. | ||
|
|
||
| EXAMPLES:: | ||
|
|
||
| sage: from sage.features.topcom import TOPCOMExecutable | ||
| sage: TOPCOMExecutable('points2allfinetriangs').is_present() # optional - topcom | ||
| FeatureTestResult('topcom_points2allfinetriangs', True) | ||
| """ | ||
| def __init__(self, name): | ||
| r""" | ||
| TESTS:: | ||
|
|
||
| sage: from sage.features.topcom import TOPCOMExecutable | ||
| sage: isinstance(TOPCOMExecutable('points2finetriangs'), TOPCOMExecutable) | ||
| True | ||
| """ | ||
| Executable.__init__(self, name=f"topcom_{name}", | ||
| executable=name, | ||
| spkg="topcom") | ||
|
|
||
|
|
||
| class TOPCOM(JoinFeature): | ||
| r""" | ||
| A :class:`~sage.features.Feature` describing the presence of the executables | ||
| which comes as a part of :ref:`TOPCOM <spkg_topcom>`. | ||
|
|
||
| EXAMPLES:: | ||
|
|
||
| sage: from sage.features.topcom import TOPCOM | ||
| sage: TOPCOM().is_present() # optional - topcom | ||
| FeatureTestResult('topcom', True) | ||
| """ | ||
| def __init__(self): | ||
| r""" | ||
| TESTS:: | ||
|
|
||
| sage: from sage.features.topcom import TOPCOM | ||
| sage: isinstance(TOPCOM(), TOPCOM) | ||
| True | ||
| """ | ||
| JoinFeature.__init__(self, "topcom", | ||
| [TOPCOMExecutable(name) | ||
| for name in ('points2allfinetriangs',)]) | ||
|
|
||
|
|
||
| def all_features(): | ||
| return [TOPCOM()] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is the source of the "bug" Volker was experiencing.
Unlike previous
rm -rf src/doc/en/reference/spkg/*.rst, where the option-ris really ineffective, thefindcommand searches the directorysrc/doc/en/reference/spkgand its subdirectories, and removes all*.rstfiles. In particular the filesrc/doc/en/reference/spkg/sage/features.rstis removed.The file is in control of the doc builder and to be updated by it if necessary. Suppose that the file is created by the doc builder in other git branch. After switching to this PR branch,
./bootstrapremoves the file, but the doc builder still believes the file is intact, and the removed file is not recreated. Hence the boom.Incremental doc build mixed with switching git branches is inherently instable. But the changed behavior caused by this PR (the command in line 176) exacerbates the instability, as Volker could see through.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this detective work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Works well with me (that is, no more the bug for me).