Skip to content

Commit

Permalink
Merge branch 'Josh-XT:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
CRCODE22 authored Apr 18, 2024
2 parents 6133966 + 1927a9e commit 7479b3b
Show file tree
Hide file tree
Showing 136 changed files with 5,492 additions and 3,750 deletions.
76 changes: 13 additions & 63 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,87 +15,37 @@ body:
id: description
attributes:
label: 'Description'
description: 'Please provide a clear and concise description of what is happening.'
description: 'Please provide a clear and concise description of what is happening and how to reproduce the issue if possible.'
placeholder: |
When I click the '...' button, the page refreshes instead of showing a confirmation message.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: 'Steps to Reproduce the Bug'
description: 'Provide the steps to reproduce the bug, be specific.'
placeholder: |
1. Go to the '...' page.
2. Click on the '...' button.
3. Scroll down to '...'.
4. Observe the error.
validations:
required: true
- type: textarea
id: expected
attributes:
label: 'Expected Behavior'
description: 'Please describe the expected behavior when the steps above are followed.'
placeholder: |
After clicking the '...' button, a confirmation message should appear.
validations:
required: true
- type: checkboxes
id: os
attributes:
label: 'Operating System'
description: 'Select the operating system(s) on which you experienced this bug.'
options:
- label: 'Linux'
- label: 'Microsoft Windows'
- label: 'Apple MacOS'
- label: 'Android'
- label: 'iOS'
- label: 'Other'
validations:
required: true
- type: checkboxes
id: python-version
attributes:
label: 'Python Version'
description: 'Select the Python version(s) affected by this bug.'
options:
- label: 'Python <= 3.9'
- label: 'Python 3.10'
- label: 'Python 3.11'
validations:
required: true
- type: checkboxes
id: environment
attributes:
label: 'Environment Type - Connection'
description: 'Select the environment(s) on which you experienced this bug (if you run frontend and backend on the same machine, select local).'
options:
- label: 'Local - You run AGiXT in your home network'
- label: 'Remote - You access AGiXT through the internet'
validations:
required: true
- type: checkboxes
id: containerized
attributes:
label: 'Runtime environment'
description: 'Select the container setup on which you experienced this bug.'
options:
- label: 'Using docker compose'
- label: 'Using local'
- label: 'Custom setup (please describe above!)'
validations:
required: true
- label: 'Windows'
- label: 'MacOS'
- type: checkboxes
id: acknowledgements
attributes:
label: 'Acknowledgements'
description: 'Please confirm the following:'
description: 'Please confirm the following before submitting an issue:'
options:
- label: 'I have searched the existing issues to make sure this bug has not been reported yet.'
- label: 'I am NOT trying to use localhost for providers running outside of the docker container.'
required: true
- label: 'I am NOT trying to run AGiXT outside of docker, the only supported method to run it.'
required: true
- label: 'PowerShell 7.X is installed and the version in use on the host machine.'
required: true
- label: 'Docker is installed and running on the host machine.'
required: true
- label: 'I am using the latest version of AGiXT.'
required: true
- label: 'I have provided enough information for the maintainers to reproduce and diagnose the issue.'
required: true
- label: 'I have searched the existing issues to make sure this bug has not been reported yet.'
required: true
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ Internal changes:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] My code follows the code style of this project and passes `yarn run lint`.
- [ ] My change requires a change to the documentation.
- [ ] My change works!
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Code Style Check

on:
push:
branches: [main]
pull_request:
branches:
- main
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/operation-docker-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ jobs:

- name: Log in to Docker Hub
if: inputs.registry-dockerhub-enable
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the Github registry
if: inputs.registry-github-enable
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -125,16 +125,16 @@ jobs:
echo "dockerhub-repo=${{ vars.DOCKERHUB_USERNAME }}/${{ inputs.registry-repo-name }}" >> "$GITHUB_ENV"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

# Needed for cache layers on github registry
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3.1.0

## Cache based contexts
- name: Restore cached context
if: inputs.context-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4.0.1
with:
path: cached-context
key: ${{ inputs.context-cache }}
Expand All @@ -147,20 +147,20 @@ jobs:

## Repo based context (fixes submodules etc)
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
if: inputs.context-repository
with:
fetch-depth: 1

- name: Checkout external context
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
if: inputs.context-repository
with:
repository: ${{ inputs.context-repository }}
ref: ${{ inputs.context-repository-ref }}
path: repository-context
fetch-depth: 1
submodules: true
submodules: false

