Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync wasp 0.14 #2

Merged
merged 9 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/python-3.10/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.10",
"service": "python-3.10-fastagencyapi",
"forwardPorts": [
"${containerEnv:CONTAINER_PREFIX}-nats-py310-fastagencyapi:9222"
],
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/python-3.10/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: '3'

services:
python-3.10: # nosemgrep
python-3.10-fastagencyapi: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.10
container_name: $USER-python-3.10-fastagencyapi
volumes:
- ../../:/workspaces/fastagencyapi:cached
command: sleep infinity
environment:
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py310-fastagencyapi:5432/fastagencyapi
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py310-fastagencyapi:5432/pyfastagencyapi
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py310-fastagencyapi:5432/fastagency
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py310-fastagencyapi:5432/pyfastagency
- NATS_URL=nats://${USER}-nats-py310-fastagencyapi:4222
env_file:
- ../devcontainer.env
Expand All @@ -34,7 +34,7 @@ services:
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password # pragma: allowlist secret
POSTGRES_DB: fastagencyapi
POSTGRES_DB: fastagency
# ports:
# - "${PORT_PREFIX}5432:5432"
networks:
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/python-3.11/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.11",
"service": "python-3.11-fastagencyapi",
"forwardPorts": [
"${containerEnv:CONTAINER_PREFIX}-nats-py311-fastagencyapi:9222"
],
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/python-3.11/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: '3'

services:
python-3.11: # nosemgrep
python-3.11-fastagencyapi: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.11
container_name: $USER-python-3.11-fastagencyapi
volumes:
- ../../:/workspaces/fastagencyapi:cached
command: sleep infinity
environment:
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py311-fastagencyapi:5432/fastagencyapi
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py311-fastagencyapi:5432/pyfastagencyapi
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py311-fastagencyapi:5432/fastagency
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py311-fastagencyapi:5432/pyfastagency
- NATS_URL=nats://${USER}-nats-py311-fastagencyapi:4222
env_file:
- ../devcontainer.env
Expand All @@ -34,7 +34,7 @@ services:
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password # pragma: allowlist secret
POSTGRES_DB: fastagencyapi
POSTGRES_DB: fastagency
# ports:
# - "${PORT_PREFIX}5432:5432"
networks:
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/python-3.12/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.12",
"service": "python-3.12-fastagencyapi",
"forwardPorts": [
"${containerEnv:CONTAINER_PREFIX}-nats-py312-fastagencyapi:9222"
],
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/python-3.12/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: '3'

services:
python-3.12: # nosemgrep
python-3.12-fastagencyapi: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.12
container_name: $USER-python-3.12-fastagencyapi
volumes:
- ../../:/workspaces/fastagencyapi:cached
command: sleep infinity
environment:
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py312-fastagencyapi:5432/fastagencyapi
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py312-fastagencyapi:5432/pyfastagencyapi
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py312-fastagencyapi:5432/fastagency
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py312-fastagencyapi:5432/pyfastagency
- NATS_URL=nats://${USER}-nats-py312-fastagencyapi:4222
env_file:
- ../devcontainer.env
Expand All @@ -34,7 +34,7 @@ services:
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password # pragma: allowlist secret
POSTGRES_DB: fastagencyapi
POSTGRES_DB: fastagency
# ports:
# - "${PORT_PREFIX}5432:5432"
networks:
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/python-3.9/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.9",
"service": "python-3.9-fastagencyapi",
"forwardPorts": [
"${containerEnv:CONTAINER_PREFIX}-nats-py39-fastagencyapi:9222"
],
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/python-3.9/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: '3'

services:
python-3.9: # nosemgrep
python-3.9-fastagencyapi: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.9
container_name: $USER-python-3.9-fastagencyapi
volumes:
- ../../:/workspaces/fastagencyapi:cached
command: sleep infinity
environment:
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py39-fastagencyapi:5432/fastagencyapi
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py39-fastagencyapi:5432/pyfastagencyapi
- DATABASE_URL=postgresql://admin:password@${USER}-postgres-py39-fastagencyapi:5432/fastagency
- PY_DATABASE_URL=postgresql://admin:password@${USER}-postgres-py39-fastagencyapi:5432/pyfastagency
- NATS_URL=nats://${USER}-nats-py39-fastagencyapi:4222
env_file:
- ../devcontainer.env
Expand All @@ -34,7 +34,7 @@ services:
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password # pragma: allowlist secret
POSTGRES_DB: fastagencyapi
POSTGRES_DB: fastagency
# ports:
# - "${PORT_PREFIX}5432:5432"
networks:
Expand Down
7 changes: 2 additions & 5 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ pip install -e ".[dev]"
# install pre-commit hook if not installed already
pre-commit install

