kattis-cli 1.0.7__tar.gz → 1.1.1__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.
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/PKG-INFO +28 -20
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/README.md +19 -12
- kattis_cli-1.1.1/kattis_cli/client.py +464 -0
- kattis_cli-1.1.1/kattis_cli/download.py +230 -0
- kattis_cli-1.1.1/kattis_cli/fireworks.py +119 -0
- kattis_cli-1.1.1/kattis_cli/kattis.py +89 -0
- kattis_cli-1.1.1/kattis_cli/kattis_setup.py +155 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/main.py +3 -3
- kattis_cli-1.1.1/kattis_cli/solution_tester.py +221 -0
- kattis_cli-1.1.1/kattis_cli/ui.py +126 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/utils/languages.py +11 -5
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/utils/utility.py +2 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/pyproject.toml +14 -3
- kattis_cli-1.0.7/kattis_cli/download.py +0 -179
- kattis_cli-1.0.7/kattis_cli/kattis.py +0 -433
- kattis_cli-1.0.7/kattis_cli/kattis_setup.py +0 -118
- kattis_cli-1.0.7/kattis_cli/test_solution.py +0 -179
- kattis_cli-1.0.7/kattis_cli/ui.py +0 -85
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/LICENSE +0 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/.kattis-cli.toml +0 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/__init__.py +0 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/settings.py +0 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/utils/__init__.py +0 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/utils/config.py +0 -0
- {kattis_cli-1.0.7 → kattis_cli-1.1.1}/kattis_cli/utils/run_program.py +0 -0
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: kattis-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: A command-line tool for Kattis
|
|
5
|
-
|
|
5
|
+
License-File: LICENSE
|
|
6
6
|
Author: Ram Basnet
|
|
7
7
|
Author-email: rbasnet@coloradomesa.edu
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.10.0,<4.0.0
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
17
|
Requires-Dist: beautifulsoup4 (>=4.12.2,<5.0.0)
|
|
18
18
|
Requires-Dist: click (>=8.1.7,<9.0.0)
|
|
19
|
-
Requires-Dist: lxml (>=
|
|
19
|
+
Requires-Dist: lxml (>=6.0.1,<7.0.0)
|
|
20
20
|
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
21
21
|
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
22
22
|
Requires-Dist: rich (>=13.6.0,<14.0.0)
|
|
23
23
|
Requires-Dist: tomlkit (>=0.12.2,<0.13.0)
|
|
24
24
|
Requires-Dist: trogon (>=0.6.0,<0.7.0)
|
|
25
|
-
Project-URL:
|
|
25
|
+
Project-URL: Bug Tracker, https://github.com/rambasnet/kattis-cli/issues
|
|
26
|
+
Project-URL: Homepage, https://github.com/rambasnet/kattis-cli
|
|
26
27
|
Description-Content-Type: text/markdown
|
|
27
28
|
|
|
28
29
|
# Kattis-CLI
|
|
29
30
|
|
|
30
|
-
Kattis CLI - download, test and submit Kattis problems using CLI.
|
|
31
|
+
Kattis CLI - download, test and submit Kattis problems using CLI or TUI.
|
|
31
32
|
Inspired by the official Kattis CLI: [https://github.com/Kattis/kattis-cli](https://github.com/Kattis/kattis-cli)
|
|
32
33
|
|
|
33
34
|

|
|
@@ -35,6 +36,10 @@ Inspired by the official Kattis CLI: [https://github.com/Kattis/kattis-cli](http
|
|
|
35
36
|
[](https://pypi.org/project/kattis-cli/)
|
|
36
37
|
[](https://pypi.org/project/kattis-cli/)
|
|
37
38
|
|
|
39
|
+
## Quick Tour of Kattis-CLI
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
38
43
|
## Requirements
|
|
39
44
|
|
|
40
45
|
- Python 3.8+ (PyPy preferred as Kattis uses PyPy to run your Python3 solutions)
|
|
@@ -44,7 +49,7 @@ Inspired by the official Kattis CLI: [https://github.com/Kattis/kattis-cli](http
|
|
|
44
49
|
|
|
45
50
|
- Use Command Line or PowerShell
|
|
46
51
|
- Make sure python is in your PATH
|
|
47
|
-
|
|
52
|
+
- Install Python from Windows Store
|
|
48
53
|
- if you get codec error while running kattis-cli, run the following command in Command Prompt:
|
|
49
54
|
|
|
50
55
|
```bash
|
|
@@ -56,17 +61,15 @@ chcp 65001
|
|
|
56
61
|
|
|
57
62
|
If you've Python version 3.8 or higher, you can skip creating virtual environment. If you wish to create a virtual environment, see intructions below.
|
|
58
63
|
|
|
59
|
-
|
|
60
64
|
### Create and activate virtual environment using venv
|
|
61
65
|
|
|
62
66
|
- follow the instruction provided in the link to create and activate virtual environment:
|
|
63
|
-
[https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)
|
|
64
|
-
|
|
67
|
+
[https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)
|
|
65
68
|
|
|
66
69
|
### Create and activate virtual environment using conda
|
|
67
70
|
|
|
68
71
|
- follow the instruction provided in the link to create and activate virtual environment:
|
|
69
|
-
[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment)
|
|
72
|
+
[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment)
|
|
70
73
|
|
|
71
74
|
## Install Kattis-cli
|
|
72
75
|
|
|
@@ -94,7 +97,6 @@ python -m pip install kattis-cli --upgrade
|
|
|
94
97
|
|
|
95
98
|
- on Windows add the path shown in the output of the above command to your PATH environment variable
|
|
96
99
|
|
|
97
|
-
|
|
98
100
|
## Kattis configuration
|
|
99
101
|
|
|
100
102
|
- run the following command and enter your Kattis credentials
|
|
@@ -143,7 +145,7 @@ kattis info
|
|
|
143
145
|
- currently the following languages have been tested: Python 3, C++, NodeJS, C, Java
|
|
144
146
|
- make sure CLI compilers are in your PATH
|
|
145
147
|
- make sure python3 files have first line shebang: !/usr/bin/env python3
|
|
146
|
-
|
|
148
|
+
- or have extensions .py3
|
|
147
149
|
- update the **.kattis-cli.toml** file in your home directory to add more languages
|
|
148
150
|
- see [kattis_cli/.kattis-cli.toml](https://github.com/rambasnet/kattis-cli/blob/main/kattis_cli/.kattis-cli.toml) file for example.
|
|
149
151
|
|
|
@@ -163,7 +165,6 @@ kattis test -a 6 # Answer accepted upto 6 decimal places of accuracy
|
|
|
163
165
|
kattis test -a 6
|
|
164
166
|
```
|
|
165
167
|
|
|
166
|
-
|
|
167
168
|
### Submit a problem
|
|
168
169
|
|
|
169
170
|
- make sure you've configured kattis-cli
|
|
@@ -185,13 +186,19 @@ kattis submit
|
|
|
185
186
|
|
|
186
187
|
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. Adding support for more languages is highly appreciated.
|
|
187
188
|
|
|
188
|
-
|
|
189
189
|
## Using this Repo
|
|
190
190
|
|
|
191
191
|
- clone this repo
|
|
192
192
|
- create virtual environment with pypy 3.8 or higher
|
|
193
193
|
- using conda the following command creates kattis virtual environment with pypy3.8
|
|
194
194
|
|
|
195
|
+
```bash
|
|
196
|
+
git clone git@github.com:rambasnet/kattis-cli.git
|
|
197
|
+
cd kattis-cli
|
|
198
|
+
pip install poetry
|
|
199
|
+
poetry install
|
|
200
|
+
```
|
|
201
|
+
|
|
195
202
|
### Using conda and virtual environment
|
|
196
203
|
|
|
197
204
|
```bash
|
|
@@ -210,7 +217,7 @@ pip install -r requirements.txt
|
|
|
210
217
|
```bash
|
|
211
218
|
make
|
|
212
219
|
./build.sh
|
|
213
|
-
pip install dist/kattis_cli-x.x.x-py3-none-any.whl --force-reinstall
|
|
220
|
+
pip install dist/kattis_cli-x.x.x-py3-none-any.whl --force-reinstall
|
|
214
221
|
```
|
|
215
222
|
|
|
216
223
|
### Using Docker
|
|
@@ -220,6 +227,7 @@ pip install dist/kattis_cli-x.x.x-py3-none-any.whl --force-reinstall
|
|
|
220
227
|
- if using Windows, run the following command in git-bash Terminal
|
|
221
228
|
|
|
222
229
|
```bash
|
|
223
|
-
|
|
230
|
+
docker-compose up -d
|
|
231
|
+
docker exec -it kattis-cli zsh
|
|
224
232
|
```
|
|
225
233
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Kattis-CLI
|
|
2
2
|
|
|
3
|
-
Kattis CLI - download, test and submit Kattis problems using CLI.
|
|
3
|
+
Kattis CLI - download, test and submit Kattis problems using CLI or TUI.
|
|
4
4
|
Inspired by the official Kattis CLI: [https://github.com/Kattis/kattis-cli](https://github.com/Kattis/kattis-cli)
|
|
5
5
|
|
|
6
6
|

|
|
@@ -8,6 +8,10 @@ Inspired by the official Kattis CLI: [https://github.com/Kattis/kattis-cli](http
|
|
|
8
8
|
[](https://pypi.org/project/kattis-cli/)
|
|
9
9
|
[](https://pypi.org/project/kattis-cli/)
|
|
10
10
|
|
|
11
|
+
## Quick Tour of Kattis-CLI
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
11
15
|
## Requirements
|
|
12
16
|
|
|
13
17
|
- Python 3.8+ (PyPy preferred as Kattis uses PyPy to run your Python3 solutions)
|
|
@@ -17,7 +21,7 @@ Inspired by the official Kattis CLI: [https://github.com/Kattis/kattis-cli](http
|
|
|
17
21
|
|
|
18
22
|
- Use Command Line or PowerShell
|
|
19
23
|
- Make sure python is in your PATH
|
|
20
|
-
|
|
24
|
+
- Install Python from Windows Store
|
|
21
25
|
- if you get codec error while running kattis-cli, run the following command in Command Prompt:
|
|
22
26
|
|
|
23
27
|
```bash
|
|
@@ -29,17 +33,15 @@ chcp 65001
|
|
|
29
33
|
|
|
30
34
|
If you've Python version 3.8 or higher, you can skip creating virtual environment. If you wish to create a virtual environment, see intructions below.
|
|
31
35
|
|
|
32
|
-
|
|
33
36
|
### Create and activate virtual environment using venv
|
|
34
37
|
|
|
35
38
|
- follow the instruction provided in the link to create and activate virtual environment:
|
|
36
|
-
[https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)
|
|
37
|
-
|
|
39
|
+
[https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)
|
|
38
40
|
|
|
39
41
|
### Create and activate virtual environment using conda
|
|
40
42
|
|
|
41
43
|
- follow the instruction provided in the link to create and activate virtual environment:
|
|
42
|
-
[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment)
|
|
44
|
+
[https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment)
|
|
43
45
|
|
|
44
46
|
## Install Kattis-cli
|
|
45
47
|
|
|
@@ -67,7 +69,6 @@ python -m pip install kattis-cli --upgrade
|
|
|
67
69
|
|
|
68
70
|
- on Windows add the path shown in the output of the above command to your PATH environment variable
|
|
69
71
|
|
|
70
|
-
|
|
71
72
|
## Kattis configuration
|
|
72
73
|
|
|
73
74
|
- run the following command and enter your Kattis credentials
|
|
@@ -116,7 +117,7 @@ kattis info
|
|
|
116
117
|
- currently the following languages have been tested: Python 3, C++, NodeJS, C, Java
|
|
117
118
|
- make sure CLI compilers are in your PATH
|
|
118
119
|
- make sure python3 files have first line shebang: !/usr/bin/env python3
|
|
119
|
-
|
|
120
|
+
- or have extensions .py3
|
|
120
121
|
- update the **.kattis-cli.toml** file in your home directory to add more languages
|
|
121
122
|
- see [kattis_cli/.kattis-cli.toml](https://github.com/rambasnet/kattis-cli/blob/main/kattis_cli/.kattis-cli.toml) file for example.
|
|
122
123
|
|
|
@@ -136,7 +137,6 @@ kattis test -a 6 # Answer accepted upto 6 decimal places of accuracy
|
|
|
136
137
|
kattis test -a 6
|
|
137
138
|
```
|
|
138
139
|
|
|
139
|
-
|
|
140
140
|
### Submit a problem
|
|
141
141
|
|
|
142
142
|
- make sure you've configured kattis-cli
|
|
@@ -158,13 +158,19 @@ kattis submit
|
|
|
158
158
|
|
|
159
159
|
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. Adding support for more languages is highly appreciated.
|
|
160
160
|
|
|
161
|
-
|
|
162
161
|
## Using this Repo
|
|
163
162
|
|
|
164
163
|
- clone this repo
|
|
165
164
|
- create virtual environment with pypy 3.8 or higher
|
|
166
165
|
- using conda the following command creates kattis virtual environment with pypy3.8
|
|
167
166
|
|
|
167
|
+
```bash
|
|
168
|
+
git clone git@github.com:rambasnet/kattis-cli.git
|
|
169
|
+
cd kattis-cli
|
|
170
|
+
pip install poetry
|
|
171
|
+
poetry install
|
|
172
|
+
```
|
|
173
|
+
|
|
168
174
|
### Using conda and virtual environment
|
|
169
175
|
|
|
170
176
|
```bash
|
|
@@ -183,7 +189,7 @@ pip install -r requirements.txt
|
|
|
183
189
|
```bash
|
|
184
190
|
make
|
|
185
191
|
./build.sh
|
|
186
|
-
pip install dist/kattis_cli-x.x.x-py3-none-any.whl --force-reinstall
|
|
192
|
+
pip install dist/kattis_cli-x.x.x-py3-none-any.whl --force-reinstall
|
|
187
193
|
```
|
|
188
194
|
|
|
189
195
|
### Using Docker
|
|
@@ -193,5 +199,6 @@ pip install dist/kattis_cli-x.x.x-py3-none-any.whl --force-reinstall
|
|
|
193
199
|
- if using Windows, run the following command in git-bash Terminal
|
|
194
200
|
|
|
195
201
|
```bash
|
|
196
|
-
|
|
202
|
+
docker-compose up -d
|
|
203
|
+
docker exec -it kattis-cli zsh
|
|
197
204
|
```
|