Skip to content

Testing optional packages via ci.yml#42107

Draft
soehms wants to merge 11 commits into
sagemath:developfrom
soehms:test_optional_packages_via_uv_sync_ci
Draft

Testing optional packages via ci.yml#42107
soehms wants to merge 11 commits into
sagemath:developfrom
soehms:test_optional_packages_via_uv_sync_ci

Conversation

@soehms
Copy link
Copy Markdown
Member

@soehms soehms commented Apr 30, 2026

In #40105, an attempt was made to test the optional packages snappy, regina, and database_knotinfo using the GitHub workflow ci.yml. Unfortunately, this was not yet successful.

As per #40105 (comment), we are separating this issue from #40105 here.

This pull request is related to #42102, as it also enables testing of optional packages via CI. However, the goal here is different: to achieve better sustainability (see #40448 (comment)). On the other hand, the approach presented here may not be suitable for all optional packages.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • 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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Documentation preview for this PR (built with commit edcf60d; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@soehms
Copy link
Copy Markdown
Member Author

soehms commented Apr 30, 2026

@tobiasdiez, do you know what causes this linter error?

[project.optional-dependencies]
@@ -7,0 +7,1 @@
+R = ['rpy2 >=3.3']
@@ -7,10 +8,10 @@
database_knotinfo = ['database_knotinfo']
extra = [
  'igraph',
  'lrcalc ~=2.1; sys_platform != "win32"',
  #'p_group_cohomology >=3.3', # Only used in tests, not available on PyPI
  'pycosat >=0.6.3',
  'pynormaliz >=2.18; platform_machine != "aarch64" and platform_machine != "arm64"', # Not yet available for Linux aarch64
  'sage_numerical_backends_coin',
  'symengine >= 0.6.1', # Only used in tests
]
@@ -17,1 +18,0 @@
-R = ['rpy2 >=3.3']
@@ -18,7 +18,7 @@
ERROR operation failed error=some files were not properly formatted
regina = ['regina']
snappy = ['snappy']
#giac = ['sagemath_giac'] # Not yet available on PyPI (https://github.com/sagemath/sagemath-giac/issues/3)

There are other similar lines in pyproject.toml that resemble the ones I inserted. uv was also able to read them. I've already made a change as suggested by Copilote:

  1. Sorted the entries alphabetically for consistency: database_knotinfo, extra, R, regina, snappy
  2. Moved the commented giac entry to the end to keep related entries together

But this didn't help (as expected). Any ideas?

@tobiasdiez
Copy link
Copy Markdown
Contributor

If I understand the diff correctly, it wants to move the R = ... line to be the first in the block.

@soehms
Copy link
Copy Markdown
Member Author

soehms commented May 18, 2026

@tobiasdiez, if I follow your suggestion at #40105 (comment), I receive the following message:

error: Default group `snappy` (from `tool.uv.default-groups`) is not defined in the project's `dependency-groups` table

Consequently, I followed the suggestions of an AI to use the uv sync options --all-extras or (more specifically) --extra snappy --extra regina --extra database-knotinfo in the workflow.

I ran the corresponding jobs in my fork repository. The first attempt failed during the build at sage_numerical_backends_coin, and the second failed during one of the initial tests (inconsistently across the entire matrix; for example, at src/doc/de/a_tour_of_sage/index.rst for Fedora 41).

Note, however, that even without my change to ci.yml, not many tests were successful—as you can see from the unchanged job for MacOS 15.

@tobiasdiez
Copy link
Copy Markdown
Contributor

tobiasdiez commented May 30, 2026

Extra is of course the correct flag.

Those CI runs are sadly not in a very good shape when it comes to the tests. Hopefully the situation looks better after #42276 and #42229.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants