Skip to content

Commit 8a1b80f

Browse files
authored
Merge pull request #114 from OpenLabsHQ/monorepo
2 parents 065607f + 9b88e59 commit 8a1b80f

File tree

428 files changed

+35302
-994
lines changed

Some content is hidden

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

428 files changed

+35302
-994
lines changed

.autorc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"git-tag"
44
],
55
"owner": "OpenLabsHQ",
6-
"repo": "API",
6+
"repo": "OpenLabs",
77
"name": "Alex Christy",
88
"email": "a.christy@ufl.edu"
99
}

.env.example

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,65 @@
1-
# API Configuration
2-
API_IP_ADDR=127.0.0.1
3-
API_PORT=8000
1+
##############################################
2+
# #
3+
# OpenLabs Security Settings #
4+
# #
5+
# THESE MUST BE CHANGED FOR SECURE USE! #
6+
# #
7+
##############################################
8+
9+
# --- Admin User ---
10+
ADMIN_EMAIL=admin@test.com
11+
ADMIN_PASSWORD="admin123" # <--- CHANGE THIS!
12+
ADMIN_NAME=Administrator
13+
414

5-
# PostgreSQL Configuration
15+
# --- Database Auth ---
616
POSTGRES_USER=postgres
7-
POSTGRES_PASSWORD=postgres
17+
POSTGRES_PASSWORD="ChangeMe123!" # <--- CHANGE THIS!
18+
19+
20+
# --- OpenLabs Auth ---
21+
SECRET_KEY="ChangeMe123!" # <--- GENERATE A LONG, RANDOM STRING!
22+
23+
24+
# --- Redis Queue Auth ---
25+
REDIS_QUEUE_PASSWORD="ChangeMe123!" # <--- CHANGE THIS!
26+
27+
28+
##############################################
29+
# #
30+
# OpenLabs Application Settings #
31+
# #
32+
# Defaults usually work for local setups. #
33+
# Adjust only for specific environments. #
34+
# #
35+
##############################################
836

9-
# localhost if launching without Docker
37+
# --- Frontend Settings ---
38+
FRONTEND_HOST=localhost
39+
FRONTEND_PORT=3000
40+
FRONTEND_URL="http://${FRONTEND_HOST}:${FRONTEND_PORT}"
41+
42+
43+
# --- API Settings ---
44+
API_BIND_ADDR=127.0.0.1
45+
API_PORT=8000
46+
API_HOST=localhost
47+
API_URL="http://${API_HOST}:${API_PORT}"
48+
49+
50+
# --- CORS Settings ---
51+
CORS_ORIGINS="${FRONTEND_URL}"
52+
CORS_CREDENTIALS=True
53+
CORS_METHODS="*"
54+
CORS_HEADERS="*"
55+
56+
57+
# --- Database Settings ---
1058
POSTGRES_SERVER=postgres
1159
POSTGRES_PORT=5432
1260
POSTGRES_DB=openlabs
1361

14-
# Expose PostgreSQL on host port for debugging
15-
POSTGRES_DEBUG_PORT=5432
16-
17-
# Admin User Configuration (optional)
18-
# Admin user is automatically created when database is initialized
19-
ADMIN_EMAIL=admin@test.com
20-
ADMIN_PASSWORD=admin123
21-
ADMIN_NAME=Administrator
22-
23-
# Authentication Configuration
24-
SECRET_KEY=your-secret-key-here
2562

26-
# Redis queue
27-
REDIS_QUEUE_HOST="redis"
28-
REDIS_QUEUE_PORT=6379
29-
REDIS_QUEUE_PASSWORD="your-redis-queue-password-here"
63+
# --- Redis Queue Settings ---
64+
REDIS_QUEUE_HOST=redis
65+
REDIS_QUEUE_PORT=6379

.env.tests.example

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
# AWS Deploy Test Credentials
1+
##############################################
2+
# #
3+
# OpenLabs Test Credentials #
4+
# #
5+
# Must be configured to run provider #
6+
# specific tests! #
7+
# #
8+
##############################################
9+
10+
# --- AWS ---
211
INTEGRATION_TEST_AWS_ACCESS_KEY=
312
INTEGRATION_TEST_AWS_SECRET_KEY=

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
- [ ] I have tested my changes locally and verified they work as expected.
55
- [ ] I have added relevant tests to cover my changes.
66
- [ ] I have made any necessary updates to the documentation.
7+
- [ ] I have made any necessary updates to the CLI.
8+
- [ ] I have made any necessary updates to the frontend.
79

810
## Description
911

