Skip to content

Commit 9fe5fbb

Browse files
committed
feat: first commit
0 parents  commit 9fe5fbb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2506
-0
lines changed

.editorconfig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
end_of_line = lf
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2
10+
charset = utf-8
11+
tab_width = 4
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[*.py]
17+
indent_size = 4
18+
19+
[go.mod]
20+
indent_style = tab
21+
indent_size = 1
22+
23+
[*.go]
24+
indent_style = tab
25+
indent_size = 1
26+
27+
[Makefile]
28+
indent_style = tab
29+
indent_size = 1
30+
31+
[Makefile.*]
32+
indent_style = tab
33+
indent_size = 1
34+
35+
[LICENSE]
36+
indent_size = none

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 120

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
# * text eol=lf

.github/CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
This repository is released under the Apache License 2.0, and follows a standard GitHub development process. We use the GitHub tracker for issues and merge pull requests into the main branch.
4+
5+
## Project Structure
6+
7+
The project consists of a serverless backend written in Terraform for AWS, and a frontend written in ReactJS.
8+
9+
## How to Contribute
10+
11+
1. **Fork the Repository**: Start by forking the repository and then clone it locally.
12+
13+
2. **Create a Branch**: Create a new branch for each issue you're working on. Having a separate branch for each issue makes it easier to track changes and enables us to review your changes more effectively.
14+
15+
3. **Make Your Changes**: Make your changes in your branch. Be sure to test your changes!
16+
17+
4. **Commit Your Changes**: Commit your changes regularly and write commit messages that follow [these Conventional Commits guidelines](../SEMANTIC_VERSIONING.md). This will make it easier for us to follow your progress and understand what each commit does.
18+
19+
5. **Push Your Changes**: Push your changes to your fork on GitHub.
20+
21+
6. **Submit a Pull Request**: Once you're happy with your changes and you've pushed them to GitHub, you can create a pull request. We'll review your pull request and, if everything looks good, merge it into the main branch.
22+
23+
## Code of Conduct
24+
25+
We expect all contributors to follow our code of conduct. Please read our [Code of Conduct](../CODE_OF_CONDUCT.md) for details.
26+
27+
Thank you for considering contributing to our project!

