Skip to content

Commit

Permalink
Rename module_programming_ast to module_programming_apted (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
marlon-luca-bu authored Jun 13, 2024
1 parent 2a089a5 commit 02625ab
Show file tree
Hide file tree
Showing 47 changed files with 718 additions and 647 deletions.
2 changes: 1 addition & 1 deletion .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ignore-paths:
- module_text_cofee/module_text_cofee/protobuf
- module_programming_themisml/module_programming_themisml/extract_methods/languages
- module_programming_themisml/module_programming_themisml/extract_methods/method_parser_listener.py
- module_programming_ast/module_programming_ast/convert_code_to_ast/languages
- module_programming_apted/module_programming_apted/convert_code_to_ast/languages

mypy:
run: true
Expand Down
4 changes: 2 additions & 2 deletions assessment_module_manager/modules.docker.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ url = http://module-programming-themisml:5005
type = programming
supports_evaluation = false

[module_programming_ast]
url = http://module-programming-ast:5006
[module_programming_apted]
url = http://module-programming-apted:5006
type = programming
supports_evaluation = false

Expand Down
2 changes: 1 addition & 1 deletion assessment_module_manager/modules.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ url = http://localhost:5005
type = programming
supports_evaluation = false

[module_programming_ast]
[module_programming_apted]
url = http://localhost:5006
type = programming
supports_evaluation = false
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ services:
- postgres
image: ls1tum/athena_module_programming_themisml:${ATHENA_TAG:-develop}

module_programming_ast:
hostname: module-programming-ast
module_programming_apted:
hostname: module-programming-apted
env_file:
- ${ATHENA_ENV_DIR:-./env_example}/module_programming_ast.env
- ${ATHENA_ENV_DIR:-./env_example}/module_programming_apted.env
depends_on:
- postgres
image: ls1tum/athena_module_programming_ast:${ATHENA_TAG:-develop}
image: ls1tum/athena_module_programming_apted:${ATHENA_TAG:-develop}

module_programming_code_embedding:
hostname: module-programming-code-embedding
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ services:
ports:
- "5005:5005"

module_programming_ast:
hostname: module-programming-ast
build: ./module_programming_ast
module_programming_apted:
hostname: module-programming-apted
build: module_programming_apted
depends_on:
- athena
ports:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

# This is the Dockerfile for the module_programming_ast.
# This is the Dockerfile for the module_programming_apted.

FROM python:3.11
LABEL org.opencontainers.image.source=https://github.com/ls1intum/Athena
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[module]
name = module_programming_ast
name = module_programming_apted
type = programming
port = 5006
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
"""
Entry point for the module_programming_ast module.
Entry point for the module_programming_apted module.
"""
import random
from typing import List, Any, cast
from pydantic import BaseModel, Field
from module_programming_ast.convert_code_to_ast.get_feedback_methods import get_feedback_method
from module_programming_ast.feedback_suggestions.feedback_suggestions import create_feedback_suggestions
from module_programming_apted.convert_code_to_ast.get_feedback_methods import get_feedback_method
from module_programming_apted.feedback_suggestions.feedback_suggestions import create_feedback_suggestions
from athena import (app, config_schema_provider, submissions_consumer, submission_selector, feedback_consumer,
feedback_provider, evaluation_provider, emit_meta)
from athena.logger import logger
from athena.storage import store_exercise, store_submissions, store_feedback, store_feedback_suggestions
from athena.programming import (Exercise, Submission, Feedback, get_stored_feedback_suggestions,
count_stored_submissions, get_stored_submissions)
from module_programming_ast.remove_overlapping import filter_overlapping_suggestions
from module_programming_ast.remove_suspicious import filter_suspicious
from module_programming_apted.remove_overlapping import filter_overlapping_suggestions
from module_programming_apted.remove_suspicious import filter_suspicious


@config_schema_provider
class Configuration(BaseModel):
"""Example configuration for the module_programming_ast module."""
"""Example configuration for the module_programming_apted module."""
debug: bool = Field(False, description="Whether the module is in **debug mode**. This is an example config option.")


Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from antlr4 import CommonTokenStream, InputStream
from antlr4.tree.Tree import ParseTreeWalker
from module_programming_ast.convert_code_to_ast.languages.python.Python3Lexer import Python3Lexer
from module_programming_ast.convert_code_to_ast.languages.python.Python3Parser import Python3Parser
from module_programming_ast.convert_code_to_ast.languages.java.JavaLexer import JavaLexer
from module_programming_ast.convert_code_to_ast.languages.java.JavaParser import JavaParser
from module_programming_ast.convert_code_to_ast.languages.python.Python3MethodParserListener import \
from module_programming_apted.convert_code_to_ast.languages.python.Python3Lexer import Python3Lexer
from module_programming_apted.convert_code_to_ast.languages.python.Python3Parser import Python3Parser
from module_programming_apted.convert_code_to_ast.languages.java.JavaLexer import JavaLexer
from module_programming_apted.convert_code_to_ast.languages.java.JavaParser import JavaParser
from module_programming_apted.convert_code_to_ast.languages.python.Python3MethodParserListener import \
MethodParserListener as PythonMethodParserListener
from module_programming_ast.convert_code_to_ast.languages.java.JavaMethodParserListener import \
from module_programming_apted.convert_code_to_ast.languages.java.JavaMethodParserListener import \
MethodParserListener as JavaMethodParserListener

# TODO: DO I need the to_ast method?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Optional

from athena.programming import Submission, Feedback
from module_programming_ast.convert_code_to_ast.extract_method_and_ast import parse
from module_programming_ast.convert_code_to_ast.method_node import MethodNode
from module_programming_apted.convert_code_to_ast.extract_method_and_ast import parse
from module_programming_apted.convert_code_to_ast.method_node import MethodNode
from athena.logger import logger


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from dataclasses import dataclass
from antlr4 import *

from module_programming_ast.convert_code_to_ast.languages.java.JavaParser import JavaParser
from module_programming_apted.convert_code_to_ast.languages.java.JavaParser import JavaParser


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@


if "." in __name__:
from module_programming_ast.convert_code_to_ast.languages.python.Python3LexerBase import Python3LexerBase
from module_programming_apted.convert_code_to_ast.languages.python.Python3LexerBase import Python3LexerBase
else:
from module_programming_ast.convert_code_to_ast.languages.python.Python3LexerBase import Python3LexerBase
from module_programming_apted.convert_code_to_ast.languages.python.Python3LexerBase import Python3LexerBase

def serializedATN():
return [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import TextIO
from antlr4 import *
from antlr4.Token import CommonToken
from module_programming_ast.convert_code_to_ast.languages.python.Python3Parser import Python3Parser
from module_programming_apted.convert_code_to_ast.languages.python.Python3Parser import Python3Parser

import sys
from typing import TextIO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from antlr4 import ParseTreeListener

from module_programming_ast.convert_code_to_ast.languages.python.Python3Parser import Python3Parser
from module_programming_ast.convert_code_to_ast.languages.python.Python3ParserListener import Python3ParserListener
from module_programming_apted.convert_code_to_ast.languages.python.Python3Parser import Python3Parser
from module_programming_apted.convert_code_to_ast.languages.python.Python3ParserListener import Python3ParserListener
from dataclasses import dataclass


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from antlr4 import *


class Python3ParserBase(Parser):

def CannotBePlusMinus(self) -> bool:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from athena.logger import logger
from athena.programming import Feedback, Submission

from module_programming_ast.convert_code_to_ast.extract_method_and_ast import parse
from module_programming_ast.convert_code_to_ast.method_node import MethodNode
from module_programming_ast.feedback_suggestions.ap_ted_computer import CodeSimilarityComputer
from module_programming_ast.feedback_suggestions.batch import batched
from module_programming_apted.convert_code_to_ast.extract_method_and_ast import parse
from module_programming_apted.convert_code_to_ast.method_node import MethodNode
from module_programming_apted.feedback_suggestions.ap_ted_computer import CodeSimilarityComputer
from module_programming_apted.feedback_suggestions.batch import batched


APTED_THRESHOLD = 10 # TODO Needs to be adapted
Expand Down
Loading

0 comments on commit 02625ab

Please sign in to comment.