Skip to content
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

Add missing Features for optional and experimental SPKGs #35856

Open
11 of 32 tasks
soehms opened this issue Jun 29, 2023 · 3 comments
Open
11 of 32 tasks

Add missing Features for optional and experimental SPKGs #35856

soehms opened this issue Jun 29, 2023 · 3 comments

Comments

@soehms
Copy link
Member

soehms commented Jun 29, 2023

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Problem Description

According to #35820 (comment) this is needed to eliminate the use of sage.misc.packages from the doctester.

Proposed Solution

Here are the lists we should work through:

A. Optional

    • biopython
    • cunningham_tables
    • cylp
    • database_kohel
    • database_mutation_class
    • database_odlyzko_zeta
    • database_stein_watkins
    • database_symbolic_data
    • frobby
    • p_group_cohomology
    • pari_elldata
    • pari_galpol
    • pari_seadata
    • pyscipopt
    • snappy

B. Experimental

    • gap3
    • lie
    • qepcad
    • symengine_py

C. Standard

These standard packages still have optional tags which should be removed changed to # needs tags (– mkoeppe):

    • beautifulsoup4

Alternatives Considered

The purpose of this issue is to track the progress on this task (similar to a Trac Meta-Ticket).

Related PR and issues

Additional Information

The above list of packages has been detected by the following script:

from sage.misc.package import  list_packages
from sage.features.all import all_features
from sage.env import SAGE_SRC
from os import environ, chdir, path
from subprocess import check_output, CalledProcessError
import re


pwd = environ['PWD']

spkgs = list_packages(local=True)

sl = set([k for k, v in spkgs.items() if v.type == 'standard'])
ol = set([k for k, v in spkgs.items() if v.type == 'optional'])
el = set([k for k, v in spkgs.items() if v.type == 'experimental'])

af_list = list(all_features())
af_spkg = set([f.spkg for f in af_list if f.spkg is not None])
af_name = set([f.name for f in af_list])
af = af_spkg.union(af_name)
af.add('gap_packages') # manually added since no individual instance of GapPackage is in the af_list

sl_minus_af = sl.difference(af)
ol_minus_af = ol.difference(af)
el_minus_af = el.difference(af)

sage_src = path.join(SAGE_SRC, 'sage')
chdir(sage_src)

def test_doctest_tag(spkg_name):
    cmd = 'git grep \\#[\\ ]*optional.*%s | grep -v "doctest/" | grep -v "tests/cmdline"' % spkg_name
    try:
        res = check_output(cmd, shell=True).decode()
        if re.match(r'^[^\n]*#[\s]+optional[^\n]*[\s]%s[\s,\n]' % spkg_name, res) is None:
            return False
        return True
    except CalledProcessError:
        pass
    return False

missing_standard_features = sorted([f for f in sl_minus_af if test_doctest_tag(f)])
missing_optional_features = sorted([f for f in ol_minus_af if test_doctest_tag(f)])
missing_experimental_features = sorted([f for f in el_minus_af if test_doctest_tag(f)])

chdir(pwd)

print('missing_standard_features', missing_standard_features)
print('missing_optional_features', missing_optional_features)
print('missing_experimental_features', missing_experimental_features)
@soehms
Copy link
Member Author

soehms commented Jun 29, 2023

For a start I would take the databases, mathics, snappy and gap3.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 29, 2023

@soehms
Copy link
Member Author

soehms commented Jul 3, 2023

For reference, here are a few related issues ...

Thanks! I added these to the header.

vbraun pushed a commit to vbraun/sage that referenced this issue Jun 12, 2024
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Part of sagemath#35856

We also change how the SPKG index in the reference manual is generated.
`index.rst` is now a static file that uses `.. include` directives to
read in generated files `index_standard.rst`, `index_optional.rst`, etc.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

URL: sagemath#37858
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
@mkoeppe mkoeppe changed the title Add missing features for optional and experimental SPKGs Add missing Features for optional and experimental SPKGs Jun 18, 2024
vbraun pushed a commit to vbraun/sage that referenced this issue Jul 20, 2024
sagemathgh-37858: `sage.features.topcom`
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Part of sagemath#35856

We also change how the SPKG index in the reference manual is generated.
`index.rst` is now a static file that uses `.. include` directives to
read in generated files `index_standard.rst`, `index_optional.rst`, etc.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#37858
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Jul 20, 2024
sagemathgh-38239: `sage.features.sat`
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Part of:
- sagemath#35856

To be done in a follow-up:
- Actually use `Executable.absolute_filename` when invoking the Dimacs
solvers.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38239
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Sébastien Labbé
@mkoeppe mkoeppe added this to the sage-10.5 milestone Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants