https://github.com/flux-framework/flux-python

Python bindings generator for flux-core

https://github.com/flux-framework/flux-python

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary

Keywords

bindings flux flux-framework hpc python
Last synced: 6 months ago · JSON representation

Repository

Python bindings generator for flux-core

Basic Info
Statistics
  • Stars: 2
  • Watchers: 11
  • Forks: 2
  • Open Issues: 3
  • Releases: 0
Topics
bindings flux flux-framework hpc python
Created almost 3 years ago · Last pushed 7 months ago
Metadata Files
Readme License

README.md

Flux Python Bindings

🐍️ You called me?

Hello! You've found the flux Python bindings, an experiment to build and deploy Flux to Pypi without needing to store code alongside Flux. The goal of this experiment is to test them separately. This was originally developed at vsoch/flux-python and has been ported here to automate more officially. The following guides might be useful to you:

Helper Install

If you don't want to figure out your flux version and install with pip directory (per instructions in manual install) we provide a helper script install-flux-python.sh that will:

  1. Determine that Flux and Python are installed with pip
  2. Parse the version of Flux on your PATH
  3. Derive the version and run the command for you!

You'll first want to make sure that flux is on your path, as is a python3 executable with pip installed as a module alongside it. And you can run it as follows:

bash wget https://raw.githubusercontent.com/flux-framework/flux-python/main/script/install-flux-python.sh chmod +x ./install-flux-python.sh ./install-flux-python.sh

If a version is missing on pypi or you otherwise have a bug, please open an issue here.

Manual Install

Since we need to link to Flux libraries, you are advised to install flux and flux-security in the same location that will be discovered via the executable "flux," so typically /usr or /usr/local. You will need wheel installed:

bash $ pip install wheel

You can do either:

```bash

Find the flux version on your system

flux --version

Install the bindings that match that version

pip install flux-python==0.48.0 ```

And if you are having trouble with the WCI cache, you can also wget the file directly from pypi and install the .tar.gz directly.

bash wget https://files.pythonhosted.org/packages/25/fb/02951d80e44a19db291f0e7370d4e7d82c0c1b17709a37913881f958dff7/flux-python-0.48.0rc0.tar.gz pip install flux-python-0.48.0rc0.tar.gz

If you install to a local (personal) location (e.g., $HOME/.local) you'll need to add this to your PYTHONPATH

```bash

The directory "flux" is under the site-packages here

export PYTHONPATH=$HOME/.local/lib/python3.7/site-packages ```

You can then do some basic testing.

bash $ flux start --test-size=4

Ensure your PYTHONPATH is correct here And import flux.

bash $ ipython python import flux flux.Flux()

Development

We provide a .devcontainer environment you can open in VSCode to have an environment ready to go with Flux (and Flux Security). You can follow the instructions in the DevContainer to build the Flux Python bindings. By default, this environment installs the latest flux-core. If you want to build a custom version with Flux core you can do:

bash rm -rf ~/flux-core export FLUX_VERSION=0.49.0 wget https://github.com/flux-framework/flux-core/releases/download/v${FLUX_VERSION}/flux-core-${FLUX_VERSION}.tar.gz tar -xzvf flux-core-${FLUX_VERSION}.tar.gz sudo mv flux-core-${FLUX_VERSION} ~/flux-core rm flux-core-${FLUX_VERSION}.tar.gz cd ~/flux-core ./configure --prefix=/usr make sudo make install

And then copy over the Python source to "flux" and build your custom archives and/or wheels:

```bash $ rm -rf /workspaces/flux-python/flux $ cp -R src/bindings/python/flux /workspaces/flux-python/flux $ cd /workspaces/flux-python

Archive

$ python3 setup.py sdist

Wheel (will build for the python version you've targeted)

This isn't currently being done but is a future TODO!

$ python3 setup.py sdist bdist_wheel ```

You can build versions of the Python wheels across 3.6 to 3.10 like:

```bash

only need to run this once in the container

/bin/bash ./docker/install-mamba.sh

And this to install the current Flux + version in setup.py as a wheel

The number is the build number

/bin/bash ./docker/build-wheels.sh 2 ```

And if you want to upload:

bash $ twine upload dist/*.tar.gz

Automation

In order to (eventually) support a workflow to check for a release, get the release's flux assets and build, we have a workflow script that will:

  • Get the latest flux releases
  • Compare to the latest pypi releases
  • If there is a new release (from Flux on GitHub) not in pypi, build and release

And the script also can take an optional version string that will find and build a version explicitly. You might (to test) do:

bash $ export GITHUB_TOKEN=xxxxxxxxxxxxx $ python .github/scripts/check_releases.py flux-framework --version 0.46.0

That basically checks if there should be a build. It will use the container provided here to install a custom version of flux core that builds the release.

Release

SPDX-License-Identifier: LGPL-3.0

LLNL-CODE-764420

Owner

  • Name: flux-framework
  • Login: flux-framework
  • Kind: organization

GitHub Events

Total
  • Issues event: 3
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 11
  • Push event: 18
  • Pull request review event: 1
  • Pull request event: 2
  • Fork event: 1
  • Create event: 1
Last Year
  • Issues event: 3
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 11
  • Push event: 18
  • Pull request review event: 1
  • Pull request event: 2
  • Fork event: 1
  • Create event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 22
  • Total Committers: 2
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.045
Past Year
  • Commits: 9
  • Committers: 2
  • Avg Commits per committer: 4.5
  • Development Distribution Score (DDS): 0.111
Top Committers
Name Email Commits
Vanessasaurus 8****h 21
Ian Lumsden l****n@g****m 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 4
  • Total pull requests: 11
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 16.25
  • Average comments per pull request: 0.0
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 2
  • Average time to close issues: 38 minutes
  • Average time to close pull requests: about 2 hours
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 4.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jwhite242 (2)
  • bryan-garcia (1)
  • ilumsden (1)
Pull Request Authors
  • vsoch (10)
  • ilumsden (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,060 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 40
  • Total maintainers: 1
pypi.org: flux-python

Python bindings for the flux resource manager API

  • Versions: 40
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,060 Last month
Rankings
Dependent packages count: 7.2%
Downloads: 20.7%
Forks count: 23.1%
Average: 25.0%
Dependent repos count: 34.8%
Stargazers count: 39.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/build-legacy-wheels.yaml actions
  • actions/checkout v3 composite
.github/workflows/build-legacy.yaml actions
  • actions/checkout v3 composite
.github/workflows/build-manual.yaml actions
  • actions/checkout v3 composite
.github/workflows/test-build.yaml actions
  • actions/checkout v3 composite
.devcontainer/Dockerfile docker
  • fluxrm/testenv focal build
Dockerfile docker
  • ubuntu 22.04 build
docker/Dockerfile docker
  • ubuntu 22.04 build
.github/scripts/requirements-dev.txt pypi
  • IPython * development
  • black * development
  • cffi >=1.1 development
  • docutils * development
  • jsonschema * development
  • pyyaml * development
requirements.txt pypi
  • cffi >=1.1
  • pyyaml *
setup.py pypi
  • cffi_dep ,