Skip to content

add file content #577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 78 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
99a26c5
changed some names
BrentBlanckaert Jan 11, 2025
667fd20
fixed some tests
BrentBlanckaert Jan 11, 2025
4a07970
fixed a test
BrentBlanckaert Jan 12, 2025
e834e9f
have something that works for stdin
BrentBlanckaert Jan 12, 2025
791836e
have something working for stdout/stderr
BrentBlanckaert Jan 12, 2025
ef29394
fixed all tests
BrentBlanckaert Jan 12, 2025
a00f09e
fixed some small issues
BrentBlanckaert Jan 12, 2025
ee2123c
made something that can be used to generate and evaluate multiple files.
BrentBlanckaert Jan 31, 2025
1b3b892
Updated output files to be more consistent and do better check. Also …
BrentBlanckaert Feb 1, 2025
32bb7d9
Made inlining for stdout and stderr possible and made everything more…
BrentBlanckaert Feb 1, 2025
2afdd67
Fixed some minor issues
BrentBlanckaert Feb 1, 2025
e01ebdc
Fixed the dsl yaml tests
BrentBlanckaert Feb 1, 2025
2ce7892
Fixed buildin oracle tests
BrentBlanckaert Feb 1, 2025
3a62f6d
Fixed the io function
BrentBlanckaert Feb 1, 2025
a845fb2
Fixed linting issue
BrentBlanckaert Feb 2, 2025
e939f30
fixed last tests
BrentBlanckaert Feb 18, 2025
10bd418
Added an extra test
BrentBlanckaert Feb 19, 2025
1d3aebd
Added some more tests
BrentBlanckaert Feb 19, 2025
2cb31f5
lint test
BrentBlanckaert Feb 19, 2025
2ce6701
covered an extra case
BrentBlanckaert Feb 19, 2025
70e3f21
added an extra case for invalid input
BrentBlanckaert Feb 20, 2025
441fc8b
fixed test
BrentBlanckaert Feb 24, 2025
9254c14
fixed linting
BrentBlanckaert Feb 24, 2025
3003cfc
cleaned up code
BrentBlanckaert Feb 26, 2025
723c1a6
fixed a small error
BrentBlanckaert Mar 5, 2025
af868cf
Added a better temporary better seperator
BrentBlanckaert Mar 5, 2025
6d59d54
Changed FileOutputChannel to work with list of objects instead of 3 l…
BrentBlanckaert Mar 5, 2025
e841287
fix tests
BrentBlanckaert Mar 6, 2025
d3e7d46
changed the input_files
BrentBlanckaert Mar 15, 2025
8e92928
Fixed some of the issues
BrentBlanckaert Mar 15, 2025
9e3e0a6
Fixed linting
BrentBlanckaert Mar 15, 2025
7bec950
Fixed test
BrentBlanckaert Mar 16, 2025
b6fe8e1
Added link support for stdin
BrentBlanckaert Mar 16, 2025
621f4a7
Added a few more checks
BrentBlanckaert Mar 16, 2025
317505a
Have a current version to work with multiple output files
BrentBlanckaert Mar 16, 2025
aa29560
cleaned up some code and used urls in stdin too
BrentBlanckaert Mar 17, 2025
2d1e568
Made attempt for stdout/stderr
BrentBlanckaert Mar 17, 2025
497f452
changed names again and splitted output files over multiple expected/…
BrentBlanckaert Mar 23, 2025
eb7dcbe
Fixed a bug and removed a few prints
BrentBlanckaert Mar 26, 2025
e8602ac
Added input file data and removed a lot of html generation
BrentBlanckaert Mar 29, 2025
83e69e1
fixed a few linting issues
BrentBlanckaert Mar 29, 2025
425e82d
made urls mandatory again
BrentBlanckaert Apr 7, 2025
06b68ad
Fixed stdin and and gave correct data for stdin
BrentBlanckaert Apr 8, 2025
da56d9c
changed student_path back to path for output files
BrentBlanckaert Apr 8, 2025
5713981
Made some new changes to stdin
BrentBlanckaert Apr 13, 2025
2d1fa4c
Made a few more updates to stdin
BrentBlanckaert Apr 17, 2025
d11fd5e
Changed channel to "File: <file>" when given output file content in f…
BrentBlanckaert Apr 17, 2025
78029c3
Made backward compatible and added warnings
BrentBlanckaert Apr 17, 2025
ca85311
Fixing linting and typing
BrentBlanckaert Apr 17, 2025
d664c3c
Fixed dsl_yaml tests
BrentBlanckaert Apr 18, 2025
8a8d81d
Fixed builtin oracle tests
BrentBlanckaert Apr 18, 2025
40a3596
merging with master
BrentBlanckaert Apr 18, 2025
3b950e8
removed some unused imports
BrentBlanckaert Apr 18, 2025
e637459
fixed linting
BrentBlanckaert Apr 18, 2025
98c339d
Wrote a few more tests
BrentBlanckaert Apr 18, 2025
b16f362
made extra tests for stdin
BrentBlanckaert Apr 18, 2025
4a9a961
Fixed test
BrentBlanckaert Apr 18, 2025
86642ac
Added changes for stdout and stderr
BrentBlanckaert Apr 20, 2025
114881f
Fixed tests and other issues
BrentBlanckaert Apr 20, 2025
730d8fd
Made a few more tests
BrentBlanckaert Apr 20, 2025
03df8c0
Fixed linting
BrentBlanckaert Apr 20, 2025
6a0808d
slight name change
BrentBlanckaert Apr 25, 2025
5c9a389
updated input_files
BrentBlanckaert Apr 25, 2025
858819d
updated stdin, stdout and stderr
BrentBlanckaert Apr 26, 2025
07c57ca
fixed test
BrentBlanckaert Apr 26, 2025
80ff847
input files no longer use url
BrentBlanckaert May 9, 2025
fd15d8c
small update for output files
BrentBlanckaert May 9, 2025
f440484
removed url from stdin
BrentBlanckaert May 9, 2025
5599053
changed stdout en stderr
BrentBlanckaert May 9, 2025
1cab274
fixed tests
BrentBlanckaert May 9, 2025
aab198e
Made an extra test
BrentBlanckaert May 9, 2025
2b90afd
Fixed linting
BrentBlanckaert May 9, 2025
2c06c20
changed how deprecated messages are handled
BrentBlanckaert May 12, 2025
04c28ad
solved some of the suggested issues
BrentBlanckaert May 12, 2025
8cdd78b
remove weird import added by IDE
BrentBlanckaert May 12, 2025
ef53242
fixed tests
BrentBlanckaert May 13, 2025
77d78c7
did a few simple changes
BrentBlanckaert May 13, 2025
b9d168b
fixed linting
BrentBlanckaert May 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions tested/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from attrs import define, evolve, field

