-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add python client Problem: we need to interact with the Flux Restful API from Python Solution: add a Python client! This includes tests, new documentation, and (TBA) a release on pypi. I am also adding further spell checking, tweaking some colors in the docs, and adding additional parameters to be provide to the flux job submit, including workdir, different node/ gpu / task params, envars, etc.. Signed-off-by: vsoch <[email protected]>
- Loading branch information
Showing
61 changed files
with
2,453 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Bug report | ||
about: Report a bug with flux restful API | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Version of action-updater** | ||
|
||
Anything else? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
name: Documentation or Tutorial Request | ||
about: What can we explain better, or what issue did you find? | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: Feature request | ||
about: Request a feature | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
name: Question | ||
about: What's on your mind? | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Test Python flux-restful-api | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
- gh-pages | ||
|
||
jobs: | ||
test-noauth: | ||
runs-on: ubuntu-latest | ||
services: | ||
api: | ||
image: ghcr.io/flux-framework/flux-restful-api:latest | ||
ports: | ||
- 5000:5000 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run tests without auth | ||
run: | | ||
cd clients/python | ||
pip install -e .[all] | ||
pytest -xs flux_restful_client/tests/test_api.py | ||
test-auth: | ||
runs-on: ubuntu-latest | ||
services: | ||
api: | ||
env: | ||
FLUX_USER: fluxuser | ||
FLUX_TOKEN: "12345" | ||
FLUX_REQUIRE_AUTH: true | ||
image: ghcr.io/flux-framework/flux-restful-api:latest | ||
ports: | ||
- 5000:5000 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run tests with auth | ||
run: | | ||
cd clients/python | ||
pip install -e .[all] | ||
export FLUX_USER=fluxuser | ||
export FLUX_TOKEN=12345 | ||
pytest -xs flux_restful_client/tests/test_api.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Flux RESTful API Clients | ||
|
||
These are clients to interact with the Flux RESTFul API! We | ||
keep them versioned alongside the Flux RESTFul API, the reason being | ||
that we want them to be updated in sync. This also mirrors | ||
the practice of the parent project [flux-core](https://github.com/flux-framework/flux-core). | ||
|
||
- [Python](python) | ||
- Go (coming soon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
bin/ | ||
lib/ | ||
flux_restful_client.egg-info/ | ||
env | ||
.env | ||
build | ||
release | ||
dist/ | ||
__pycache__ | ||
*.simg | ||
*.sif | ||
*.img | ||
/.eggs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# CHANGELOG | ||
|
||
This is a manually generated log to track changes to the repository for each release. | ||
Each section should include general headers such as **Implemented enhancements** | ||
and **Merged pull requests**. Critical items to know are: | ||
|
||
- renamed commands | ||
- deprecated / removed commands | ||
- changed defaults | ||
- backward incompatible changes (recipe file format? image file format?) | ||
- migration guidance (how to convert images?) | ||
- changed behaviour (recipe sections work differently) | ||
|
||
The versions coincide with releases on pip. Only major versions will be released as tags on Github. | ||
|
||
## [0.0.x](https://github.com/flux-framework/flux-restful-api/tree/main) (0.0.x) | ||
- Project skeleton release (0.0.0) |
Oops, something went wrong.