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

Create a variant of the polymake interface using polymake's callable library (polymake::Main) via JuPyMake #22704

Closed
mkoeppe opened this issue Mar 28, 2017 · 83 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 28, 2017

Following up on #22452 (Create a Polymake pexpect interface):

As suggested by Gawrilow in https://forum.polymake.org/viewtopic.php?f=8&t=544, we could create a variant of the polymake pexpect interface that does not go through pty's but rather replaces the relevant send/receive methods of pexpect by calls to simulate_shell_input (linking to libpolymake).

Recent polymake versions have developed this further and now provide a class polymake::Main with convenient access to the polymake interpreter. We use the (partial) Python bindings for this, https://github.com/polymake/JuPyMake which are used for Polymake's jupyter.

Upstream package:

  wget -P upstream https://files.pythonhosted.org/packages/32/dd/0a48546daa2461e57207d31eeb64a3ad77fd9fb339d90e1e067ea25991a5/JuPyMake-0.9.tar.gz

We do want to keep the current pty-based pexpect interface, though, because it may be handy for running polymake on a remote server; or for guarding against a crashing polymake (sigh).

Remaining issue: #27807

See also: #22710: Meta-ticket: polymake

Depends on #24905

Upstream: Reported upstream. No feedback yet.

CC: @simon-king-jena @jplab @sophiasage @LaisRast @kliem @sebasguts @videlec @tscrim

Component: interfaces

Keywords: days84

Author: Matthias Koeppe

Branch: 8d9e2c2

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/22704

@mkoeppe mkoeppe added this to the sage-8.0 milestone Mar 28, 2017
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 30, 2017

Dependencies: #22452

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Create a variant of the polymake pexpect interface using polymake's simulate_shell_input Create a variant of the polymake pexpect interface using polymake's simulate_shell_input / JuPyMake Sep 21, 2018
@mkoeppe mkoeppe modified the milestones: sage-8.0, sage-8.4 Sep 21, 2018
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 21, 2018

Changed dependencies from #22452 to #22452, #26333

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 27, 2019

Branch: public/22704

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 27, 2019

comment:5

Here's a first version.


Last 10 new commits:

7018013polymake doctest: Mark a doctest random that depends on installed packages
78c10fbPolymake._tab_completion: Fix for new apropos format in Polymake 3.4
1699019Doctest fix for polymake 3.4: false/true instead of 0/1
f595909Doctest fix for polymake 3.4: Use different function from the tropical application
76701f6Doctest fix for polymake 3.4: Differences in available properties
83b51dePolymake 3.4: Fix for typeof small objects
8510124Polymake: Remove copy/paste error handling for code that cannot raise
3c6ae95polymake: Make normaliz a dependency
b6eeaa1polymake: Add a patch to polymake's libnormaliz configure
2f855b0Refactor interface Polymake through PolymakeAbstract, add PolymakeJuPyMake

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 27, 2019

Commit: 2f855b0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

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

78b5036More doctests etc.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

Changed commit from 2f855b0 to 78b5036

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

Changed commit from 78b5036 to 92274e0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

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

92274e0Add package jupymake

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 27, 2019

comment:10

Some polymake errors are not properly signalled by Polymake: Only the stderr slot [2] is filled but the error slot [3] is empty

sage: from JuPyMake import ExecuteCommand
sage: ExecuteCommand('help("Triangulation");')
(True, '', "polymake:  ERROR: unknown help topic 'Triangulation'\n", '')

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

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

b40a1cbNo need for File::Slurp in jupymake interface
6bd4971Add doc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

Changed commit from 92274e0 to 6bd4971

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

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

0bad10cFix jupymake help

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

Changed commit from 6bd4971 to 0bad10c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

Changed commit from 0bad10c to 6708663

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

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

624ac01polymake: Also provide core functions
6708663Merge branch 't/24905/public/upgrade_polymake_to_version_3_2r4' into t/22704/public/22704

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

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

a5c8eb8Add optional - polymake
ad2b976Can only quit polymake in pexpect interface
7ec6c74Mark jupymake tests optional - jupymake
8b7ffbdSelect polymake interface based on feature test
a614876Fixup polymake doctests that depend on 'used package' messages

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 27, 2019

Changed commit from 6708663 to a614876

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 9, 2019

comment:46

The lrslib 070 update (#27745) is too much work for today. Instead I configure lrslib with LRS_QUIET (#27805).

@dimpase
Copy link
Member

dimpase commented May 9, 2019

Changed dependencies from #24905, #27803, #27805 to #24905

@dimpase
Copy link
Member

dimpase commented May 9, 2019

comment:47

OK, this is fixed by #27805 indeed.


New commits:

2eda6e1polymake: add to fedora instructions
5916141Fix polymake lrslib detection
086bb2dMerge branch 't/27803/public/27803-polymake-lrslib-detection' into t/22704/public/22704
1b47911Configure lrslib with LRS_QUIET
c84d89dMerge branch 't/27805/configure_lrslib_with_lrs_quiet' into t/22704/public/22704

@dimpase
Copy link
Member

dimpase commented May 9, 2019

Reviewer: Dima Pasechnik

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 9, 2019

comment:48

I've put the remaining minor issue to a follow-up ticket, #27807 (Polymake-jupymake interface: Fix polymake's error handling in Shell::Mock)

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 9, 2019

comment:49

Should I make that last failing doctest less specific regarding the error message for this ticket? (Before it's fixed fully in #27807)

@dimpase
Copy link
Member

dimpase commented May 9, 2019

comment:50

If you like, you can tag it "known error".

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 9, 2019

Changed commit from c84d89d to 58aa1ad

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 9, 2019

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

58aa1adMark issue of #27807 as known bug

@vbraun
Copy link
Member

vbraun commented May 11, 2019

comment:53

Merge conflict

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2019

Changed commit from 58aa1ad to 8d9e2c2

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2019

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

8d9e2c2Merge tag '8.8.beta5' into t/22704/public/22704

@vbraun
Copy link
Member

vbraun commented May 14, 2019

Changed branch from public/22704 to 8d9e2c2

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 21, 2019

comment:57

The upstream package jupymake seems to be missing on the sage mirrors

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 21, 2019

Changed commit from 8d9e2c2 to none

@jplab
Copy link
Contributor

jplab commented Jul 28, 2019

comment:58

Do I understand correctly that in the current version jupymake is necessary for polymake to function properly? Shouldn't jupymake become a dependancy of polymake?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 29, 2019

comment:59

Replying to @jplab:

Do I understand correctly that in the current version jupymake is necessary for polymake to function properly? Shouldn't jupymake become a dependancy of polymake?

No, there are two interface classes, which both work. PolymakeExpect (aliases to Polymake) and PolymakeJupyMake.
Depending on whether you have jupymake, polymake is set to an instance of one or the other.

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

4 participants