-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
sage.doctest.control: Replace use of sage.misc.package.list_packages #30746
Comments
comment:1
How do distributions handle this currently? |
This comment has been minimized.
This comment has been minimized.
comment:3
I'm patching it out completely so tests depending on optional packages are skipped unless explicitely specified in the |
comment:4
Replying to @mkoeppe:
I don't know about others but I do it badly. The current stuff allow some autodetection of what is installed by the sage package management system. That was not always the case. I remove the autodetection bits and add anything I want to test manually when running |
This comment has been minimized.
This comment has been minimized.
comment:7
(wrong ticket) |
Changed branch from u/mkoeppe/sage_doctest_control__replace_use_of_sage_misc_package_list_packages to none |
Changed keywords from none to sd111 |
comment:9
Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111 |
comment:10
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
This comment has been minimized.
This comment has been minimized.
Dependencies: #20879 |
comment:14
Why the dependency on #20879? I am assuming this is a typo or the wrong ticket. |
comment:15
Yes, wrong ticket, I meant #30887. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:22
I'm just seeing this now after wondering why sage keeps searching my system for random broken programs to try to use. Runtime detection of these things will not be a good long-term approach:
As an alternative, you can imagine a shared location where "features" record their existence (think pkg-config). The simplest implementation might be to create a file named after the feature to indicate that the feature is present. Optional packages would touch Depending on the scenario, this essentially runs the "feature check" either once or never, as The file-based implementation here is not well-thought-out and probably has flaws, but it's also not what's important. What is is that the features should respect the user/distro configuration, not waste too many resources, not cause surprises, and not require any unnecessary duplication (i.e. work). Moving towards runtime-only detection is IMHO moving backwards. |
comment:23
+1 on a mechanism for statically declaring features present/not present, for use by downstream distributions. They could be provided through -1 on defining file system stuff, config files, etc. |
comment:24
Replying to @orlitzky:
A more positive perspective on that would be that eventually, when we can assume that there is an at least mildly usable python3 available at |
comment:25
Replying to @mkoeppe:
With sleep comes clarity. Instead of something like pkg-config, why don't we literally use pkg-config for this? To each feature, associate
Maybe in some cases, but in general we aren't going to be able to easily replace well-tested autoconf macros with hand-written python. Consequently we'll wind up with the same machinery implemented in two different places in two different languages. |
comment:26
Replying to @orlitzky:
The trickiest |
comment:27
A possible solution could be to go through #31277. |
... by features.
This is so that users can make use of doctests conditionalized with "# optional" in their Sage programs even on distribution-packaged Sage installations, or for optional packages with
spkg-configure.m4
(as observed in #30887 comment:28)After #30887, #32614, #32649 a
Feature
has aname
attribute that can be used as the# optional
tag for doctesting.#32174 implements global
Feature
discovery and hooks it intosage.doctest.control
.It remains to define
Feature
s for all remaining SPKGs that appear in# optional
tags somewhere in the Sage library (which can be found usinggit grep -l '# *optional' | xargs sed -E -n 's/^.*# *optional[ -:]*([a-zA-Z_0-9.]*).*/\1/gp' | sort -u
). Then we can remove the use ofsage.misc.package
.Related:
sage.doctest.control, sage_setup: Do not check versions of installed packages #30848
sage.doctest.control
,sage_setup
: Do not check versions of installed packagesDepends on: Add missing
Feature
s for optional and experimental SPKGs #35856CC: @antonio-rojas @kiwifb @simon-king-jena @dimpase @jhpalmieri @kliem @tscrim @kwankyu @orlitzky
Component: doctest framework
Keywords: sd111
Issue created by migration from https://trac.sagemath.org/ticket/30746
The text was updated successfully, but these errors were encountered: