Skip to content

Commit

Permalink
Updated packages and cookiecutter (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
davorrunje authored Nov 11, 2024
1 parent d0bef46 commit 52e0928
Show file tree
Hide file tree
Showing 33 changed files with 86 additions and 22 deletions.
11 changes: 8 additions & 3 deletions docs/docs_src/getting_started/fastapi/folder_structure.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
my_fastagency_app
├── deployment
│   └── firebase
│   ├── allowed_users.yaml
│   └── firebase_config.yaml
├── docker
│   ├── Dockerfile
│   ├── nginx.conf.template
│   └── run_fastagency.sh
│   ├── content
│   │   ├── nginx.conf.template
│   │   └── run_fastagency.sh
│   └── Dockerfile
├── my_fastagency_app
│   ├── deployment
│   │   ├── __init__.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"ANTHROPIC_API_KEY": {
"description": "This key is optional and only needed if you are working with Anthropic API-related code. Leave it blank if not required. You can always set it later as an environment variable in the codespace terminal."
},
}
},
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/my_fastagency_app",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
serviceAccountKey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# list all allowed users
- [email protected]
# - [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# You can find the guide for getting the config values here:
# https://support.google.com/firebase/answer/7015592?hl=en#web&zippy=%2Cin-this-article
api_key: "<put your api_key here>"
auth_domain: "<put your auth_domain here>"
project_id: "<put your project_id here>"
storage_bucket: "<put your storage_bucket here>"
messaging_sender_id: "<put your messaging_sender_id here>"
app_id: "<put your app_id here>"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends nginx gettext \

COPY my_fastagency_app /app/my_fastagency_app

