Skip to content

Commit 3a0e281

Browse files
committed
add jobs story in public domain
1 parent 2b655d0 commit 3a0e281

File tree

20 files changed

+375
-236
lines changed

20 files changed

+375
-236
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,6 @@ notebooks/
146146
# not need to add / in symlink
147147
.nbx
148148
ex_jobs
149-
scripts
149+
scripts
150+
.nboxignore
151+
stories/requirements.txt

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,32 @@ Version](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%2
66

77
## 🧐 What is Nbox?
88

9-
`nbox` provides first class API support for all NimbleBox.ai infrastructure (NBX-Build, Jobs, Deploy) and services (NBX-Workspaces) components. Write jobs using `nbox.Operators`
9+
`nbox` provides first class CLI + python package support for all NimbleBox infrastructure and services. You can
1010

11-
## Installation
1211

1312
```bash
1413
# on macos find the correct wheel file based on python version: https://github.com/pietrodn/grpcio-mac-arm-build/releases/tag/1.51.1
1514
pip install <wheel_url>
16-
pip install nbox
1715

18-
# on linux
1916
pip install nbox
2017
```
2118

19+
Next you need to authenticate yourself with the CLI:
20+
21+
```bash
22+
nbx login
23+
```
24+
2225
# Stability and Compatibility
2326

2427
Status: The library is currently undergoing heavy development.
2528

26-
☝️ Important Note: Current major version is zero (v0.x.x) to accommodate rapid development and fast iteration while getting early feedback from users (feedback on APIs are appreciated!). **The public API need not change** without a major version update before v1.0.0 release.
29+
- `nbx projects`:
30+
- `nbx projects - artifacts --help` stable ✅
31+
- `nbx projects - run --help` stable ✅
32+
- `nbx jobs --help`: mostly stable 🟡
33+
- `nbx serve --help`: mostly stable 🟡
34+
2735

2836
# 🤷Why NimbleBox
2937

nbox/cli.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from nbox.version import __version__ as V
3131
from nbox.projects import Project
3232
from nbox.utils import logger, lo
33-
from nbox.plugins.base import PluginCLI
33+
# from nbox.plugins.base import PluginCLI
3434

3535
# from nbox.jobs import Job, Serve
3636
from nbox.jd_core import JobsCli, ServeCli
@@ -180,16 +180,13 @@ def main():
180180
"build" : Instance,
181181
"config" : Config,
182182
"get" : get,
183-
# "jobs" : Job,
184183
"jobs" : JobsCli,
185-
# "lmao" : LmaoCLI,
186184
"lmao" : Lmaov4CLI,
187185
"login" : login,
188186
"open" : open_home,
189-
"plugins" : PluginCLI,
187+
# "plugins" : PluginCLI,
190188
"projects" : Project,
191189
"relics" : Relics,
192-
# "serve" : Serve,
193190
"serve" : ServeCli,
194191
"tunnel" : tunnel,
195192
"version" : version,

nbox/jd_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from nbox.jd_core.schedule import Schedule
2-
from nbox.jd_core.jobs import Job, _get_job_data, get_job_list
2+
from nbox.jd_core.jobs import Job, _get_job_data, print_job_list, new_job
33
from nbox.jd_core.serving import Serve, _get_deployment_data, print_serving_list
44
from nbox.jd_core.upload import upload_job_folder
55
from nbox.jd_core.cli import JobsCli, ServeCli

nbox/jd_core/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
from functools import partial
22

33
from nbox.jd_core.upload import upload_job_folder
4-
from nbox.jd_core.jobs import get_job_list, Job
4+
from nbox.jd_core.jobs import print_job_list, Job, new_job, get_job_list
55
from nbox.jd_core.serving import print_serving_list, Serve
66

77
JobsCli = {
8-
"status": get_job_list,
8+
"status": print_job_list,
9+
"list": print_job_list,
910
"upload": partial(upload_job_folder, "job"),
1011
"pick": Job,
12+
"new": new_job,
1113
}
1214

1315

0 commit comments

Comments
 (0)