from tested.dodona import ExtendedMessage
from tested.parsing import fallback_field, get_converter
from tested.testsuite import ExecutionMode, Suite, SupportedLanguage
from tested.utils import get_identifier, smart_close
Expand Down Expand Up @@ -129,6 +130,7 @@ class Bundle:
language: "Language"
global_config: GlobalConfig
out: IO
messages: set[ExtendedMessage] = set()

@property
def config(self) -> DodonaConfig:
Expand Down Expand Up @@ -207,6 +209,7 @@ def create_bundle(
output: IO,
suite: Suite,
language: str | None = None,
messages: set[ExtendedMessage] | None = None,
) -> Bundle:
"""
Create a configuration bundle.
Expand All @@ -216,7 +219,7 @@ def create_bundle(
:param suite: The test suite.
:param language: Optional programming language. If None, the one from the Dodona
configuration will be used.

:param messages: Messages generated out of the translate parser.
:return: The configuration bundle.
"""
import tested.languages as langs
Expand All @@ -232,4 +235,10 @@ def create_bundle(
suite=suite,
)
lang_config = langs.get_language(global_config, language)
return Bundle(language=lang_config, global_config=global_config, out=output)

if messages is None:
messages = set()

return Bundle(
language=lang_config, global_config=global_config, out=output, messages=messages
)
2 changes: 1 addition & 1 deletion tested/descriptions/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _render_dsl_statements(self, element: block.FencedCode) -> str:
rendered_dsl = self.render_children(element)

# Parse the DSL
parsed_dsl = parse_dsl(rendered_dsl)
parsed_dsl = parse_dsl(rendered_dsl).data

# Get all actual tests
tests = []
Expand Down
5 changes: 3 additions & 2 deletions tested/dodona.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Permission(StrEnum):
ZEUS = auto()


@define
@define(frozen=True)
class ExtendedMessage:
description: str
format: str = "text"
Expand All @@ -36,10 +36,11 @@ class ExtendedMessage:

@define
class Metadata:
"""Currently only used for the Python tutor"""
"""Currently used for the Python tutor and rendering files in Dodona."""

statements: str | None
stdin: str | None
files: list[dict[str, str]] | None


Message = ExtendedMessage | str
Expand Down
Loading
Loading