-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
✨ implemented python library as judge procedure schema
- Loading branch information
Showing
38 changed files
with
1,104 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -14,4 +14,7 @@ Cargo.lock | |
*.pdb | ||
|
||
# .env | ||
.env | ||
.env | ||
|
||
# .venv | ||
.venv |
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 @@ | ||
3.12.8 |
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,17 @@ | ||
[project] | ||
name = "traojudge-judge-workspace" | ||
version = "0.1.0" | ||
description = "Rye workspace for traO-Judge-judge repository" | ||
dependencies = [] | ||
readme = "README.md" | ||
requires-python = ">= 3.8" | ||
|
||
[tool.rye] | ||
managed = true | ||
dev-dependencies = [] | ||
|
||
[tool.rye.workspace] | ||
members = ["traopy/example", "traopy"] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["traopy"] |
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,79 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: true | ||
# with-sources: false | ||
# generate-hashes: false | ||
# universal: false | ||
|
||
-e file:. | ||
-e file:traopy | ||
-e file:traopy/example | ||
asttokens==3.0.0 | ||
# via stack-data | ||
comm==0.2.2 | ||
# via ipykernel | ||
debugpy==1.8.12 | ||
# via ipykernel | ||
decorator==5.1.1 | ||
# via ipython | ||
executing==2.2.0 | ||
# via stack-data | ||
ipykernel==6.29.5 | ||
# via traopy-example | ||
ipython==8.32.0 | ||
# via ipykernel | ||
jedi==0.19.2 | ||
# via ipython | ||
jupyter-client==8.6.3 | ||
# via ipykernel | ||
jupyter-core==5.7.2 | ||
# via ipykernel | ||
# via jupyter-client | ||
matplotlib-inline==0.1.7 | ||
# via ipykernel | ||
# via ipython | ||
nest-asyncio==1.6.0 | ||
# via ipykernel | ||
packaging==24.2 | ||
# via ipykernel | ||
parso==0.8.4 | ||
# via jedi | ||
pexpect==4.9.0 | ||
# via ipython | ||
platformdirs==4.3.6 | ||
# via jupyter-core | ||
prompt-toolkit==3.0.50 | ||
# via ipython | ||
psutil==7.0.0 | ||
# via ipykernel | ||
ptyprocess==0.7.0 | ||
# via pexpect | ||
pure-eval==0.2.3 | ||
# via stack-data | ||
pygments==2.19.1 | ||
# via ipython | ||
python-dateutil==2.9.0.post0 | ||
# via jupyter-client | ||
pyzmq==26.2.1 | ||
# via ipykernel | ||
# via jupyter-client | ||
six==1.17.0 | ||
# via python-dateutil | ||
stack-data==0.6.3 | ||
# via ipython | ||
tornado==6.4.2 | ||
# via ipykernel | ||
# via jupyter-client | ||
traitlets==5.14.3 | ||
# via comm | ||
# via ipykernel | ||
# via ipython | ||
# via jupyter-client | ||
# via jupyter-core | ||
# via matplotlib-inline | ||
wcwidth==0.2.13 | ||
# via prompt-toolkit |
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,79 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: true | ||
# with-sources: false | ||
# generate-hashes: false | ||
# universal: false | ||
|
||
-e file:. | ||
-e file:traopy | ||
-e file:traopy/example | ||
asttokens==3.0.0 | ||
# via stack-data | ||
comm==0.2.2 | ||
# via ipykernel | ||
debugpy==1.8.12 | ||
# via ipykernel | ||
decorator==5.1.1 | ||
# via ipython | ||
executing==2.2.0 | ||
# via stack-data | ||
ipykernel==6.29.5 | ||
# via traopy-example | ||
ipython==8.32.0 | ||
# via ipykernel | ||
jedi==0.19.2 | ||
# via ipython | ||
jupyter-client==8.6.3 | ||
# via ipykernel | ||
jupyter-core==5.7.2 | ||
# via ipykernel | ||
# via jupyter-client | ||
matplotlib-inline==0.1.7 | ||
# via ipykernel | ||
# via ipython | ||
nest-asyncio==1.6.0 | ||
# via ipykernel | ||
packaging==24.2 | ||
# via ipykernel | ||
parso==0.8.4 | ||
# via jedi | ||
pexpect==4.9.0 | ||
# via ipython | ||
platformdirs==4.3.6 | ||
# via jupyter-core | ||
prompt-toolkit==3.0.50 | ||
# via ipython | ||
psutil==7.0.0 | ||
# via ipykernel | ||
ptyprocess==0.7.0 | ||
# via pexpect | ||
pure-eval==0.2.3 | ||
# via stack-data | ||
pygments==2.19.1 | ||
# via ipython | ||
python-dateutil==2.9.0.post0 | ||
# via jupyter-client | ||
pyzmq==26.2.1 | ||
# via ipykernel | ||
# via jupyter-client | ||
six==1.17.0 | ||
# via python-dateutil | ||
stack-data==0.6.3 | ||
# via ipython | ||
tornado==6.4.2 | ||
# via ipykernel | ||
# via jupyter-client | ||
traitlets==5.14.3 | ||
# via comm | ||
# via ipykernel | ||
# via ipython | ||
# via jupyter-client | ||
# via jupyter-core | ||
# via matplotlib-inline | ||
wcwidth==0.2.13 | ||
# via prompt-toolkit |
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 @@ | ||
# python generated files | ||
__pycache__/ | ||
*.py[oc] | ||
build/ | ||
dist/ | ||
wheels/ | ||
*.egg-info | ||
# Rust | ||
target/ | ||
|
||
# venv | ||
.venv | ||
|
||
python/traopy/* | ||
!python/traopy/__init__.py | ||
!python/traopy/lowlevel.pyi | ||
!python/traopy/py.typed |
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 @@ | ||
3.12.8 |
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,21 @@ | ||
[package] | ||
name = "traopy" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
name = "traopy" | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[dependencies] | ||
pyo3 = { workspace = true } | ||
pyo3-stub-gen = { workspace = true } | ||
uuid = { workspace = true } | ||
serde = { workspace = true } | ||
serde_json = { workspace = true } | ||
anyhow = { workspace = true } | ||
judge_core = { path = "../judge_core" } | ||
|
||
[features] | ||
abi3 = ["pyo3/abi3-py37", "generate-import-lib"] | ||
generate-import-lib = ["pyo3/generate-import-lib"] |
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,3 @@ | ||
# traopy | ||
|
||
Describe your project here. |
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,10 @@ | ||
# python generated files | ||
__pycache__/ | ||
*.py[oc] | ||
build/ | ||
dist/ | ||
wheels/ | ||
*.egg-info | ||
|
||
# venv | ||
.venv |
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 @@ | ||
3.12.8 |
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,3 @@ | ||
# simple-judge | ||
|
||
Describe your project here. |
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 @@ | ||
judge_procedure.json |
24 changes: 24 additions & 0 deletions
24
traopy/example/problems/addition/judge_procedure_sample.json
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,24 @@ | ||
{ | ||
"resources": { | ||
"output": { "TextFile": { "name": "output", "content": "3\n" } }, | ||
"actual": { "OnetimeTextFile": { "name": "actual" } }, | ||
"input": { "TextFile": { "name": "input", "content": "1 2\n" } } | ||
}, | ||
"executions": { | ||
"test": { | ||
"name": "test", | ||
"script_name": "script", | ||
"depends_on": [ | ||
{ "ref_to": "input", "envvar_name": "INPUT" }, | ||
{ "ref_to": "output", "envvar_name": "OUTPUT" }, | ||
{ "ref_to": "actual", "envvar_name": "ACTUAL" } | ||
] | ||
} | ||
}, | ||
"scripts": { | ||
"script": { | ||
"content": "import os\n\noutput_file = os.getenv('output')\nactual_output_file = os.getenv('actual')\n\nif output_file and actual_output_file:\n with open(output_file, 'r', encoding='utf-8') as f:\n output_text = f.read()\n\n with open(actual_output_file, 'r', encoding='utf-8') as f:\n actual_output = f.read()\n\n if output_text == actual_output:\n print(\"Test Passed\")\n else:\n print(\"Test Failed\")\nelse:\n print(\"Input and output files not found\")\n", | ||
"name": "script" | ||
} | ||
} | ||
} |
Oops, something went wrong.