kattis-cli 1.2.2__py3-none-any.whl → 1.2.4__py3-none-any.whl
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/kattis_templates/main/python3.txt +1 -1
- kattis_cli/main.py +18 -13
- {kattis_cli-1.2.2.dist-info → kattis_cli-1.2.4.dist-info}/METADATA +6 -2
- {kattis_cli-1.2.2.dist-info → kattis_cli-1.2.4.dist-info}/RECORD +7 -7
- {kattis_cli-1.2.2.dist-info → kattis_cli-1.2.4.dist-info}/WHEEL +0 -0
- {kattis_cli-1.2.2.dist-info → kattis_cli-1.2.4.dist-info}/entry_points.txt +0 -0
- {kattis_cli-1.2.2.dist-info → kattis_cli-1.2.4.dist-info}/licenses/LICENSE +0 -0
kattis_cli/main.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Change the __version__ to match in pyproject.toml
|
|
4
4
|
"""
|
|
5
|
-
__version__ = '1.2.
|
|
5
|
+
__version__ = '1.2.4'
|
|
6
6
|
|
|
7
7
|
from math import inf
|
|
8
8
|
import os
|
|
@@ -37,25 +37,30 @@ def get(problemid: str) -> None:
|
|
|
37
37
|
"""
|
|
38
38
|
console = Console()
|
|
39
39
|
console.print(
|
|
40
|
-
f"Downloading
|
|
40
|
+
f"Downloading metadata: [bold blue]{problemid}[/bold blue]")
|
|
41
41
|
try:
|
|
42
|
-
download.download_sample_data(problemid)
|
|
43
|
-
console.print(
|
|
44
|
-
f"Downloading metadata: [bold blue]{problemid}[/bold blue]")
|
|
45
42
|
download.load_problem_metadata(problemid)
|
|
46
43
|
except requests.exceptions.InvalidURL:
|
|
47
44
|
console.print(
|
|
48
|
-
f"Problem ID: [bold red]{problemid}[/bold red] not found.")
|
|
45
|
+
f"❌ Problem ID: [bold red]{problemid}[/bold red] not found.")
|
|
49
46
|
else:
|
|
47
|
+
console.print("✅ Metadata downloaded successfully.")
|
|
50
48
|
console.print(
|
|
51
|
-
f"
|
|
52
|
-
|
|
49
|
+
f"Downloading samples: [bold blue]{problemid}[/bold blue]")
|
|
50
|
+
try:
|
|
51
|
+
download.download_sample_data(problemid)
|
|
52
|
+
except requests.exceptions.InvalidURL:
|
|
53
|
+
console.print(
|
|
54
|
+
f"❌ Samples not found for Problem ID: [bold red]\
|
|
55
|
+
{problemid}[/bold red].")
|
|
56
|
+
else:
|
|
57
|
+
console.print("✅ Samples downloaded successfully.")
|
|
53
58
|
|
|
54
59
|
|
|
55
60
|
@main.command(help='Show problem metadata.')
|
|
56
61
|
@click.option('-p', '--problemid', default='', help='Problem ID.')
|
|
57
62
|
def info(problemid: str) -> None:
|
|
58
|
-
"""Display problem
|
|
63
|
+
"""Display problem metadata.
|
|
59
64
|
"""
|
|
60
65
|
ui.show_problem_metadata(problemid)
|
|
61
66
|
|
|
@@ -75,8 +80,9 @@ def test(
|
|
|
75
80
|
files: Tuple[str]) -> None:
|
|
76
81
|
"""Test solution with sample files.
|
|
77
82
|
"""
|
|
78
|
-
problemid, loc_language, mainclass, _files, root_folder, lang_config
|
|
79
|
-
languages.update_args(
|
|
83
|
+
problemid, loc_language, mainclass, _files, root_folder, lang_config =\
|
|
84
|
+
languages.update_args(
|
|
85
|
+
problemid, language, mainclass, list(files))
|
|
80
86
|
# print('After - ', f'{problemid=} {language=} {mainclass=} {_files=}')
|
|
81
87
|
# lang_config = config.parse_config(language)
|
|
82
88
|
if not mainclass:
|
|
@@ -112,8 +118,7 @@ def submit(problemid: str, language: str,
|
|
|
112
118
|
"""Submit a solution to Kattis.
|
|
113
119
|
"""
|
|
114
120
|
problemid, language, mainclass, _files, _, lang_config = \
|
|
115
|
-
languages.update_args(
|
|
116
|
-
problemid, language, mainclass, list(files))
|
|
121
|
+
languages.update_args(problemid, language, mainclass, list(files))
|
|
117
122
|
# Finally, submit the solution
|
|
118
123
|
if not mainclass:
|
|
119
124
|
mainclass = languages.guess_mainfile(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kattis-cli
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: A command-line tool for Kattis
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Ram Basnet
|
|
@@ -95,12 +95,16 @@ python -m pip install kattis-cli --upgrade
|
|
|
95
95
|
## Kattis configuration
|
|
96
96
|
|
|
97
97
|
- run the following command and enter your Kattis credentials
|
|
98
|
-
-
|
|
98
|
+
- follow the instructions provided in the terminal
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
101
|
kattis setup
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
## Manual Configuration
|
|
105
|
+
|
|
106
|
+
- see [SETUP.md](./SETUP.md) for detailed instructions to setup kattis-cli
|
|
107
|
+
|
|
104
108
|
## Usage
|
|
105
109
|
|
|
106
110
|
```bash
|
|
@@ -10,7 +10,7 @@ kattis_cli/kattis_templates/main/c.txt,sha256=HIJF1XMi40XbaC63o7kqfInvK_WvO6pPkS
|
|
|
10
10
|
kattis_cli/kattis_templates/main/cpp.txt,sha256=TmVm0vX1YZyzG3P0p2doix-47bofS0xiZeKiPbmNcWM,214
|
|
11
11
|
kattis_cli/kattis_templates/main/java.txt,sha256=4-485QJ0sV1RczRV-VxKYc6El2xD16y2oUAUEQpu9Fg,309
|
|
12
12
|
kattis_cli/kattis_templates/main/python.txt,sha256=RTDUEN2sSp6u1NuI1j371hgii3ouRfnfXI2Yb55D2zM,327
|
|
13
|
-
kattis_cli/kattis_templates/main/python3.txt,sha256=
|
|
13
|
+
kattis_cli/kattis_templates/main/python3.txt,sha256=FcbUc1AZGAOtn95lyj6yAzrtls9N94ipg7w_ouK0Y5w,331
|
|
14
14
|
kattis_cli/kattis_templates/project_structure/c/Makefile,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
kattis_cli/kattis_templates/project_structure/c/src/problemid/problemid.c,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
kattis_cli/kattis_templates/project_structure/c/tests/test_problemid.c,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -27,7 +27,7 @@ kattis_cli/kattis_templates/project_structure/python3/Makefile,sha256=47DEQpj8HB
|
|
|
27
27
|
kattis_cli/kattis_templates/project_structure/python3/src/problemid.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
kattis_cli/kattis_templates/project_structure/python3/tests/__init__.py,sha256=AMhJu7wP66tZlvKEDwSrdDdQDQ6ZmMQFWjKTPjCPNAg,114
|
|
29
29
|
kattis_cli/kattis_templates/project_structure/python3/tests/test_problemid.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
kattis_cli/main.py,sha256=
|
|
30
|
+
kattis_cli/main.py,sha256=9OKwOxCCV8vM0jw0D08TRtBErUDjKLbdalsp5MBiKCg,5220
|
|
31
31
|
kattis_cli/settings.py,sha256=d5q4dYj9VqDSqPalleh2oZWtND-1bPB0T2IwdajFrBg,591
|
|
32
32
|
kattis_cli/solution_tester.py,sha256=SQUq1Da06-_b9tTi0-CiTogscWje1Ur7KuaiK1Bxsgs,7860
|
|
33
33
|
kattis_cli/template.py,sha256=63KdxOnDcv7vFFD11zVDvdc_2vKJB_MT5ynI9_jc0Tg,5421
|
|
@@ -37,8 +37,8 @@ kattis_cli/utils/config.py,sha256=sR6lbRl9KiXRKIV1zRP5s6KJ9jed0znilsHSBS-_G2k,22
|
|
|
37
37
|
kattis_cli/utils/languages.py,sha256=6Oc1RgYs7CWFzMO_VzahG3J0vixz40hlnxx3pFP2T24,8988
|
|
38
38
|
kattis_cli/utils/run_program.py,sha256=NWQ6vtTeWgkaW75r91FIHGXR5cAbeu8yMb5hwzpYFsg,2613
|
|
39
39
|
kattis_cli/utils/utility.py,sha256=oUbydPbcC2wXvfku21YAWpaJjuBKaBRVybMAWCSfM9Y,2987
|
|
40
|
-
kattis_cli-1.2.
|
|
41
|
-
kattis_cli-1.2.
|
|
42
|
-
kattis_cli-1.2.
|
|
43
|
-
kattis_cli-1.2.
|
|
44
|
-
kattis_cli-1.2.
|
|
40
|
+
kattis_cli-1.2.4.dist-info/METADATA,sha256=sNfXgUu-6rbQzOBWMm62w8gVqDvoeBXSTjZC3dMwH-g,7299
|
|
41
|
+
kattis_cli-1.2.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
42
|
+
kattis_cli-1.2.4.dist-info/entry_points.txt,sha256=kyzGN20VqUPR_H0J_jJUKT-10-cAMFLVegQ6C7tbHss,47
|
|
43
|
+
kattis_cli-1.2.4.dist-info/licenses/LICENSE,sha256=JmBa4SEKBCDWEgiOZcISU4tUCpli6xSpVlSYgkBXSNQ,1067
|
|
44
|
+
kattis_cli-1.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|