.github/ISSUE_TEMPLATE/BUG-REPORT.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: "🐛 Bug Report"
2+
description: Create a new ticket for a bug.
3+
title: "🐛 [BUG] - <title>"
4+
labels: ["bug"]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: "Description"
10+
description: Please enter an explicit description of your issue
11+
placeholder: Short and explicit description of your incident...
12+
validations:
13+
required: true
14+
- type: input
15+
id: reprod-url
16+
attributes:
17+
label: "Reproduction URL"
18+
description: Please enter your GitHub URL to provide a reproduction of the issue
19+
placeholder: ex. https://github.com/USERNAME/REPO-NAME
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: reprod
24+
attributes:
25+
label: "Reproduction steps"
26+
description: Please enter an explicit description of your issue
27+
value: |
28+
1. Go to '...'
29+
2. Click on '....'
30+
3. Scroll down to '....'
31+
4. See error
32+
render: bash
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: screenshot
37+
attributes:
38+
label: "Screenshots"
39+
description: If applicable, add screenshots to help explain your problem.
40+
value: |
41+
![DESCRIPTION](LINK.png)
42+
render: bash
43+
validations:
44+
required: false
45+
- type: textarea
46+
id: logs
47+
attributes:
48+
label: "Logs"
49+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
50+
render: bash
51+
validations:
52+
required: false
53+
- type: dropdown
54+
id: browsers
55+
attributes:
56+
label: "Browsers"
57+
description: What browsers are you seeing the problem on ?
58+
multiple: true
59+
options:
60+
- Firefox
61+
- Chrome
62+
- Safari
63+
- Microsoft Edge
64+
- Opera
65+
validations:
66+
required: false
67+
- type: dropdown
68+
id: os
69+
attributes:
70+
label: "OS"
71+
description: What is the impacted environment ?
72+
multiple: true
73+
options:
74+
- Windows
75+
- Linux
76+
- Mac
77+
validations:
78+
required: false
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "💡 Feature Request"
2+
description: Create a new ticket for a new feature request
3+
title: "💡 [REQUEST] - <title>"
4+
labels: ["question"]
5+
body:
6+
- type: input
7+
id: start_date
8+
attributes:
9+
label: "Start Date"
10+
description: Start of development
11+
placeholder: "month/day/year"
12+
validations:
13+
required: false
14+
- type: textarea
15+
id: implementation_pr
16+
attributes:
17+
label: "Implementation PR"
18+
description: Pull request used
19+
placeholder: "#Pull Request ID"
20+
validations:
21+
required: false
22+
- type: textarea
23+
id: reference_issues
24+
attributes:
25+
label: "Reference Issues"
26+
description: Common issues
27+
placeholder: "#Issues IDs"
28+
validations:
29+
required: false
30+
- type: textarea
31+
id: summary
32+
attributes:
33+
label: "Summary"
34+
description: Provide a brief explanation of the feature
35+
placeholder: Describe in a few lines your feature request
36+
validations:
37+
required: true
38+
- type: textarea
39+
id: basic_example
40+
attributes:
41+
label: "Basic Example"
42+
description: Indicate here some basic examples of your feature.
43+
placeholder: A few specific words about your feature request.
44+
validations:
45+
required: true
46+
- type: textarea
47+
id: drawbacks
48+
attributes:
49+
label: "Drawbacks"
50+
description: What are the drawbacks/impacts of your feature request ?
51+
placeholder: Identify the drawbacks and impacts while being neutral on your feature request
52+
validations:
53+
required: true
54+
- type: textarea
55+
id: unresolved_question
56+
attributes:
57+
label: "Unresolved questions"
58+
description: What questions still remain unresolved ?
59+
placeholder: Identify any unresolved issues.
60+
validations:
61+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Pull Request Template
2+
3+
## Type of Change
4+
5+
<!-- What type of change does your code introduce? -->
6+
7+
- [ ] New feature
8+
- [ ] Bug fix
9+
- [ ] Documentation
10+
- [ ] Refactor
11+
- [ ] Chore
12+
13+
## Resolves
14+
15+
- Fixes #[Add issue number here.]
16+
17+
## Changes
18+
19+
<!-- Describe your changes in detail, if applicable. -->
20+
21+
_Describe what this Pull Request does_
22+
23+
## Testing
24+
25+
<!-- Describe how the changes can be tested -->
26+
27+
_Describe the testing that has been done or needs to be done_
28+
29+
## Screenshots
30+
31+
<!-- If applicable, add screenshots to help explain your changes -->
32+
33+
_Add any relevant screenshots_
34+
35+
## Dependencies
36+
37+
<!-- List any dependencies that are required for this change -->
38+
39+
_List dependencies_
40+
41+
## Breaking Changes
42+
43+
<!-- Does this PR contain any breaking changes? -->
44+
45+
_Describe any breaking changes_
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
#------------------------------------------------------------------------------
3+
# Run pre-commit
4+
#------------------------------------------------------------------------------
5+
name: Merge
6+
branding:
7+
icon: "git-pull-request"
8+
color: "orange"
9+
inputs:
10+
github-token:
11+
description: "The GitHub token to use for authentication"
12+
required: true
13+
type: string
14+
source-branch:
15+
description: "The branch to merge from"
16+
required: false
17+
type: string
18+
default: "main"
19+
target-branch:
20+
description: "The branch to merge to"
21+
required: true
22+
type: string
23+
24+
python-version:
25+
description: "The version of Python to use, such as 3.11.0"
26+
required: true
27+
type: string
28+
29+
runs:
30+
using: "composite"
31+
steps:
32+
- name: Checkout code
33+
id: checkout
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
persist-credentials: false
38+
39+
- name: Remember current branch
40+
shell: bash
41+
run: |
42+
echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV
43+
44+
- name: Merge
45+
id: merge
46+
shell: bash
47+
run: |
48+
git config --local user.email "action@github.com"
49+
git config --local user.name "GitHub Action"
50+
git checkout ${{ inputs.source-branch }}
51+
git pull
52+
git checkout ${{ inputs.target-branch }}
53+
git merge -Xtheirs ${{ inputs.source-branch }}
54+
git push https://${{ inputs.github-token }}@github.com/${{ github.repository }}.git HEAD:${{ inputs.target-branch }}
55+
56+
- name: Checkout current branch
57+
shell: bash
58+
run: |
59+
git checkout ${{ env.CURRENT_BRANCH }}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
#------------------------------------------------------------------------------
3+
# Run Python unit tests
4+
#------------------------------------------------------------------------------
5+
name: Test Python
6+
branding:
7+
icon: "git-pull-request"
8+
color: "orange"
9+
inputs:
10+
python-version:
11+
description: "The version of Python to use, such as 3.11.0"
12+
required: true
13+
type: string
14+
15+
env:
16+
REQUIREMENTS_PATH: "api/terraform/python/layer_genai/requirements.txt"
17+
18+
runs:
19+
using: "composite"
20+
steps:
21+
- name: Checkout code
22+
id: checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Cache Python dependencies
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{ inputs.python-version }}
37+
38+
- name: locate site-packages path
39+
shell: bash
40+
run: |
41+
echo "SITE_PACKAGES_PATH=$(python -c 'import site; print(site.getsitepackages()[0])')" >> $GITHUB_ENV
42+
43+
- name: Install pip
44+
shell: bash
45+
run: |
46+
python -m pip install --upgrade pip
47+
48+
- name: Install dependencies
49+
shell: bash
50+
run: |
51+
pip install -r ./requirements.txt
52+
env:
53+
SITE_PACKAGES_PATH: ${{ env.SITE_PACKAGES_PATH }}
54+
55+
- name: Create .env
56+
shell: bash
57+
run: |
58+
touch ./.env
59+
echo "OPENAI_API_ORGANIZATION=${{ env.OPENAI_API_ORGANIZATION }}" >> ./.env
60+
echo "OPENAI_API_KEY=${{ env.OPENAI_API_KEY }}" >> ./.env
61+
echo "PINECONE_API_KEY=${{ env.PINECONE_API_KEY }}" >> ./.env
62+
echo "PINECONE_ENVIRONMENT=${{ env.PINECONE_ENVIRONMENT }}" >> ./.env
63+
env:
64+
OPENAI_API_ORGANIZATION: "SET-ME-PLEASE"
65+
OPENAI_API_KEY: "SET-ME-PLEASE"
66+
PINECONE_API_KEY: "SET-ME-PLEASE"
67+
PINECONE_ENVIRONMENT: "SET-ME-PLEASE"
68+
69+
- name: Run Tests
70+
shell: bash
71+
run: |
72+
cd ./grader
73+
pytest -v -s tests/

0 commit comments

Comments
 (0)