Skip to content

Commit

Permalink
fix: conflicts solved
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixNicolaeBucsa committed Jul 19, 2024
2 parents 3193e1c + c6e803b commit 333e103
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ jobs:
- name: Build and Push Images
run: |
<<<<<<< HEAD
./k8s/build-img.py -p production
env:
=======
./scripts/build-img.py
env:
IMAGE_REPOSITORY: ${{ secrets.PRODUCTION_IMAGE_REPOSITORY }}
>>>>>>> c6e803b1d79d5c7465d15716703f26ca97676191
BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }}
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }}
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ jobs:
- name: Build and Push Images
run: |
<<<<<<< HEAD
./k8s/build-img.py -p staging
env:
=======
./scripts/build-img.py
env:
IMAGE_REPOSITORY: ${{ secrets.STAGING_IMAGE_REPOSITORY }}
>>>>>>> c6e803b1d79d5c7465d15716703f26ca97676191
BACKEND_URL: ${{ secrets.STAGING_NEXT_PUBLIC_BACKEND_URL }}
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }}
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
Expand All @@ -45,6 +51,7 @@ jobs:
NEWSLETTER_BASE_URL: ${{ secrets.NEWSLETTER_BASE_URL }}
SENDER_TOKEN: ${{ secrets.SENDER_TOKEN }}

<<<<<<< HEAD
deploy:
name: Deployment
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,3 +100,12 @@ jobs:
./k8s/docs/ \
--set-string website.image.tag=$IMAGE_TAG \
-n $NAMESPACE
=======
- name: Repository Dispatch
run: |
curl -f -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.ORG_DISPATCH_RENDER_TOKEN }}" \
--request POST \
--data '{"event_type": "docs-staging-build", "client_payload": {"image": "'"${{ secrets.STAGING_IMAGE_REPOSITORY }}"'" , "image_path": "values", "key_path": ".website.image.tag", "commit_message_service": "Docs Staging", "tag": "'"${{ steps.lookup.outputs.version }}"'"}}' \
https://api.github.com/repos/fetchai/infra-sandbox-london-b-deployment/dispatches
>>>>>>> c6e803b1d79d5c7465d15716703f26ca97676191
4 changes: 4 additions & 0 deletions .github/workflows/pr-title-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
pull_request_target:
types:
- opened
<<<<<<< HEAD
- editedgit
=======
- edited
>>>>>>> c6e803b1d79d5c7465d15716703f26ca97676191
- synchronize

jobs:
Expand Down
5 changes: 2 additions & 3 deletions pages/guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</div>
import GuideMdx from "../components/guide-mdx"


