nitro-ai-judge-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nitro_ai_judge_cli-0.1.0/PKG-INFO +206 -0
- nitro_ai_judge_cli-0.1.0/README.md +184 -0
- nitro_ai_judge_cli-0.1.0/nitro_ai_judge_cli.egg-info/PKG-INFO +206 -0
- nitro_ai_judge_cli-0.1.0/nitro_ai_judge_cli.egg-info/SOURCES.txt +9 -0
- nitro_ai_judge_cli-0.1.0/nitro_ai_judge_cli.egg-info/dependency_links.txt +1 -0
- nitro_ai_judge_cli-0.1.0/nitro_ai_judge_cli.egg-info/entry_points.txt +2 -0
- nitro_ai_judge_cli-0.1.0/nitro_ai_judge_cli.egg-info/requires.txt +1 -0
- nitro_ai_judge_cli-0.1.0/nitro_ai_judge_cli.egg-info/top_level.txt +1 -0
- nitro_ai_judge_cli-0.1.0/nitro_cli.py +1807 -0
- nitro_ai_judge_cli-0.1.0/pyproject.toml +37 -0
- nitro_ai_judge_cli-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nitro-ai-judge-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI client for judge.nitro-ai.org
|
|
5
|
+
Author: Mihnea Teodor Stoica
|
|
6
|
+
Project-URL: Homepage, https://github.com/MihneaTeodorStoica/nitro-cli
|
|
7
|
+
Project-URL: Repository, https://github.com/MihneaTeodorStoica/nitro-cli
|
|
8
|
+
Project-URL: Issues, https://github.com/MihneaTeodorStoica/nitro-cli/issues
|
|
9
|
+
Keywords: nitro,cli,judge,competitions
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Utilities
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Requires-Dist: playwright>=1.49
|
|
22
|
+
|
|
23
|
+
# Nitro CLI
|
|
24
|
+
|
|
25
|
+
CLI client for `judge.nitro-ai.org`.
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- login using Playwright plus Nitro credentials
|
|
30
|
+
- list contests with page controls
|
|
31
|
+
- list tasks for a contest
|
|
32
|
+
- view full task statements
|
|
33
|
+
- submit solutions and wait for feedback
|
|
34
|
+
- list submissions
|
|
35
|
+
- inspect submission feedback/details
|
|
36
|
+
- interactive shell mode when run without arguments
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- Python 3.10+
|
|
41
|
+
- Playwright is installed as a package dependency
|
|
42
|
+
|
|
43
|
+
## Login
|
|
44
|
+
|
|
45
|
+
`nitro-cli login` opens a real browser session using Playwright to obtain Cloudflare clearance, then completes the Nitro login flow automatically.
|
|
46
|
+
|
|
47
|
+
Behavior:
|
|
48
|
+
|
|
49
|
+
1. reuses saved session if still valid
|
|
50
|
+
2. reuses saved `cf_clearance` when possible
|
|
51
|
+
3. opens a browser if a fresh Cloudflare clearance is needed
|
|
52
|
+
4. retries login automatically if the saved clearance expired
|
|
53
|
+
|
|
54
|
+
On first use, `nitro-cli` may install the Playwright Chromium browser.
|
|
55
|
+
|
|
56
|
+
Browser behavior:
|
|
57
|
+
|
|
58
|
+
- headless by default, so no browser window flashes
|
|
59
|
+
- to force a visible browser for debugging:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
NITRO_BROWSER_HEADLESS=0 nitro-cli login
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Example:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
nitro-cli login --username MihneaStoica --password '...'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
With `pipx`:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pipx install .
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
With `pip`:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python3 -m pip install .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For local development:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python3 -m pip install -e .
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
From PyPI:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pipx install nitro-ai-judge-cli
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Usage
|
|
98
|
+
|
|
99
|
+
Direct commands:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
nitro-cli login
|
|
103
|
+
nitro-cli contests
|
|
104
|
+
nitro-cli contests --page 2
|
|
105
|
+
nitro-cli contests --all-pages
|
|
106
|
+
nitro-cli tasks algolymp/algolymp-preojia-ix-x
|
|
107
|
+
nitro-cli task algolymp/algolymp-preojia-ix-x 1
|
|
108
|
+
nitro-cli submissions algolymp/algolymp-preojia-ix-x 1 --mode both
|
|
109
|
+
nitro-cli submission 3a009d767bd5 --org algolymp --comp algolymp-preojia-ix-x --task-id 1
|
|
110
|
+
nitro-cli submit algolymp/algolymp-preojia-ix-x 1 --output submission.csv --source solution.py --wait
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Interactive shell:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
nitro-cli
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Example shell session:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
contest list
|
|
123
|
+
contest list --page 2
|
|
124
|
+
contest list --all-pages
|
|
125
|
+
select 20
|
|
126
|
+
tasks
|
|
127
|
+
select 1
|
|
128
|
+
show
|
|
129
|
+
submit submission.csv solution.py --wait
|
|
130
|
+
submissions
|
|
131
|
+
submission 1
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Shell commands:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
help
|
|
138
|
+
exit | quit
|
|
139
|
+
back
|
|
140
|
+
login [username] [password]
|
|
141
|
+
status
|
|
142
|
+
contests
|
|
143
|
+
contest list [--all] [--page N] [--page-size N] [--all-pages]
|
|
144
|
+
contest select <index|org/slug>
|
|
145
|
+
contest show
|
|
146
|
+
tasks
|
|
147
|
+
task list
|
|
148
|
+
task select <index|id>
|
|
149
|
+
select <index|id>
|
|
150
|
+
show
|
|
151
|
+
submit <output.csv> [source.py] [--note TEXT] [--wait]
|
|
152
|
+
task show
|
|
153
|
+
task submit <output.csv> [source.py] [--note TEXT] [--wait]
|
|
154
|
+
submissions [--mode partial|complete|both]
|
|
155
|
+
task submissions list [--mode partial|complete|both]
|
|
156
|
+
submission <index|short-id|full-id>
|
|
157
|
+
submission view <index|short-id|full-id>
|
|
158
|
+
task submissions show <index|short-id|full-id>
|
|
159
|
+
set-final <index|short-id|full-id>
|
|
160
|
+
unset-final <index|short-id|full-id>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## State
|
|
164
|
+
|
|
165
|
+
Login state is stored in:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
~/.nitro-cli/state.json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Override with:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
NITRO_STATE_DIR=/some/path nitro-cli login
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Repo Notes
|
|
178
|
+
|
|
179
|
+
`competition-frontend/` and `competition-backend/` are not required for the published CLI.
|
|
180
|
+
|
|
181
|
+
## Publishing
|
|
182
|
+
|
|
183
|
+
This repo includes a GitHub Actions workflow at `.github/workflows/publish.yml`.
|
|
184
|
+
|
|
185
|
+
Behavior:
|
|
186
|
+
|
|
187
|
+
1. Builds the package on pushes, pull requests, and manual runs
|
|
188
|
+
2. Runs `twine check` on built distributions
|
|
189
|
+
3. Publishes to PyPI when you push a tag matching `v*`
|
|
190
|
+
|
|
191
|
+
Recommended release flow:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
python3 -m pip install --upgrade build twine
|
|
195
|
+
python3 -m build
|
|
196
|
+
python3 -m twine check dist/*
|
|
197
|
+
git tag v0.1.0
|
|
198
|
+
git push origin main --tags
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
For PyPI trusted publishing, configure PyPI to trust this GitHub repository and the `pypi` environment.
|
|
202
|
+
|
|
203
|
+
Package name on PyPI: `nitro-ai-judge-cli`
|
|
204
|
+
Command name after install: `nitro-cli`
|
|
205
|
+
|
|
206
|
+
Before publishing publicly, choose and add a license file.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Nitro CLI
|
|
2
|
+
|
|
3
|
+
CLI client for `judge.nitro-ai.org`.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- login using Playwright plus Nitro credentials
|
|
8
|
+
- list contests with page controls
|
|
9
|
+
- list tasks for a contest
|
|
10
|
+
- view full task statements
|
|
11
|
+
- submit solutions and wait for feedback
|
|
12
|
+
- list submissions
|
|
13
|
+
- inspect submission feedback/details
|
|
14
|
+
- interactive shell mode when run without arguments
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- Python 3.10+
|
|
19
|
+
- Playwright is installed as a package dependency
|
|
20
|
+
|
|
21
|
+
## Login
|
|
22
|
+
|
|
23
|
+
`nitro-cli login` opens a real browser session using Playwright to obtain Cloudflare clearance, then completes the Nitro login flow automatically.
|
|
24
|
+
|
|
25
|
+
Behavior:
|
|
26
|
+
|
|
27
|
+
1. reuses saved session if still valid
|
|
28
|
+
2. reuses saved `cf_clearance` when possible
|
|
29
|
+
3. opens a browser if a fresh Cloudflare clearance is needed
|
|
30
|
+
4. retries login automatically if the saved clearance expired
|
|
31
|
+
|
|
32
|
+
On first use, `nitro-cli` may install the Playwright Chromium browser.
|
|
33
|
+
|
|
34
|
+
Browser behavior:
|
|
35
|
+
|
|
36
|
+
- headless by default, so no browser window flashes
|
|
37
|
+
- to force a visible browser for debugging:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
NITRO_BROWSER_HEADLESS=0 nitro-cli login
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Example:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
nitro-cli login --username MihneaStoica --password '...'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
With `pipx`:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pipx install .
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
With `pip`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
python3 -m pip install .
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
For local development:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
python3 -m pip install -e .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
From PyPI:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pipx install nitro-ai-judge-cli
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
Direct commands:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
nitro-cli login
|
|
81
|
+
nitro-cli contests
|
|
82
|
+
nitro-cli contests --page 2
|
|
83
|
+
nitro-cli contests --all-pages
|
|
84
|
+
nitro-cli tasks algolymp/algolymp-preojia-ix-x
|
|
85
|
+
nitro-cli task algolymp/algolymp-preojia-ix-x 1
|
|
86
|
+
nitro-cli submissions algolymp/algolymp-preojia-ix-x 1 --mode both
|
|
87
|
+
nitro-cli submission 3a009d767bd5 --org algolymp --comp algolymp-preojia-ix-x --task-id 1
|
|
88
|
+
nitro-cli submit algolymp/algolymp-preojia-ix-x 1 --output submission.csv --source solution.py --wait
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Interactive shell:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
nitro-cli
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Example shell session:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
contest list
|
|
101
|
+
contest list --page 2
|
|
102
|
+
contest list --all-pages
|
|
103
|
+
select 20
|
|
104
|
+
tasks
|
|
105
|
+
select 1
|
|
106
|
+
show
|
|
107
|
+
submit submission.csv solution.py --wait
|
|
108
|
+
submissions
|
|
109
|
+
submission 1
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Shell commands:
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
help
|
|
116
|
+
exit | quit
|
|
117
|
+
back
|
|
118
|
+
login [username] [password]
|
|
119
|
+
status
|
|
120
|
+
contests
|
|
121
|
+
contest list [--all] [--page N] [--page-size N] [--all-pages]
|
|
122
|
+
contest select <index|org/slug>
|
|
123
|
+
contest show
|
|
124
|
+
tasks
|
|
125
|
+
task list
|
|
126
|
+
task select <index|id>
|
|
127
|
+
select <index|id>
|
|
128
|
+
show
|
|
129
|
+
submit <output.csv> [source.py] [--note TEXT] [--wait]
|
|
130
|
+
task show
|
|
131
|
+
task submit <output.csv> [source.py] [--note TEXT] [--wait]
|
|
132
|
+
submissions [--mode partial|complete|both]
|
|
133
|
+
task submissions list [--mode partial|complete|both]
|
|
134
|
+
submission <index|short-id|full-id>
|
|
135
|
+
submission view <index|short-id|full-id>
|
|
136
|
+
task submissions show <index|short-id|full-id>
|
|
137
|
+
set-final <index|short-id|full-id>
|
|
138
|
+
unset-final <index|short-id|full-id>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## State
|
|
142
|
+
|
|
143
|
+
Login state is stored in:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
~/.nitro-cli/state.json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Override with:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
NITRO_STATE_DIR=/some/path nitro-cli login
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Repo Notes
|
|
156
|
+
|
|
157
|
+
`competition-frontend/` and `competition-backend/` are not required for the published CLI.
|
|
158
|
+
|
|
159
|
+
## Publishing
|
|
160
|
+
|
|
161
|
+
This repo includes a GitHub Actions workflow at `.github/workflows/publish.yml`.
|
|
162
|
+
|
|
163
|
+
Behavior:
|
|
164
|
+
|
|
165
|
+
1. Builds the package on pushes, pull requests, and manual runs
|
|
166
|
+
2. Runs `twine check` on built distributions
|
|
167
|
+
3. Publishes to PyPI when you push a tag matching `v*`
|
|
168
|
+
|
|
169
|
+
Recommended release flow:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
python3 -m pip install --upgrade build twine
|
|
173
|
+
python3 -m build
|
|
174
|
+
python3 -m twine check dist/*
|
|
175
|
+
git tag v0.1.0
|
|
176
|
+
git push origin main --tags
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
For PyPI trusted publishing, configure PyPI to trust this GitHub repository and the `pypi` environment.
|
|
180
|
+
|
|
181
|
+
Package name on PyPI: `nitro-ai-judge-cli`
|
|
182
|
+
Command name after install: `nitro-cli`
|
|
183
|
+
|
|
184
|
+
Before publishing publicly, choose and add a license file.
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nitro-ai-judge-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI client for judge.nitro-ai.org
|
|
5
|
+
Author: Mihnea Teodor Stoica
|
|
6
|
+
Project-URL: Homepage, https://github.com/MihneaTeodorStoica/nitro-cli
|
|
7
|
+
Project-URL: Repository, https://github.com/MihneaTeodorStoica/nitro-cli
|
|
8
|
+
Project-URL: Issues, https://github.com/MihneaTeodorStoica/nitro-cli/issues
|
|
9
|
+
Keywords: nitro,cli,judge,competitions
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Utilities
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Requires-Dist: playwright>=1.49
|
|
22
|
+
|
|
23
|
+
# Nitro CLI
|
|
24
|
+
|
|
25
|
+
CLI client for `judge.nitro-ai.org`.
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- login using Playwright plus Nitro credentials
|
|
30
|
+
- list contests with page controls
|
|
31
|
+
- list tasks for a contest
|
|
32
|
+
- view full task statements
|
|
33
|
+
- submit solutions and wait for feedback
|
|
34
|
+
- list submissions
|
|
35
|
+
- inspect submission feedback/details
|
|
36
|
+
- interactive shell mode when run without arguments
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- Python 3.10+
|
|
41
|
+
- Playwright is installed as a package dependency
|
|
42
|
+
|
|
43
|
+
## Login
|
|
44
|
+
|
|
45
|
+
`nitro-cli login` opens a real browser session using Playwright to obtain Cloudflare clearance, then completes the Nitro login flow automatically.
|
|
46
|
+
|
|
47
|
+
Behavior:
|
|
48
|
+
|
|
49
|
+
1. reuses saved session if still valid
|
|
50
|
+
2. reuses saved `cf_clearance` when possible
|
|
51
|
+
3. opens a browser if a fresh Cloudflare clearance is needed
|
|
52
|
+
4. retries login automatically if the saved clearance expired
|
|
53
|
+
|
|
54
|
+
On first use, `nitro-cli` may install the Playwright Chromium browser.
|
|
55
|
+
|
|
56
|
+
Browser behavior:
|
|
57
|
+
|
|
58
|
+
- headless by default, so no browser window flashes
|
|
59
|
+
- to force a visible browser for debugging:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
NITRO_BROWSER_HEADLESS=0 nitro-cli login
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Example:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
nitro-cli login --username MihneaStoica --password '...'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
With `pipx`:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pipx install .
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
With `pip`:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python3 -m pip install .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For local development:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python3 -m pip install -e .
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
From PyPI:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pipx install nitro-ai-judge-cli
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Usage
|
|
98
|
+
|
|
99
|
+
Direct commands:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
nitro-cli login
|
|
103
|
+
nitro-cli contests
|
|
104
|
+
nitro-cli contests --page 2
|
|
105
|
+
nitro-cli contests --all-pages
|
|
106
|
+
nitro-cli tasks algolymp/algolymp-preojia-ix-x
|
|
107
|
+
nitro-cli task algolymp/algolymp-preojia-ix-x 1
|
|
108
|
+
nitro-cli submissions algolymp/algolymp-preojia-ix-x 1 --mode both
|
|
109
|
+
nitro-cli submission 3a009d767bd5 --org algolymp --comp algolymp-preojia-ix-x --task-id 1
|
|
110
|
+
nitro-cli submit algolymp/algolymp-preojia-ix-x 1 --output submission.csv --source solution.py --wait
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Interactive shell:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
nitro-cli
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Example shell session:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
contest list
|
|
123
|
+
contest list --page 2
|
|
124
|
+
contest list --all-pages
|
|
125
|
+
select 20
|
|
126
|
+
tasks
|
|
127
|
+
select 1
|
|
128
|
+
show
|
|
129
|
+
submit submission.csv solution.py --wait
|
|
130
|
+
submissions
|
|
131
|
+
submission 1
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Shell commands:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
help
|
|
138
|
+
exit | quit
|
|
139
|
+
back
|
|
140
|
+
login [username] [password]
|
|
141
|
+
status
|
|
142
|
+
contests
|
|
143
|
+
contest list [--all] [--page N] [--page-size N] [--all-pages]
|
|
144
|
+
contest select <index|org/slug>
|
|
145
|
+
contest show
|
|
146
|
+
tasks
|
|
147
|
+
task list
|
|
148
|
+
task select <index|id>
|
|
149
|
+
select <index|id>
|
|
150
|
+
show
|
|
151
|
+
submit <output.csv> [source.py] [--note TEXT] [--wait]
|
|
152
|
+
task show
|
|
153
|
+
task submit <output.csv> [source.py] [--note TEXT] [--wait]
|
|
154
|
+
submissions [--mode partial|complete|both]
|
|
155
|
+
task submissions list [--mode partial|complete|both]
|
|
156
|
+
submission <index|short-id|full-id>
|
|
157
|
+
submission view <index|short-id|full-id>
|
|
158
|
+
task submissions show <index|short-id|full-id>
|
|
159
|
+
set-final <index|short-id|full-id>
|
|
160
|
+
unset-final <index|short-id|full-id>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## State
|
|
164
|
+
|
|
165
|
+
Login state is stored in:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
~/.nitro-cli/state.json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Override with:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
NITRO_STATE_DIR=/some/path nitro-cli login
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Repo Notes
|
|
178
|
+
|
|
179
|
+
`competition-frontend/` and `competition-backend/` are not required for the published CLI.
|
|
180
|
+
|
|
181
|
+
## Publishing
|
|
182
|
+
|
|
183
|
+
This repo includes a GitHub Actions workflow at `.github/workflows/publish.yml`.
|
|
184
|
+
|
|
185
|
+
Behavior:
|
|
186
|
+
|
|
187
|
+
1. Builds the package on pushes, pull requests, and manual runs
|
|
188
|
+
2. Runs `twine check` on built distributions
|
|
189
|
+
3. Publishes to PyPI when you push a tag matching `v*`
|
|
190
|
+
|
|
191
|
+
Recommended release flow:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
python3 -m pip install --upgrade build twine
|
|
195
|
+
python3 -m build
|
|
196
|
+
python3 -m twine check dist/*
|
|
197
|
+
git tag v0.1.0
|
|
198
|
+
git push origin main --tags
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
For PyPI trusted publishing, configure PyPI to trust this GitHub repository and the `pypi` environment.
|
|
202
|
+
|
|
203
|
+
Package name on PyPI: `nitro-ai-judge-cli`
|
|
204
|
+
Command name after install: `nitro-cli`
|
|
205
|
+
|
|
206
|
+
Before publishing publicly, choose and add a license file.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
nitro_cli.py
|
|
3
|
+
pyproject.toml
|
|
4
|
+
nitro_ai_judge_cli.egg-info/PKG-INFO
|
|
5
|
+
nitro_ai_judge_cli.egg-info/SOURCES.txt
|
|
6
|
+
nitro_ai_judge_cli.egg-info/dependency_links.txt
|
|
7
|
+
nitro_ai_judge_cli.egg-info/entry_points.txt
|
|
8
|
+
nitro_ai_judge_cli.egg-info/requires.txt
|
|
9
|
+
nitro_ai_judge_cli.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
playwright>=1.49
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nitro_cli
|