{"action":"created","issue":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/236","labels_url":"https://api.github.com/repos/flux-framework/flux-core/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/flux-framework/flux-core/issues/236/comments","events_url":"https://api.github.com/repos/flux-framework/flux-core/issues/236/events","html_url":"https://github.com/flux-framework/flux-core/pull/236","id":91938673,"number":236,"title":"Python bindings, python module, etc.","user":{"login":"trws","id":660149,"avatar_url":"https://avatars.githubusercontent.com/u/660149?v=3","gravatar_id":"","url":"https://api.github.com/users/trws","html_url":"https://github.com/trws","followers_url":"https://api.github.com/users/trws/followers","following_url":"https://api.github.com/users/trws/following{/other_user}","gists_url":"https://api.github.com/users/trws/gists{/gist_id}","starred_url":"https://api.github.com/users/trws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trws/subscriptions","organizations_url":"https://api.github.com/users/trws/orgs","repos_url":"https://api.github.com/users/trws/repos","events_url":"https://api.github.com/users/trws/events{/privacy}","received_events_url":"https://api.github.com/users/trws/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flux-framework/flux-core/labels/review","name":"review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/flux-framework/flux-core/milestones/2","html_url":"https://github.com/flux-framework/flux-core/milestones/Flux%20in-job%20scheduling%20tool%20-%20minimal","labels_url":"https://api.github.com/repos/flux-framework/flux-core/milestones/2/labels","id":1086398,"number":2,"title":"Flux in-job scheduling tool - minimal","description":"This aggregates the issues necessary to get flux to the point that it can be used as a scheduler inside an allocation from an outer resource manager such as SLURM or Torque.  It should be the first published test release for flux as a hierarchical resource manager for a single user on a relatively small scale.","creator":{"login":"trws","id":660149,"avatar_url":"https://avatars.githubusercontent.com/u/660149?v=3","gravatar_id":"","url":"https://api.github.com/users/trws","html_url":"https://github.com/trws","followers_url":"https://api.github.com/users/trws/followers","following_url":"https://api.github.com/users/trws/following{/other_user}","gists_url":"https://api.github.com/users/trws/gists{/gist_id}","starred_url":"https://api.github.com/users/trws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trws/subscriptions","organizations_url":"https://api.github.com/users/trws/orgs","repos_url":"https://api.github.com/users/trws/repos","events_url":"https://api.github.com/users/trws/events{/privacy}","received_events_url":"https://api.github.com/users/trws/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":2,"state":"open","created_at":"2015-04-27T22:59:02Z","updated_at":"2015-07-15T17:36:29Z","due_on":null,"closed_at":null},"comments":34,"created_at":"2015-06-30T00:00:53Z","updated_at":"2015-07-15T21:38:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/flux-framework/flux-core/pulls/236","html_url":"https://github.com/flux-framework/flux-core/pull/236","diff_url":"https://github.com/flux-framework/flux-core/pull/236.diff","patch_url":"https://github.com/flux-framework/flux-core/pull/236.patch"},"body":"So, this has ended up being a pretty humongous patch apparently.  Here's the summary.\r\n\r\nPython bindings now live in `src/bindings/python`.  The `make_bindings.py` script scrapes header files, no parsing, just comment and directive removal and following only `\"` includes, to create scripts that use cffi to generate C-based python binding modules.  Because of this, every single externally visible function in our header files is explicitly linked to by the python bindings.  That's why some of the header file changes were made, a couple of functions were misspelled, or didn't exist, and only broke when the python bindings tried to link to them, so this ends up being a lint for the headers in an odd kind of way.\r\n\r\nAnyway, the extension modules are then wrapped by python modules in the `flux` package.  All of the bindings are in pure python, and most of them have been wrapped so they're reasonably usable.  Those that haven't can be called directly from python just by circumventing the high-level bindings, for example the `flux_event_subscribe()` function has no binding, but `f.event_subscribe(\"evt\")` works, because the wrapper searches the library, finds the definition, and wraps the c primitives to accept and return python types.  It also converts the setting of errno to non-zero into `EnvironmentError` exceptions, so no errors that use the normal flux conventions can slip by.\r\n\r\nThe `pymod` module can load arbitrary python modules as flux modules, there's an example echo module that implements mecho's functionality in the directory with it.\r\n\r\nTests are in two forms, ones that need a flux wrapping them and ones that do not.  The `test/` directory has the former, `test_commands/` the latter.  Now that `sideflux.py` can run an external flux and connect to it based on its `FLUX_TMPDIR` these can be merged, but that's not done yet.  All tests use the python unittest module as an execution framework, and `pycotap` to highjack its reporting and replace it with TAP.\r\n\r\nThe python support requires python 2.7 and the cffi module, and is on by default for now, but can be disabled with the usual `--disable-python` flag to configure.\r\n\r\nAlso there are some patches to module loading for error reporting and a couple of other places that were tweaked for debugability."},"comment":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/comments/121757823","html_url":"https://github.com/flux-framework/flux-core/pull/236#issuecomment-121757823","issue_url":"https://api.github.com/repos/flux-framework/flux-core/issues/236","id":121757823,"user":{"login":"grondo","id":741970,"avatar_url":"https://avatars.githubusercontent.com/u/741970?v=3","gravatar_id":"","url":"https://api.github.com/users/grondo","html_url":"https://github.com/grondo","followers_url":"https://api.github.com/users/grondo/followers","following_url":"https://api.github.com/users/grondo/following{/other_user}","gists_url":"https://api.github.com/users/grondo/gists{/gist_id}","starred_url":"https://api.github.com/users/grondo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grondo/subscriptions","organizations_url":"https://api.github.com/users/grondo/orgs","repos_url":"https://api.github.com/users/grondo/repos","events_url":"https://api.github.com/users/grondo/events{/privacy}","received_events_url":"https://api.github.com/users/grondo/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T21:38:06Z","updated_at":"2015-07-15T21:38:06Z","body":"> The travis build passes all tests but one:\r\n> Is it possible this is timing out?\r\n\r\nProbably not timing out (timeout will either print an error or travis timeout will run down) but some other unexpected condition from the test. I can pull your branch and run the tests with debug to get somewhere on this (likely a test bug though)"}}