1012
Provide a brief description of the changes made in this PR, including any related issues. Be sure to mention the purpose of the changes and how they address the issue.
1113

12-
Fixes: #<issue_number> (if applicable)
14+
Fixes: #<issue_number> (if applicable)

.github/goreleaser.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# test this file with
2+
# goreleaser release --config goreleaser.yml --clean --snapshot
3+
version: 2
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
- GOVERSION=1.19
8+
ldflags:
9+
- -s -w -X github.com/OpenLabsHQ/CLI/cmd.version={{.Version}} -X github.com/OpenLabsHQ/CLI/cmd.buildTime={{.Date}}
10+
flags:
11+
- -trimpath
12+
goos:
13+
- linux
14+
- darwin
15+
- windows
16+
goarch:
17+
- amd64
18+
- arm64
19+
binary: openlabs
20+
21+
nfpms:
22+
- maintainer: "https://github.com/OpenLabsHQ"
23+
package_name: openlabs
24+
formats:
25+
- deb
26+
- rpm
27+
- apk
28+
29+
archives:
30+
- format: tar.gz
31+
name_template: >-
32+
openlabs_
33+
{{- .Version }}_
34+
{{- .Os }}_
35+
{{- if eq .Arch "amd64" }}x86_64
36+
{{- else if eq .Arch "386" }}i386
37+
{{- else }}{{ .Arch }}{{ end }}
38+
{{- if .Arm }}v{{ .Arm }}{{ end }}
39+
format_overrides:
40+
- goos: windows
41+
format: zip
42+
files:
43+
- README.md
44+
- LICENSE*
45+
- CHANGELOG.md
46+
47+
checksum:
48+
name_template: 'checksums.txt'
49+
50+
snapshot:
51+
name_template: "{{ incpatch .Version }}"
52+
53+
release:
54+
draft: false
55+
prerelease: auto
56+
57+
changelog:
58+
sort: asc
59+
filters:
60+
exclude:
61+
- "^docs:"
62+
- "^test:"
63+
- "^ci:"
64+
- "^chore:"
65+
- "Merge pull request"
66+
- "Merge branch"

.github/workflows/api_lint.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: API Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'api/**'
9+
pull_request:
10+
branches:
11+
- '**'
12+
paths:
13+
- 'api/**'
14+
15+
permissions:
16+
contents: read
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
black:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
# Checkout the code
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
# Set up Python
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ vars.PYTHON_VERSION }}
36+
cache: 'pip'
37+
cache-dependency-path: |
38+
api/requirements.txt
39+
api/dev-requirements.txt
40+
41+
# Install dependencies
42+
- name: Install dependencies
43+
run: |
44+
cd api
45+
pip install --upgrade pip
46+
pip install -r requirements.txt
47+
pip install -r dev-requirements.txt
48+
49+
# Run Black formatter
50+
- name: Run Black
51+
run: |
52+
cd api
53+
black --check --diff .
54+
55+
mypy:
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
# Checkout the code
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
# Set up Python
64+
- name: Set up Python
65+
uses: actions/setup-python@v5
66+
with:
67+
python-version: ${{ vars.PYTHON_VERSION }}
68+
cache: 'pip'
69+
cache-dependency-path: |
70+
api/requirements.txt
71+
api/dev-requirements.txt
72+
73+
# Install dependencies
74+
- name: Install dependencies
75+
run: |
76+
cd api
77+
pip install --upgrade pip
78+
pip install -r requirements.txt
79+
pip install -r dev-requirements.txt
80+
81+
# Run MyPy checks
82+
- name: Run MyPy
83+
run: |
84+
cd api
85+
mypy --install-types --non-interactive .
86+
87+
ruff:
88+
runs-on: ubuntu-latest
89+
90+
steps:
91+
# Checkout the code
92+
- name: Checkout code
93+
uses: actions/checkout@v4
94+
95+
# Set up Python
96+
- name: Set up Python
97+
uses: actions/setup-python@v5
98+
with:
99+
python-version: ${{ vars.PYTHON_VERSION }}
100+
cache: 'pip'
101+
cache-dependency-path: |
102+
api/requirements.txt
103+
api/dev-requirements.txt
104+
105+
# Install dependencies
106+
- name: Install dependencies
107+
run: |
108+
cd api
109+
pip install --upgrade pip
110+
pip install -r requirements.txt
111+
pip install -r dev-requirements.txt
112+
113+
# Run Ruff linter and formatter
114+
- name: Run Ruff
115+
run: |
116+
cd api
117+
ruff check .

0 commit comments

Comments
 (0)