diff --git a/.github/workflows/publish-to-aws.yaml b/.github/workflows/publish-to-aws.yaml index 2380745..beb6d00 100644 --- a/.github/workflows/publish-to-aws.yaml +++ b/.github/workflows/publish-to-aws.yaml @@ -66,7 +66,7 @@ jobs: if [ -f "src/atlas/_version.py" ]; then echo "Version file found:" cat src/atlas/_version.py - + # Extract version directly VERSION=$(grep -E '^__version__\s*=' src/atlas/_version.py | grep -o '".*"' | tr -d '"') echo "Direct extraction result: '$VERSION'" @@ -81,7 +81,7 @@ jobs: ls -la ./scripts/get_version.sh VERSION=$(./scripts/get_version.sh 2>&1) echo "Script output: '$VERSION'" - + # Extract just the version (last line) in case there's debug output VERSION=$(echo "$VERSION" | tail -n 1) fi @@ -104,7 +104,7 @@ jobs: - name: Create package directory structure run: | - mkdir -p upload/simple/${{ env.PACKAGE_NAME }} + mkdir -p upload/package/${{ env.PACKAGE_NAME }} mkdir -p upload/versions/${{ steps.get_version.outputs.VERSION }} - name: Copy package files to version-specific folder @@ -170,21 +170,21 @@ jobs: - name: Download existing versions and prepare directories run: | - # Copy current version to simple index - cp dist/* upload/simple/${{ env.PACKAGE_NAME }}/ + # Copy current version to package index + cp dist/* upload/package/${{ env.PACKAGE_NAME }}/ - # Download existing versions from S3 for both simple index and version directories + # Download existing versions from S3 for both package index and version directories while IFS= read -r version; do if [ ! -z "$version" ] && [ "$version" != "${{ steps.get_version.outputs.VERSION }}" ]; then echo "Downloading version $version" - + # Create directory for this version mkdir -p upload/versions/$version - + # Download to both locations: - # 1. To simple index (for pip compatibility) - aws s3 sync s3://${{ secrets.S3_BUCKET_NAME }}/versions/$version/ upload/simple/${{ env.PACKAGE_NAME }}/ || echo "Version $version not found in S3" - + # 1. To package index (for pip compatibility) + aws s3 sync s3://${{ secrets.S3_BUCKET_NAME }}/versions/$version/ upload/package/${{ env.PACKAGE_NAME }}/ || echo "Version $version not found in S3" + # 2. To version-specific directory (for HTML generation) aws s3 sync s3://${{ secrets.S3_BUCKET_NAME }}/versions/$version/ upload/versions/$version/ || echo "Version $version not found in S3" fi @@ -192,7 +192,7 @@ jobs: - name: Generate package index HTML run: | - cat > upload/simple/${{ env.PACKAGE_NAME }}/index.html << EOF + cat > upload/package/${{ env.PACKAGE_NAME }}/index.html << EOF @@ -203,14 +203,14 @@ jobs:

View all versions