COPY pyproject.toml README.md docker/run_fastagency.sh docker/nginx.conf.template /app/
COPY pyproject.toml README.md /app/
COPY docker/content/* /app/


RUN pip install --upgrade pip && pip install --no-cache-dir -e "."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
provider = FastAPIAdapter.create_provider(
fastapi_url=fastapi_url,
)
ui = MesopUI()


app = FastAgency(
provider=provider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name = "my_fastagency_app"

dependencies = [
"fastagency[autogen,mesop,server,fastapi]>=0.3.0",

]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run -d --name deploy_fastagency -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8008:8008 -p 8888:8888 deploy_fastagency
docker run -it -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8008:8008 -p 8888:8888 deploy_fastagency
11 changes: 8 additions & 3 deletions docs/docs_src/getting_started/mesop/folder_structure.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
my_fastagency_app
├── deployment
│   └── firebase
│   ├── allowed_users.yaml
│   └── firebase_config.yaml
├── docker
│   ├── Dockerfile
│   ├── nginx.conf.template
│   └── run_fastagency.sh
│   ├── content
│   │   ├── nginx.conf.template
│   │   └── run_fastagency.sh
│   └── Dockerfile
├── my_fastagency_app
│   ├── deployment
│   │   ├── __init__.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"ANTHROPIC_API_KEY": {
"description": "This key is optional and only needed if you are working with Anthropic API-related code. Leave it blank if not required. You can always set it later as an environment variable in the codespace terminal."
},
}
},
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/my_fastagency_app",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
serviceAccountKey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# list all allowed users
- [email protected]
# - [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# You can find the guide for getting the config values here:
# https://support.google.com/firebase/answer/7015592?hl=en#web&zippy=%2Cin-this-article
api_key: "<put your api_key here>"
auth_domain: "<put your auth_domain here>"
project_id: "<put your project_id here>"
storage_bucket: "<put your storage_bucket here>"
messaging_sender_id: "<put your messaging_sender_id here>"
app_id: "<put your app_id here>"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends nginx gettext \

COPY my_fastagency_app /app/my_fastagency_app

COPY pyproject.toml README.md docker/run_fastagency.sh docker/nginx.conf.template /app/
COPY pyproject.toml README.md /app/
COPY docker/content/* /app/


RUN pip install --upgrade pip && pip install --no-cache-dir -e "."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name = "my_fastagency_app"

dependencies = [
"fastagency[autogen,mesop,server]>=0.3.0",

]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run -d --name deploy_fastagency -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8888:8888 deploy_fastagency
docker run -it -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8888:8888 deploy_fastagency
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
my_fastagency_app
├── deployment
│   └── firebase
│   ├── allowed_users.yaml
│   └── firebase_config.yaml
├── docker
│   ├── Dockerfile
│   ├── nginx.conf.template
│   └── run_fastagency.sh
│   ├── content
│   │   ├── nginx.conf.template
│   │   └── run_fastagency.sh
│   └── Dockerfile
├── my_fastagency_app
│   ├── deployment
│   │   ├── __init__.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"ANTHROPIC_API_KEY": {
"description": "This key is optional and only needed if you are working with Anthropic API-related code. Leave it blank if not required. You can always set it later as an environment variable in the codespace terminal."
},
}
},
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/my_fastagency_app",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
serviceAccountKey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# list all allowed users
- [email protected]
# - [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# You can find the guide for getting the config values here:
# https://support.google.com/firebase/answer/7015592?hl=en#web&zippy=%2Cin-this-article
api_key: "<put your api_key here>"
auth_domain: "<put your auth_domain here>"
project_id: "<put your project_id here>"
storage_bucket: "<put your storage_bucket here>"
messaging_sender_id: "<put your messaging_sender_id here>"
app_id: "<put your app_id here>"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends nginx gettext \

COPY my_fastagency_app /app/my_fastagency_app

COPY pyproject.toml README.md docker/run_fastagency.sh docker/nginx.conf.template /app/
COPY pyproject.toml README.md /app/
COPY docker/content/* /app/


RUN pip install --upgrade pip && pip install --no-cache-dir -e "."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
provider = FastAPIAdapter.create_provider(
fastapi_url=fastapi_url,
)
ui = MesopUI()


app = FastAgency(
provider=provider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name = "my_fastagency_app"

dependencies = [
"fastagency[autogen,mesop,server,fastapi,nats]>=0.3.0",

]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run -d --name deploy_fastagency -e OPENAI_API_KEY=$OPENAI_API_KEY -e NATS_URL=$NATS_URL -e FASTAGENCY_NATS_PASSWORD=$FASTAGENCY_NATS_PASSWORD -p 8000:8000 -p 8008:8008 -p 8888:8888 --network=host deploy_fastagency
docker run -it -e OPENAI_API_KEY=$OPENAI_API_KEY -e NATS_URL=$NATS_URL -e FASTAGENCY_NATS_PASSWORD=$FASTAGENCY_NATS_PASSWORD -p 8000:8000 -p 8008:8008 -p 8888:8888 --network=host deploy_fastagency
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ submodules = [
devdocs = [
"mkdocs==1.6.1",
"mkdocs-autorefs==1.2.0", # mkdocs build fails if upgraded
"mkdocs-material==9.5.42",
"mkdocs-material==9.5.44",
"mkdocs-static-i18n==1.2.3",
"mdx-include==1.4.2",
"mkdocstrings[python]==0.26.2",
"mkdocstrings[python]==0.27.0",
"mkdocs-literate-nav==0.6.1",
"mkdocs-git-revision-date-localized-plugin==1.3.0",
"mike==2.1.3", # versioning
Expand All @@ -118,11 +118,11 @@ lint = [
"types-ujson",
"types-Pygments",
"types-docutils",
"mypy==1.12.1",
"mypy==1.13.0",
"ruff==0.7.2",
"pyupgrade-directories==0.3.0",
"bandit==1.7.10",
"semgrep==1.95.0",
"semgrep==1.96.0",
"codespell==2.3.0",
"pytest-mypy-plugins==3.1.2",
]
Expand Down

0 comments on commit 52e0928

Please sign in to comment.