diff --git a/.github/workflows/dhcr.yml b/.github/workflows/dhcr.yml deleted file mode 100644 index b63375d..0000000 --- a/.github/workflows/dhcr.yml +++ /dev/null @@ -1,68 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: publish images - -on: - push: - branches: - - main - release: - types: [published] - -env: - DOCKER_ORG: wmoim - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - push: - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - strategy: - matrix: - image: - - synop2bufr - - steps: - - name: Checkout branch - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Log in to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Docker meta - id: metadata - uses: docker/metadata-action@v4 - with: - images: | - ${{ env.DOCKER_ORG }}/${{ matrix.image }} - tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=pep440,pattern={{version}} - - - name: Build and push - uses: docker/build-push-action@v2.7.0 - with: - context: . - file: Dockerfile - cache-from: type=gha - cache-to: type=gha,mode=max - platforms: linux/arm64, linux/amd64 - push: true - tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml deleted file mode 100644 index 1f784a5..0000000 --- a/.github/workflows/ghcr.yml +++ /dev/null @@ -1,54 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Create and publish image to GitHub Container Registry - -on: - push: - branches: - - main - -env: - REGISTRY: ghcr.io - IMAGE_NAME: synop2bufr - -jobs: - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - push: - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v2 - - - name: Build image - run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - - - name: Log in to registry - # This is where you will update the PAT to GHCR_BUILD_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin - - - name: Rename image for publication - run: | - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Use Docker `latest` tag convention - [ "$VERSION" == "main" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - echo FULLCONTAINERNAME=$IMAGE_ID:$VERSION >> $GITHUB_ENV - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - - - name: Push to CR - run: docker push ${{ env.FULLCONTAINERNAME }} diff --git a/synop2bufr/__init__.py b/synop2bufr/__init__.py index 19d4b69..51f5f37 100644 --- a/synop2bufr/__init__.py +++ b/synop2bufr/__init__.py @@ -1484,7 +1484,7 @@ def transform(data: str, metadata: str, year: int, warning_msgs = [] error_msgs = [] continue - + def truncate_to_twenty(name: str) -> str: """ Ensures the string is no longer than 20 characters, @@ -1497,6 +1497,7 @@ def truncate_to_twenty(name: str) -> str: Returns: str: This name truncated to 20 characters. """ + LOGGER.info(f"Truncating station name {name} to 20 characters") return name[:20] # parse WSI to get sections