Opened 3 years ago

Closed 9 months ago

#27744 closed enhancement (fixed)

Make pynormaliz a Feature

Reported by: jipilab Owned by:
Priority: major Milestone: sage-9.5
Component: geometry Keywords: polytopes, normaliz
Cc: Winfried, jipilab, gh-sebasguts, mkoeppe, vdelecroix, gh-kliem, klee Merged in:
Authors: Matthias Koeppe Reviewers: Kwankyu Lee
Report Upstream: N/A Work issues:
Branch: 7632e53 (Commits, GitHub, GitLab) Commit: 7632e539cf7c7bfa15e8be3ed2cb7d6804d4ce27
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

As mentioned here: https://trac.sagemath.org/ticket/25091#comment:69

We place the PythonModule feature for pynormaliz, already used in sage.geometry.polyhedron, in sage.features.normaliz.

This is preparation for #32174/#30746.

Change History (20)

comment:1 follow-up: Changed 3 years ago by mkoeppe

You can just write

from sage.features import PythonModule
if PythonModule("PyNormaliz").is_present() ....

comment:2 in reply to: ↑ 1 Changed 3 years ago by jipilab

Replying to mkoeppe:

You can just write

from sage.features import PythonModule
if PythonModule("PyNormaliz").is_present() ....

Yes, that solves it for now. I thought, a long term goal is to do as was done for latte_int. Or I am mistaken?

comment:3 Changed 3 years ago by embray

  • Milestone sage-8.8 deleted

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

comment:4 Changed 23 months ago by mkoeppe

  • Dependencies set to #30647

comment:5 Changed 23 months ago by mkoeppe

  • Cc gh-kliem added
  • Description modified (diff)

See #30647 for a new idiom - lazy_import with feature - that could replace code like this:

        PythonModule("PyNormaliz", spkg="pynormaliz").require()
        import PyNormaliz

throughout backend_normaliz.py.

comment:6 Changed 23 months ago by gh-kliem

I do understand what is the goal of this ticket.

Do we want to make pynormaliz a standard package?

Or is this this new lazy import idiom better for python package that can also be installed via other sources (e.g. a pip install)?

comment:7 Changed 9 months ago by mkoeppe

  • Branch set to u/mkoeppe/make_pynormaliz_a_feature

comment:8 Changed 9 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Cc klee added
  • Commit set to 23f50092bf4af21742e834ef7b908102c85af4d8
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

23f5009sage.features.normaliz: New

comment:9 Changed 9 months ago by mkoeppe

  • Dependencies #30647 deleted

comment:10 Changed 9 months ago by klee

It seems that igraph should be PyNormaliz.

Other than this, it looks good to me.

comment:11 Changed 9 months ago by git

  • Commit changed from 23f50092bf4af21742e834ef7b908102c85af4d8 to 0b65b799ed5bc66fed7e1e39c1a07980a3a08616

Branch pushed to git repo; I updated commit sha1. New commits:

0b65b79src/sage/features/normaliz.py: Fix up

comment:12 Changed 9 months ago by git

  • Commit changed from 0b65b799ed5bc66fed7e1e39c1a07980a3a08616 to 00cb9c7fe2e9dacb1270d556e51b2a8e08bf92f4

Branch pushed to git repo; I updated commit sha1. New commits:

00cb9c7src/sage/features/normaliz.py: Rename class to PyNormaliz, fix uses

comment:13 Changed 9 months ago by mkoeppe

Another round of patchbot testing

comment:14 Changed 9 months ago by klee

You may remove PythonModule from

    from sage.features import FeatureNotPresentError, PythonModule     

comment:15 Changed 9 months ago by git

  • Commit changed from 00cb9c7fe2e9dacb1270d556e51b2a8e08bf92f4 to 7632e539cf7c7bfa15e8be3ed2cb7d6804d4ce27

Branch pushed to git repo; I updated commit sha1. New commits:

7632e53src/sage/geometry/polyhedron/base.py: Remove unused import

comment:16 Changed 9 months ago by mkoeppe

Thanks!

comment:17 Changed 9 months ago by klee

  • Reviewers set to Kwankyu Lee
  • Status changed from needs_review to positive_review

Green bot.

comment:18 Changed 9 months ago by mkoeppe

Thank you!

comment:19 Changed 9 months ago by klee

  • Milestone set to sage-9.5

comment:20 Changed 9 months ago by vbraun

  • Branch changed from u/mkoeppe/make_pynormaliz_a_feature to 7632e539cf7c7bfa15e8be3ed2cb7d6804d4ce27
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.