# create .mypy_cache directory (see https://github.com/python/mypy/issues/10768#issuecomment-2178450153)
mkdir .mypy_cache

# install wasp
curl -sSL https://get.wasp-lang.dev/installer.sh | sh
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v 0.14.0

cd app && wasp db migrate-dev && cd ..

prisma migrate deploy
prisma migrate deploy --schema=schema.prisma
prisma generate --schema=schema.prisma --generator=pyclient

# Install packages for auth callout
Expand Down
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: 'Bug:'
labels: bug
assignees: ''
---

**Describe the bug**
Provide a clear and concise description of the bug.

**How to reproduce**
Include source code:

```python
from fastagency import FastAgency
...
```

And/Or steps to reproduce the behavior:

1. ...

**Expected behavior**
Explain what you expected to happen clearly and concisely.

**Observed behavior**
Describe what is actually happening clearly and concisely.

**Screenshots**
If applicable, attach screenshots to help illustrate the problem.

**Environment**
Include the output of the `fastagency -v` command to display your current project and system environment.

**Additional context**
Provide any other relevant context or information about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true

contact_links:
- name: Security Contact
about: Please report security vulnerabilities to info@airt.ai
- name: Question or Problem
about: Ask a question or ask about a problem in GitHub Discussions.
url: https://github.com/airtai/fastagency/discussions/categories/questions
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Feature Request
about: Suggest an idea for this project
title: 'Feature:'
labels: enhancement
assignees: ''
---

To suggest an idea or inquire about a new Message Broker supporting feature or any other enhancement, please follow this template:

**Is your feature request related to a problem? Please describe.**
Provide a clear and concise description of the problem you've encountered. For example: "I'm always frustrated when..."

**Describe the solution you'd like**
Clearly and concisely describe the desired outcome or solution.

**Feature code example**
To help others understand the proposed feature, illustrate it with a **FastAgency** code example:

```python
from fastagency import FastAgency
...
```

**Describe alternatives you've considered**
Provide a clear and concise description of any alternative solutions or features you've thought about.

**Additional context**
Include any other relevant context or screenshots related to the feature request.
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Description

Please include a summary of the change and specify which issue is being addressed. Additionally, provide relevant motivation and context.

Fixes # (issue number)

## Type of change

Please delete options that are not relevant.

- [ ] Documentation (typos, code examples, or any documentation updates)
- [ ] Bug fix (a non-breaking change that resolves an issue)
- [ ] New feature (a non-breaking change that adds functionality)
- [ ] Breaking change (a fix or feature that would disrupt existing functionality)
- [ ] This change requires a documentation update

## Checklist

- [ ] My code adheres to the style guidelines of this project (`scripts/lint.sh` shows no errors)
- [ ] I have conducted a self-review of my own code
- [ ] I have made the necessary changes to the documentation
- [ ] My changes do not generate any new warnings
- [ ] I have added tests to validate the effectiveness of my fix or the functionality of my new feature
- [ ] Both new and existing unit tests pass successfully on my local environment by running `scripts/test-cov.sh`
- [ ] I have ensured that static analysis tests are passing by running `scripts/static-anaylysis.sh`
- [ ] I have included code examples to illustrate the modifications
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# Python
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
# Pnpm
- package-ecosystem: "pnpm"
directory: "/auth_callout"
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/workflows/check-broken-links-in-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check docs for broken links

on:
workflow_run:
workflows: ["pages-build-deployment"]
types: [completed]

jobs:
check-broken-link:
name: Check docs for broken links
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Check links using container
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://fastagency.airt.ai
cmd_params: '--buffer-size=8192 --max-connections=1 --color=always --header="User-Agent:Mozilla/5.0(Firefox/97.0)" --exclude="(localhost:8000|linkedin.com|fonts.gstatic.com|reddit.com)" --max-connections-per-host=1 --rate-limit=1'
debug: true
83 changes: 83 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '39 20 * * 0'

jobs:
analyze:
if: github.event.pull_request.draft == false
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3 # nosemgrep
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3 # nosemgrep

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3 # nosemgrep
with:
category: "/language:${{matrix.language}}"
Loading
Loading