<GuideMdx content={ [
{
type: "Agents",
Expand Down Expand Up @@ -373,12 +372,12 @@ import GuideMdx from "../components/guide-mdx"
type: "Courses",
data: [
{
title: "Agents 101 🤖️",
title: "Agents 101",
description: "A non-developer beginner level guide to get you started with the basic concepts to create your first Agents project.",
path: "/guides/agent-courses/introductory-course"
},
{
title: "Agents 101 for AI Engine 🤖",
title: "Agents 101 for AI Engine",
description: "A beginner level guide to get you started with the AI Engine, Agentverse Functions and DeltaV.",
path: "/guides/agent-courses/agents-for-ai"
}
Expand Down
3 changes: 0 additions & 3 deletions pages/guides/agents/getting-started/whats-an-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { Callout } from 'nextra/components'

# Agents - uAgents Framework



## Introduction

The **uAgents Framework** is a lightweight library designed to facilitate the development of decentralized **Agents**. Agents in a multi-agent system can communicate with any, and all agents in the system to solve problems, execute tasks and transact.
Expand Down Expand Up @@ -44,6 +42,5 @@ To learn more about how to create and connect Agents technology, check out the r
If you wish to create AI Engine compatible Agents, you will need to get the `uagents-ai-engine` package installed. Checkout the [package ↗️](https://pypi.org/project/uagents/) to download it and start developing your AI Engine compatible Agents.

Also, do not miss the [Make your agents AI Engine compatible ↗️](/guides/agents/intermediate/ai-engine-compatible-agent) resource and multiple guides available within our documentation!
</Callout>

The Team is available on [Telegram ↗️](https://t.me/fetch_ai) and [Discord ↗️](https://discord.gg/fetchai) channels for any further inquiries.
4 changes: 3 additions & 1 deletion pages/guides/agents/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ Run the script to see the output:

**Expected Output**:

`hello, my name is alice every 2 seconds`.
`hello, my name is alice`
`hello, my name is alice`
`hello, my name is alice`

## Message Handling Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Additionally, you can now use `agent.run()` method, but this is also not require
- For security reasons, imports are still restricted to those listed in [Agentverse: allowed imports ↗️](/guides/agentverse/allowed-imports). Soon we will be making available a new hosting environment which much fewer restrictions on the imports.

<Callout type="info" emoji="ℹ️">
Checkout the [AVCTL - Agentverse Command Line Interface 💻 ↗️](/guides/avctl/avctl) to better understand how to possibly interact with the Agentverse. AVCTL provides multiple features (e.g., authorization and hosting management) allowing developers to log in, set up projects, and deploy Agents on the Agentverse.
Checkout the [AVCTL - Agentverse Command Line Interface ↗️](/guides/avctl/avctl) to better understand how to possibly interact with the Agentverse. AVCTL provides multiple features (e.g., authorization and hosting management) allowing developers to log in, set up projects, and deploy Agents on the Agentverse.
</Callout>

## Register Domain Name
Expand Down
99 changes: 99 additions & 0 deletions scripts/build-img.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#!/usr/bin/env python3
import os
import sys
import subprocess
import argparse


PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

REPOSITORY = os.environ.get('IMAGE_REPOSITORY')

BUILD_ENV_VARS = (
'BACKEND_URL',
'NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID',
'NEXT_PUBLIC_ALGOLIA_APP_ID',
'NEXT_PUBLIC_ALGOLIA_API_KEY',
'NEXT_PUBLIC_ALGOLIA_INDEX',
'NEWSLETTER_BASE_URL',
'SENDER_TOKEN'
)


def parse_commandline() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument('-n', '--no-push', dest='push', action='store_false', help='Disable pusing of the image')
parser.add_argument('-f', '--force-build', action='store_true', help=argparse.SUPPRESS)
return parser.parse_args()


def detect_local_modifications() -> bool:
exit_code = subprocess.call(['git', 'diff-index', '--quiet', 'HEAD'])
return exit_code != 0


def get_version() -> str:
return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode().strip()


def main():
args = parse_commandline()

# validate the repository environment variable
if REPOSITORY is None:
print('Missing IMAGE_REPOSITORY environment variable')
sys.exit(1)

# argument validation / augmentation
push = args.push
if detect_local_modifications():
if args.force_build:
push = False
print('Disabling push of images due to local modifications')
else:
print('Detected local modifications. Please commit and try again')
sys.exit(1)

# lookup the required information
version = get_version()

image_url = f'{REPOSITORY}:{version}'

print()
print(f'Project root: {PROJECT_ROOT}')
print(f'Image Ref...: {image_url}')
print(f'Push........: {push}')
print()

# Step 0. Collect up the build environment variables
build_args = []
for env_name in BUILD_ENV_VARS:
if env_name not in os.environ:
print('Missing build variable', env_name)
sys.exit(1)

build_args.append(f'--build-arg={env_name}={os.environ[env_name]}')

# Step 1. Build the image
cmd = [
'docker',
'build',
] + build_args + [
'--platform', 'linux/amd64',
'-t', image_url,
PROJECT_ROOT,
]
subprocess.check_call(cmd)

# Step 2. Push the image
if push:
subprocess.check_call([
'docker',
'push',
image_url,
])



if __name__ == '__main__':
main()

0 comments on commit 333e103

Please sign in to comment.