Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update main #39

Merged
merged 56 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
386f99d
rename variables and functions for readability
danielfromearth Oct 3, 2023
f105601
Update README.md with logo
danielfromearth Oct 4, 2023
381f013
Update CHANGELOG.md
danielfromearth Oct 4, 2023
0d4bd11
Merge pull request #17 from danielfromearth/feature/issue-16-add-a-logo
danielfromearth Oct 4, 2023
1149fae
add conditions for updating patch version on `main` branch
danielfromearth Oct 4, 2023
87fd9b5
update poetry.lock
danielfromearth Oct 4, 2023
8c7b4cc
merge from develop
danielfromearth Oct 4, 2023
dc49a85
draft code for adapter
danielfromearth Oct 5, 2023
4e4a622
Merge pull request #19 from danielfromearth/main
danielfromearth Oct 5, 2023
62cdf72
update CHANGELOG.md
danielfromearth Oct 5, 2023
9806a5a
updated docker file and removed hdf5
Oct 5, 2023
429b4b9
change dependabot.yml intervals from daily to weekly
danielfromearth Oct 6, 2023
1019a59
updated docker path and installed poetry
Oct 6, 2023
2ce8e19
rename and refactor cicd workflows
danielfromearth Oct 10, 2023
cde2009
update CHANGELOG.md
danielfromearth Oct 10, 2023
90fb263
updated docker file to include poetry installation as root
Oct 10, 2023
ca7411b
fix github workflows path
danielfromearth Oct 10, 2023
e26add1
fix CHANGELOG.md issue number
danielfromearth Oct 10, 2023
537febc
remove reusable python-and-poetry-setup because it doesn't work as a …
danielfromearth Oct 10, 2023
4520bed
Merge pull request #22 from danielfromearth/feature/issue-21-improve-…
danielfromearth Oct 10, 2023
091aaa9
Merge pull request #23 from danielfromearth/feature/issue-7-create-wo…
hpatel426 Oct 10, 2023
407c978
Merge pull request #20 from danielfromearth/feature/issue-6
danielfromearth Oct 10, 2023
90a8fbd
Bump mypy from 1.5.1 to 1.6.0
dependabot[bot] Oct 11, 2023
a26275c
Merge pull request #25 from danielfromearth/dependabot/pip/develop/my…
danielfromearth Oct 11, 2023
7457e85
Bump mypy from 1.6.0 to 1.6.1
dependabot[bot] Oct 18, 2023
20d49fa
updated docker path and moved it to root directory
Oct 18, 2023
7d91a21
Merge pull request #29 from danielfromearth/dependabot/pip/develop/my…
danielfromearth Oct 20, 2023
7782e7b
Bump black from 23.9.1 to 23.10.0
dependabot[bot] Oct 20, 2023
7a0b287
Merge pull request #28 from danielfromearth/dependabot/pip/develop/bl…
danielfromearth Oct 20, 2023
f4db30f
Bump ruff from 0.0.292 to 0.1.1
dependabot[bot] Oct 20, 2023
93cab6b
Merge pull request #30 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Oct 20, 2023
31e377f
remove dockerfile linting
danielfromearth Oct 23, 2023
145c777
add docker entry point script
danielfromearth Oct 23, 2023
2937143
remove argv for harmony cli
danielfromearth Oct 23, 2023
a333ebf
make docker-entrypoint.sh executable
danielfromearth Oct 23, 2023
f01a3ad
ensure script is owned by dockeruser
danielfromearth Oct 23, 2023
9635485
Bump black from 23.10.0 to 23.10.1
dependabot[bot] Oct 24, 2023
a798088
Merge pull request #33 from danielfromearth/dependabot/pip/develop/bl…
danielfromearth Oct 24, 2023
ae78dea
Bump ruff from 0.1.1 to 0.1.2
dependabot[bot] Oct 25, 2023
6d7b2af
Merge pull request #34 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Oct 25, 2023
eb4432d
Bump pytest from 7.4.2 to 7.4.3
dependabot[bot] Oct 25, 2023
408c5fc
Merge pull request #35 from danielfromearth/dependabot/pip/develop/py…
danielfromearth Oct 25, 2023
e2815d1
update workflows with commented out version bumping
danielfromearth Oct 25, 2023
01b202e
add pytest-cov for new testing workflow
danielfromearth Oct 25, 2023
40a238a
Merge pull request #36 from danielfromearth/feature/update-github-act…
danielfromearth Oct 25, 2023
fc8dd2d
Bump ruff from 0.1.2 to 0.1.3
dependabot[bot] Oct 27, 2023
1a5601b
Merge pull request #37 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Oct 27, 2023
504aacd
update environment dev dependencies
danielfromearth Oct 30, 2023
9a65161
add logging messages
danielfromearth Oct 30, 2023
0e9c1d1
Merge pull request #32 from danielfromearth/dek/docker-entry-testing
danielfromearth Oct 30, 2023
6618df8
Merge branch 'develop' into feature/issue-24-test-the-docker-image-wi…
danielfromearth Oct 30, 2023
a988a5d
add missing pytest-cov
danielfromearth Oct 30, 2023
1d9fc92
increment the STAC Asset key so the assets aren't overridden
danielfromearth Oct 30, 2023
4fe867b
update CHANGELOG.md
danielfromearth Oct 31, 2023
4420c19
update README.md
danielfromearth Oct 31, 2023
da13976
Merge pull request #38 from danielfromearth/feature/issue-24-test-the…
danielfromearth Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
interval: "weekly"
# Raise pull requests for version updates
# to pip against the `develop` branch
target-branch: "develop"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
# Raise pull requests for version updates
# to pip against the `develop` branch
interval: "weekly"
target-branch: "develop"
135 changes: 135 additions & 0 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# When code is pushed to a branch, run linting and tests, and
# then automatically increment the version number as appropriate for the branch source.
name: Lint and Test

# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
branches: [ develop, release/**, main, feature/**, issue/**, issues/** ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
run_tests:
uses: ./.github/workflows/reusable_run_tests.yml

bump_version:
needs: run_tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.3.2

- name: Get version
id: get-version
run: |
echo "current_version=$(poetry version | awk '{print $2}')" >> $GITHUB_OUTPUT
echo "pyproject_name=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV

# - name: Bump pre-alpha version
# # If triggered by push to a feature branch
# if: |
# ${{ startsWith(github.ref, 'refs/heads/issue') }} ||
# ${{ startsWith(github.ref, 'refs/heads/dependabot/') }} ||
# ${{ startsWith(github.ref, 'refs/heads/feature/') }}
# run: |
# new_ver="${{ steps.get-version.outputs.current_version }}+$(git rev-parse --short ${GITHUB_SHA})"
# poetry version $new_ver
# echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
#
# - name: Bump alpha version
# # If triggered by push to the develop branch
# if: ${{ github.ref == 'refs/heads/develop' }}
# run: |
# poetry version prerelease
# echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
# echo "venue=sit" >> $GITHUB_ENV
#
# - name: Bump rc version
# # If triggered by push to a release branch
# if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
# env:
# # True if the version already has a 'rc' pre-release identifier
# BUMP_RC: ${{ contains(steps.get-version.outputs.current_version, 'rc') }}
# run: |
# if [ "$BUMP_RC" = true ]; then
# poetry version prerelease
# else
# poetry version ${GITHUB_REF#refs/heads/release/}rc1
# fi
# echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
# echo "venue=uat" >> $GITHUB_ENV
#
# - name: Release version
# # If triggered by push to the main branch
# if: ${{ startsWith(github.ref, 'refs/heads/main') }}
# env:
# CURRENT_VERSION: ${{ steps.get-version.outputs.current_version }}
# # Remove rc* from the end of version string
# # The ${string%%substring} syntax below deletes the longest match of $substring from back of $string.
# run: |
# poetry version ${CURRENT_VERSION%%rc*}
# echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
# echo "venue=ops" >> $GITHUB_ENV
#
# - name: Commit Version Bump
# # If building develop, a release branch, or main then we commit the version bump back to the repo
# if: |
# github.ref == 'refs/heads/develop' ||
# github.ref == 'refs/heads/main' ||
# startsWith(github.ref, 'refs/heads/release')
# run: |
# git config --global user.name 'batchee bot'
# git config --global user.email '[email protected]'
# git commit -am "/version ${{ env.software_version }}"
# git push
#
# - name: Push Tag
# if: |
# github.ref == 'refs/heads/develop' ||
# github.ref == 'refs/heads/main' ||
# startsWith(github.ref, 'refs/heads/release')
# run: |
# git config user.name "${GITHUB_ACTOR}"
# git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
# git tag -a "${{ env.software_version }}" -m "Version ${{ env.software_version }}"
# git push origin "${{ env.software_version }}"

# - name: Build Python Artifact
# run: |
# poetry build
#
# - uses: actions/upload-artifact@v3
# with:
# name: python-artifact
# path: dist/*
#
# - name: Publish to test.pypi.org
# id: pypi-test-publish
# if: |
# github.ref == 'refs/heads/develop' ||
# startsWith(github.ref, 'refs/heads/release')
# env:
# POETRY_PYPI_TOKEN_TESTPYPI: ${{secrets.POETRY_PYPI_TOKEN_TESTPYPI}}
# run: |
# poetry config repositories.testpypi https://test.pypi.org/legacy/
# poetry publish -r testpypi
#
# - name: Publish to pypi.org
# if: ${{ github.ref == 'refs/heads/main' }}
# id: pypi-publish
# env:
# POETRY_PYPI_TOKEN_PYPI: ${{secrets.POETRY_PYPI_TOKEN_PYPI}}
# run: |
# poetry publish
107 changes: 0 additions & 107 deletions .github/workflows/on_push.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# When a pull request is opened, run linting and tests.
name: Receive PR

# read-only repo token
# no access to secrets
on:
pull_request:
# Sequence of patterns matched against refs/heads
branches:
- feature/**
- issue/**
- issues/**
branches: [ feature/**, issue/**, issues/** ]

jobs:
build_and_test:
uses: ./.github/workflows/run_tests.yml
uses: ./.github/workflows/reusable_run_tests.yml
40 changes: 40 additions & 0 deletions .github/workflows/release-created.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# As soon as a release branch is pushed, the minor version on develop is bumped automatically.
# This allows further development to continue on develop for ‘the next’ release.
name: Release Branch Created

# Run whenever a ref is created https://docs.github.com/en/actions/reference/events-that-trigger-workflows#create
on:
create

jobs:
# First job in the workflow builds and verifies the software artifacts
bump:
name: Bump minor version on develop
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Only run if ref created was a release branch
if:
${{ startsWith(github.ref, 'refs/heads/release/') }}
steps:
# Checks-out the develop branch
- uses: actions/checkout@v4
with:
ref: 'refs/heads/develop'
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Install Poetry
# uses: abatilo/[email protected]
# with:
# poetry-version: 1.3.2
## - name: Bump minor version
## run: |
## poetry version ${GITHUB_REF#refs/heads/release/}
## poetry version preminor
## echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
## - name: Commit Version Bump
## run: |
## git config --global user.name 'batchee bot'
## git config --global user.email '[email protected]'
## git commit -am "/version ${{ env.software_version }}"
## git push
56 changes: 56 additions & 0 deletions .github/workflows/reusable_run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will install Python dependencies, run tests,
# and report test results and code coverage as artifacts. It will
# be called by the workflow that runs tests against new PRs and as
# a first step in the workflow that publishes new Docker images.

name: A reusable workflow to build and run the unit test suite

on:
workflow_call:
workflow_dispatch:

jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10' ]

name: Python ${{ matrix.python-version }} tests
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.3.2

- name: Install package
run: poetry install

- name: Lint
run: |
poetry run ruff batcher

- name: Run tests with coverage
run: |
poetry run pytest --cov=batcher --cov-report=xml:build/reports/coverage.xml --cov-report=html:build/reports/coverage.html tests/

- name: Archive code coverage report (xml)
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: code coverage report (xml)
path: build/reports/coverage.xml

- name: Archive code coverage report (HTML)
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: code coverage report (HTML)
path: build/reports/coverage.html
Loading