Skip to content

Building AI agents, atomically

Remove build and deployment scripts

KennyVaneetvelde90545ef8f8c3
diff --git a/.gitignore b/.gitignore
index 78a6a43..5802d0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -140,6 +140,7 @@ Thumbs.db
# Project specific
personal_experiments/
+personal_scripts/
*.psd
.output/
diff --git a/build_and_deploy.ps1 b/build_and_deploy.ps1
deleted file mode 100644
index 1a73bf6..0000000
--- a/build_and_deploy.ps1
+++ /dev/null
@@ -1,117 +0,0 @@
-# Function to update version in a file
-function Update-VersionInFile {
- param (
- [string]$Version,
- [string]$FilePath
- )
- (Get-Content $FilePath) -replace 'version = ".*"', "version = `"$Version`"" | Set-Content $FilePath
- Write-Host "Updated version in $FilePath to $Version"
-}
-
-# Function to update (increment) version
-function Update-Version {
- param (
- [string]$Version,
- [string]$ReleaseType
- )
-
- $versionParts = $Version -split '\.'
- $major = [int]$versionParts[0]
- $minor = [int]$versionParts[1]
- $patch = [int]$versionParts[2]
-
- switch ($ReleaseType) {
- "major" {
- $major++
- $minor = 0
- $patch = 0
- }
- "minor" {
- $minor++
- $patch = 0
- }
- "patch" {
- $patch++
- }
- default {
- Write-Host "Invalid release type. Use 'major', 'minor', or 'patch'."
- exit 1
- }
- }
-
- return "$major.$minor.$patch"
-}
-
-# Function to set PyPI token
-function Set-PyPIToken {
- if (-not $env:PYPI_TOKEN) {
- Write-Host "Error: PYPI_TOKEN environment variable is not set."
- exit 1
- }
- poetry config pypi-token.pypi $env:PYPI_TOKEN
- Write-Host "PyPI token configured successfully."
-}
-
-# Add this function at the beginning of the script
-function Import-EnvFile {
- $envFile = ".env"
- if (Test-Path $envFile) {
- Get-Content $envFile | ForEach-Object {
- if ($_ -match '^([^=]+)=(.*)$') {
- $name = $matches[1]
- $value = $matches[2]
- Set-Item -Path "env:$name" -Value $value
- }
- }
- Write-Host "Environment variables loaded from .env file."
- }
- else {
- Write-Host "Warning: .env file not found."
- }
-}
-
-# Call this function before any other operations in the script
-Import-EnvFile
-
-# Check if release type is provided
-if ($args.Count -eq 0) {
- Write-Host "Please specify a release type (major, minor, or patch)"
- exit 1
-}
-
-$releaseType = $args[0]
-
-# Validate release type
-if ($releaseType -notin @("major", "minor", "patch")) {
- Write-Host "Invalid release type. Use 'major', 'minor', or 'patch'."
- exit 1
-}
-
-# Get current version from pyproject.toml
-$currentVersion = (Select-String -Path "pyproject.toml" -Pattern 'version = "(.+)"').Matches.Groups[1].Value
-
-# Calculate new version
-$newVersion = Update-Version -Version $currentVersion -ReleaseType $releaseType
-
-Write-Host "Updating version from $currentVersion to $newVersion"
-
-# Update version in files
-Update-VersionInFile -Version $newVersion -FilePath "pyproject.toml"
-
-# Build the consolidated package
-Write-Host "Building consolidated atomic-agents package..."
-
-# Create a new virtualenv in the project directory and install dependencies
-poetry install
-
-# Build the package
-poetry build
-
-# Before publishing, set the PyPI token
-Set-PyPIToken
-
-# Upload to PyPI
-Write-Host "Uploading atomic-agents to PyPI..."
-poetry publish
-
-Write-Host "Build and deploy process completed successfully!"
diff --git a/clean_proj.ps1 b/clean_proj.ps1
deleted file mode 100644
index 84cd93f..0000000
--- a/clean_proj.ps1
+++ /dev/null
@@ -1,61 +0,0 @@
-# Define the directories to be deleted
-$dirsToDelete = @(".venv", "__pycache__", "dist")
-
-# Function to recursively delete directories and specific .lock files
-function Remove-DirectoriesAndLockFiles {
- param (
- [string]$path
- )
-
- foreach ($dir in $dirsToDelete) {
- $fullPath = Join-Path -Path $path -ChildPath $dir
- if (Test-Path -Path $fullPath) {
- if ($dir -eq ".venv") {
- # Use cmd.exe to forcefully remove .venv directory
- cmd.exe /c "rd /s /q `"$fullPath`""
- } else {
- Remove-Item -Path $fullPath -Recurse -Force -ErrorAction SilentlyContinue
- }
- }
- }
-
- # Delete specific .lock files
- $lockFiles = @("poetry.lock", "uv.lock")
- foreach ($lockFile in $lockFiles) {
- $lockPath = Join-Path -Path $path -ChildPath $lockFile
- if (Test-Path -Path $lockPath) {
- Remove-Item -Path $lockPath -Force -ErrorAction SilentlyContinue
- }
- }
-
- # Recursively process subdirectories
- Get-ChildItem -Path $path -Directory | ForEach-Object {
- Remove-DirectoriesAndLockFiles -path $_.FullName
- }
-}
-
-# Get the current directory
-$currentDir = Get-Location
-
-# Start the recursive deletion process
-Remove-DirectoriesAndLockFiles -path $currentDir
-
-# Check if .venv still exists and provide a message
-if (Test-Path (Join-Path -Path $currentDir -ChildPath ".venv")) {
- Write-Host "Warning: .venv directory could not be fully removed. Please close any applications using it and try again."
-} else {
- Write-Host "Cleanup of directories completed successfully."
-}
-
-# Check for remaining .lock files
-$remainingLockFiles = Get-ChildItem -Path $currentDir -Include "poetry.lock", "uv.lock" -File -Recurse
-if ($remainingLockFiles) {
- Write-Host "Warning: Some .lock files could not be removed. Please check if they are in use."
- $remainingLockFiles | ForEach-Object {
- Write-Host " - $($_.FullName)"
- }
-} else {
- Write-Host "All specified .lock files removed successfully."
-}
-
-Write-Host "Cleanup process completed."