- name: Set docker-context for repository
if: inputs.context-repository
Expand All @@ -183,7 +183,7 @@ jobs:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5.5.1
with:
images: ${{ env.image-names }}
# generate Docker tags based on the following events/attributes
Expand All @@ -194,7 +194,7 @@ jobs:

- name: Build and push Docker images
id: dockerBuild
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5.1.0
with:
platforms: ${{ inputs.platforms }}
file: ${{ inputs.dockerfile }}
Expand All @@ -207,7 +207,7 @@ jobs:
cache-to: ${{ inputs.cache-to }}

# publish README on docker hub
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 1

Expand All @@ -227,7 +227,7 @@ jobs:
#######
- name: Docker Hub Description
if: inputs.registry-dockerhub-enable
uses: peter-evans/dockerhub-description@v3
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
102 changes: 87 additions & 15 deletions .github/workflows/operation-test-with-jupyter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test junyper notebook
name: Run Tests
on:
workflow_call:
inputs:
Expand All @@ -11,11 +11,18 @@ on:
required: true
port:
type: string
port-mapping:
secondary-image:
type: string
required: false
description: "Secondary image to run"
default: "joshxt/safeexecute:latest"
secondary-image-port:
type: string
image-options:
required: false
description: "Port for the secondary image"
default: "5432"
port-mapping:
type: string
description: like --entrypoint, --command
additional-python-dependencies:
type: string
description: add whatever pip you need here
Expand All @@ -30,33 +37,91 @@ on:
append-logs:
type: boolean
default: false

clone-repo:
type: boolean
default: false
database-type:
type: string
default: "postgresql"
description: "Database type to use"
db-connected:
type: boolean
default: true
description: "If the database is connected"
report-name:
type: string
default: "test-reports"
description: "Name of the report"
auth-schema:
type: string
description: schema to use for authentication
default: company
sendgrid-api-key:
type: string
default: none
description: Optional sendgrid api-key available as os.getenv('SENDGRID_API_KEY') in your notebook
default-email:
type: string
default: none
description: Optional default email available as os.getenv('DEFAULT_EMAIL') in your notebook
secrets:
api-key:
description: Optional api-key available as os.getenv('API_KEY') in your notebook

jobs:
jupyter-test-job:
run-tests:
runs-on: ubuntu-latest
# container: python:3.10-slim-buster

outputs:
digest: ${{ steps.dockerBuild.outputs.digest }}
services:
dbservice:
image: postgres:latest
ports:
- 5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
secondary-service:
image: ${{ inputs.secondary-image }}
ports:
- ${{ inputs.secondary-image-port }}
env:
DB_CONNECTED: ${{ inputs.db-connected }}
DATABASE_TYPE: ${{ inputs.database-type }}
DATABASE_HOST: dbservice
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_PORT: 5432
DATABASE_NAME: postgres
SCHEMA: ${{ inputs.auth-schema }}
LOG_LEVEL: DEBUG
MFA_VERIFY: authenticator
service-under-test:
image: ${{ inputs.image }}
ports:
- ${{ inputs.port-mapping || format('{0}:{1}', inputs.port, inputs.port) }}
# options: ${{ inputs.image-options }}
# volumes:
# - /models:/models
env:
DB_CONNECTED: ${{ inputs.db-connected }}
DATABASE_TYPE: ${{ inputs.database-type }}
DATABASE_HOST: dbservice
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_PORT: 5432
DATABASE_NAME: postgres
SCHEMA: ${{ inputs.auth-schema }}
LOG_LEVEL: DEBUG
SENDGRID_API_KEY: ${{ inputs.sendgrid-api-key }}
DEFAULT_EMAIL: ${{ inputs.default-email }}
DEFAULT_SERVICE: sendgrid
MFA_VERIFY: authenticator

steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
fetch-depth: 1

Expand All @@ -67,6 +132,13 @@ jobs:
sudo apt-get update
sudo apt-get install --fix-missing -y pandoc texlive-xetex texlive-fonts-recommended texlive-plain-generic
- name: Clone repository and install package
if: inputs.clone-repo
run: |
git clone https://github.com/${{ github.repository }} /tmp/repo
cd /tmp/repo
pip3 install .
- name: Install additional dependencies for notebooks
if: inputs.additional-python-dependencies
run: pip3 install ${{ inputs.additional-python-dependencies }}
Expand Down Expand Up @@ -108,7 +180,7 @@ jobs:
run: |
echo "artifact-file=${{ env.artifact-file }}\n/test-output.log" >> "$GITHUB_ENV"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: test-reports
name: ${{ inputs.report-name }}
path: ${{ env.artifact-file }}
Loading

0 comments on commit 7479b3b

Please sign in to comment.