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

implement is_functional for LattE executable #38678

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

videlec
Copy link
Contributor

@videlec videlec commented Sep 19, 2024

Implement the method is_functional for the two LattE features count and integrate so that at least the problem from #38651 raises a meaningful error.

📝 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.

Copy link

github-actions bot commented Sep 19, 2024

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

@antonio-rojas
Copy link
Contributor

Looks like this is not enough to fix the issue, the count and integrate functions in sage/interfaces/latte.py need to explicitly test for Latte_count().is_present() and return an error if false.

@videlec
Copy link
Contributor Author

videlec commented Sep 19, 2024

Even better with Feature.require(). We now got

sage: P.integral_points_count()
Traceback (most recent call last):
...
FeatureNotPresentError: count is not available.
Call `count` failed with exit code 2
To install count using the arch package manager, you can try to run:
!sudo pacman -Sy 
  !sudo pacman -S latte-integrale
To install count using the Sage package manager, you can try to run:
  !sage -i latte_int
No equivalent system packages for pip are known to Sage.
Further installation instructions might be available at https://www.math.ucdavis.edu/~latte/software.php.

@antonio-rojas
Copy link
Contributor

Even better with Feature.require(). We now got

sage: P.integral_points_count()
Traceback (most recent call last):
...
FeatureNotPresentError: count is not available.
Call `count` failed with exit code 2
To install count using the arch package manager, you can try to run:
!sudo pacman -Sy 
  !sudo pacman -S latte-integrale
To install count using the Sage package manager, you can try to run:
  !sage -i latte_int
No equivalent system packages for pip are known to Sage.
Further installation instructions might be available at https://www.math.ucdavis.edu/~latte/software.php.

Nice, but the pacman part will only work if you're running sage from the distro (which is patched to use the modified executable names)

@antonio-rojas
Copy link
Contributor

The is_functional test doesn't work. The count command returns exit code 1, so CalledProcessError is always raised. Even count --help returns 1.

@videlec
Copy link
Contributor Author

videlec commented Sep 20, 2024

The is_functional test doesn't work. The count command returns exit code 1, so CalledProcessError is always raised. Even count --help returns 1.

That is very unfortunate...

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

Successfully merging this pull request may close these issues.

2 participants