EOF - for file in upload/simple/${{ env.PACKAGE_NAME }}/*.{tar.gz,whl}; do + for file in upload/package/${{ env.PACKAGE_NAME }}/*.{tar.gz,whl}; do if [ -f "$file" ]; then filename=$(basename "$file") - echo " $filename
" >> upload/simple/${{ env.PACKAGE_NAME }}/index.html + echo " $filename
" >> upload/package/${{ env.PACKAGE_NAME }}/index.html fi done - echo "" >> upload/simple/${{ env.PACKAGE_NAME }}/index.html + echo "" >> upload/package/${{ env.PACKAGE_NAME }}/index.html - name: Generate versions page HTML run: | @@ -231,10 +231,10 @@ jobs:

All Versions of ${{ env.PACKAGE_NAME }}

Available versions of the ${{ env.PACKAGE_NAME }} package.

- +
- Install latest: pip install ${{ env.PACKAGE_NAME }} --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/simple/
- Install specific version: pip install ${{ env.PACKAGE_NAME }}==VERSION --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/simple/ + Install latest: pip install ${{ env.PACKAGE_NAME }} --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/package/
+ Install specific version: pip install ${{ env.PACKAGE_NAME }}==VERSION --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/package/
EOF @@ -242,29 +242,29 @@ jobs: while IFS= read -r version; do if [ ! -z "$version" ]; then echo "Processing version: $version" - + # Check if this is the current version CURRENT_CLASS="" if [ "$version" = "${{ steps.get_version.outputs.VERSION }}" ]; then CURRENT_CLASS=" current" fi - + cat >> upload/versions.html << EOF

Version $version

EOF - + if [ "$version" = "${{ steps.get_version.outputs.VERSION }}" ]; then echo "

(Current/Latest Version)

" >> upload/versions.html fi - + echo "
" >> upload/versions.html echo " Available files:
" >> upload/versions.html - + # List files for this version echo "Checking for files in upload/versions/$version/" ls -la upload/versions/$version/ || echo "Directory not found or empty" - + FOUND_FILES=false for file in upload/versions/$version/*.{tar.gz,whl}; do if [ -f "$file" ]; then @@ -274,12 +274,12 @@ jobs: FOUND_FILES=true fi done - + if [ "$FOUND_FILES" = false ]; then echo "

No package files found for this version

" >> upload/versions.html echo "Warning: No files found for version $version" fi - + echo "
" >> upload/versions.html echo "
" >> upload/versions.html fi @@ -287,9 +287,9 @@ jobs: echo "" >> upload/versions.html - - name: Generate main simple index + - name: Generate main package index run: | - cat > upload/simple/index.html << EOF + cat > upload/package/index.html << EOF @@ -320,21 +320,21 @@ jobs:

LayerLens Python Package Repository

Custom Python package repository for ${{ env.PACKAGE_NAME }}

- + - +

Installation

# Install latest version
- pip install ${{ env.PACKAGE_NAME }} --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/simple/

- + pip install ${{ env.PACKAGE_NAME }} --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/package/

+ # Install specific version
- pip install ${{ env.PACKAGE_NAME }}==1.0.0 --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/simple/ + pip install ${{ env.PACKAGE_NAME }}==1.0.0 --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/package/
- +

Current Version

Latest version: ${{ steps.get_version.outputs.VERSION }}

@@ -344,8 +344,8 @@ jobs: - name: Upload to S3 run: | # Upload everything except we don't want to delete old versions - # Upload the simple index (with --delete to clean up old files) - aws s3 sync upload/simple/ s3://${{ secrets.S3_BUCKET_NAME }}/simple/ --delete + # Upload the package index (with --delete to clean up old files) + aws s3 sync upload/package/ s3://${{ secrets.S3_BUCKET_NAME }}/package/ --delete # Upload version-specific files (without --delete to preserve old versions) aws s3 sync upload/versions/ s3://${{ secrets.S3_BUCKET_NAME }}/versions/ @@ -363,4 +363,4 @@ jobs: - name: Output installation command run: | echo "Package deployed successfully!" - echo "Install with: pip install ${{ env.PACKAGE_NAME }} --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/simple/" + echo "Install with: pip install ${{ env.PACKAGE_NAME }} --index-url https://${{ secrets.CLOUDFRONT_DOMAIN }}/package/" diff --git a/pyproject.toml b/pyproject.toml index 495536f..b5ec9a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "layerlens" -version = "1.0.1" +version = "1.0.2" description = "The official Python library for the LayerLens Atlas API" license = "Apache-2.0" authors = [{ name = "LayerLens", email = "support@layerlens.ai" }] diff --git a/src/layerlens/_version.py b/src/layerlens/_version.py index 5c4105c..7863915 100644 --- a/src/layerlens/_version.py +++ b/src/layerlens/_version.py @@ -1 +1 @@ -__version__ = "1.0.1" +__version__ = "1.0.2"