-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Multi-tenancy (support multiple agencies) (#2)
- Refactor **main.py** and **agency_manager.py** to support config persistence (given correct agency_id) and multi-tenancy (can handle multiple configs); - Refactor **config.py** to support abstract config loading and saving by agency_id; - Add tools: - built-in: CodeInterpreter, Retrieval (not tested yet); - custom: BuildDirectoryTree, PrintAllFilesInDirectory + add tests. - Remove Frontend code from this repo (will be in a separate repo).
- Loading branch information
Showing
56 changed files
with
997 additions
and
5,200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Publish to Google Artifact Registry | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
env: | ||
PROJECT_ID: XXX | ||
SERVICE_ACCOUNT: XXX | ||
WORKLOAD_IDENTITY_PROVIDER: XXX | ||
REPOSITORY_URL: XXX | ||
|
||
jobs: | ||
# Build the python package file and push to Google Artifacts Repository | ||
push-package: | ||
name: Build and publish the Docker image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: 'poetry' | ||
- run: poetry install | ||
- name: Build Package | ||
run: poetry build | ||
- name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
project_id: ${{ env.PROJECT_ID }} | ||
workload_identity_provider: ${{ env.WORKLOAD_IDENTITY_PROVIDER }} | ||
service_account: ${{ env.SERVICE_ACCOUNT }} | ||
- name: Set up Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
- name: Upload to Artifact Registry | ||
run: | | ||
python -m pip install keyrings.google-artifactregistry-auth | ||
python -m pip install twine | ||
python -m twine upload --repository-url $REPOSITORY_URL dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.11] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'poetry' | ||
- run: poetry install | ||
- run: poetry run pytest |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.