Skip to content

Commit

Permalink
Merge branch 'develop' into feature/decouple-artemis-from-athena
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytropolityka authored Jun 7, 2024
2 parents 0f45254 + 8a75867 commit 4324ea6
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 17 deletions.
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: 🐛 Bug Report
description: Something's not working in Athena? File a bug report!
labels: ["bug"]
body:
- type: markdown
attributes:
value: Thank you for taking the time to fill out this bug report! Please provide as much detail as possible to help us identify and fix the problem.
- type: textarea
attributes:
label: Please describe the bug
description: A clear and concise description of what the bug is.
placeholder: What has gone wrong? Please be as specific as possible.
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
description: "Steps to reproduce the behavior:"
value: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: What did you expect to happen instead?
validations:
required: true
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: dropdown
attributes:
label: What module is this bug related to?
multiple: true
options:
- Assessment Module Manager
- Modeling LLM
- Programming AST
- Programming Code Embedding
- Programming LLM
- Programming ThemisML
- Text CoFee
- Text LLM
- Playground
- Other (specify in "Additional context")
validations:
required: true
- type: dropdown
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Chrome
- Safari
- Microsoft Edge
- Firefox
- Other (specify in "Additional context")
- type: input
attributes:
label: Operating System
description: The operating system you're using. E.g. Windows 11, macOS Sonoma, Ubuntu 20.04, etc.
- type: textarea
attributes:
label: Additional context
description: Add any other context to the problem here.
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: markdown
attributes:
value: Thanks for completing our form! Please click the "Submit new issue" button below to submit your bug report.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🚀 Feature Request
description: Something's missing in Athena? Suggest a new feature!
labels: [feature]
body:
- type: markdown
attributes:
value: Thank you for taking the time to submit a feature request! Please describe your request in detail so that we can understand your ideas.
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: A clear and concise description of what the problem is.
placeholder: "For example: I'm always frustrated when [...] or I wish I could [...]."
- type: textarea
attributes:
label: Describe the solution you'd like
description: Feel free to upload additional material such as mock-ups, diagrams, or sketches to support your idea.
validations:
required: true
- type: textarea
attributes:
label: Describe the alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Additional context
description: Add any additional context or screenshots here.
8 changes: 4 additions & 4 deletions module_modeling_llm/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions module_text_cofee/module_text_cofee/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def send_submissions(exercise: Exercise, submissions: List[Submission]):
"Authorization": COFEE_AUTH_TOKEN,
},
timeout=60,
# TODO: remove this again:
verify=False, # Ignore SSL errors for now, because athenetest1-01 has an invalid certificate
verify=env.PRODUCTION,
)
resp.raise_for_status()
logger.info("Submissions sent to CoFee")
Expand All @@ -69,12 +68,19 @@ async def save_athene_result(exercise_id: int, request: Request):
Saves automatic textAssessments of Athena.
"""
logger.info("Received callback from CoFee")

# check if auth token is present
if 'Authorization' not in request.headers:
raise HTTPException(status_code=401, detail="Authorization header is missing.")

# validate auth token
auth_token = request.headers['authorization']
if auth_token != COFEE_AUTH_TOKEN:
if request.headers['Authorization'] != COFEE_AUTH_TOKEN:
if env.PRODUCTION:
raise HTTPException(status_code=401, detail="Invalid API secret.")
logger.warning("DEBUG MODE: Ignoring invalid API secret.")

# TODO: check if exercise id actually exists

cofee_resp = cofee_pb2.AtheneResponse.FromString(await request.body()) # type: ignore
clusters = cofee_resp.clusters
segments = cofee_resp.segments
Expand Down
8 changes: 4 additions & 4 deletions playground/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"eslint": "8.52.0",
"eslint-config-next": "13.5.6",
"inquirer": "9.2.11",
"mysql2": "3.9.7",
"mysql2": "3.9.8",
"typescript": "5.2.2"
}
}
8 changes: 4 additions & 4 deletions playground/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3260,10 +3260,10 @@ [email protected]:
resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz"
integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==

[email protected].7:
version "3.9.7"
resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-3.9.7.tgz#843755daf65b5ef08afe545fe14b8fb62824741a"
integrity sha512-KnJT8vYRcNAZv73uf9zpXqNbvBG7DJrs+1nACsjZP1HMJ1TgXEy8wnNilXAn/5i57JizXKtrUtwDB7HxT9DDpw==
[email protected].8:
version "3.9.8"
resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-3.9.8.tgz#fe8a0f975f2c495ed76ca988ddc5505801dc49ce"
integrity sha512-+5JKNjPuks1FNMoy9TYpl77f+5frbTklz7eb3XDwbpsERRLEeXiW2PDEkakYF50UuKU2qwfGnyXpKYvukv8mGA==
dependencies:
denque "^2.1.0"
generate-function "^2.3.1"
Expand Down

0 comments on commit 4324ea6

Please sign in to comment.