Skip to content

Commit

Permalink
release 1.4.0 (#149)
Browse files Browse the repository at this point in the history
* release 1.4.0

* remove 3.8

* use release.sh

* weird parity with cma-py

* play well with twine and snyk

* play well with twine and snyk
  • Loading branch information
etcart authored Sep 26, 2024
1 parent d622236 commit cbf73f1
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 53 deletions.
46 changes: 1 addition & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ references:
image: localstack/localstack
working_directory: ~/repo

container_python38: &container_python38
docker:
- image: circleci/python:3.8.1
- name: localstack
image: localstack/localstack
working_directory: ~/repo


restore_repo: &restore_repo
restore_cache:
keys:
Expand All @@ -42,34 +34,9 @@ references:
- v0-dependencies310-

jobs:
install_and_test_38:
<<: *container_python38
steps:
- *restore_repo
- checkout
- *save_repo
- run:
name: Install virtualenv
command: pip install --user virtualenv
- run:
name: Install dependencies
command: |
virtualenv ~/venv38
. ~/venv38/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
- run :
name: Run tests
environment:
LOCALSTACK_HOST: localstack
command: |
. ~/venv38/bin/activate
nose2 -v --with-coverage cumulus_process
install_and_test_310:
<<: *container_python310
steps:
- *restore_repo
- checkout
- *save_repo
- run:
Expand Down Expand Up @@ -97,20 +64,10 @@ jobs:
- checkout
- *restore_repo
- *restore_dependencies310
- add_ssh_keys:
fingerprints:
- "3a:8d:f7:0d:de:79:98:bc:56:10:83:ab:c1:ee:3d:30"
- run:
name: Push tag to github
command: |
VERSION=`awk -F\' '{print $2,$4}' cumulus_process/version.py`
# Only tag and release if the version doesn't already exist
if [ -z $(git ls-remote --tags origin | grep $VERSION) ]; then
git tag $VERSION
echo "Pushing tag ${VERSION}"
git push origin $VERSION
fi
GITHUB_TOKEN=${GITHUB_TOKEN} sh bin/release.sh
- run:
name: Deploy to PyPi
command: |
Expand All @@ -123,7 +80,6 @@ workflows:
version: 2
build_test_310_deploy:
jobs:
- install_and_test_38
- install_and_test_310
- deploy:
requires:
Expand Down
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
language-settings:
python: "3.10"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

## [1.4.0] - 2024-09-24
- **CUMULUS-3838**
- remove support for python38
- update to cumulus-message-adapter-python 2.3.0

## [1.3.0] - 2023-07-13
- **CUMULUS-3270**
- Update to python 3.10
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[requires]
python_version = "3.10"
35 changes: 35 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

set -ex
VERSION_TAG=$(awk -F\' '{print $2}' cumulus_process/version.py)
LATEST_TAG=$(curl -H \
"Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/nasa/cumulus-process-py/tags | jq --raw-output '.[0].name')
git config --global user.email "[email protected]"
git config --global user.name "Cumulus Bot"
export VERSION_TAG
export LATEST_TAG

if [ "$VERSION_TAG" != "$LATEST_TAG" ]; then
echo "tag does not exist for version $VERSION_TAG, creating tag"

# create git tag
git tag -a "$VERSION_TAG" -m "$VERSION_TAG" || echo "$VERSION_TAG already exists"
git push origin "$VERSION_TAG"
fi

RELEASE_URL=$(curl -H \
"Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/nasa/cumulus-process-py/releases/tags/$VERSION_TAG | jq --raw-output '.url // ""')
export RELEASE_URL

if [ -z "$RELEASE_URL" ]; then
echo "release does not exist"

curl -H \
"Authorization: token $GITHUB_TOKEN" \
-d "{\"tag_name\": \"$VERSION_TAG\", \"name\": \"$VERSION_TAG\", \"body\": \"Release $VERSION_TAG\" }"\
-H "Content-Type: application/json"\
-X POST \
https://api.github.com/repos/nasa/cumulus-process-py/releases
fi
2 changes: 1 addition & 1 deletion cumulus_process/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.3.0'
__version__ = '1.4.0'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
boto3~=1.26.90
python-json-logger~=0.1
dicttoxml~=1.7.4
cumulus-message-adapter-python~=2.2.0
cumulus-message-adapter-python~=2.3.0
6 changes: 0 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
url='https://github.com/nasa-cumulus/cumulus-process-py',
license='Apache 2.0',
classifiers=[
'Topic :: Software Development :: Libraries',
'Topic :: Scientific/Engineering',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.10'
],
packages=find_packages(exclude=['docs', 'tests*']),
Expand Down

0 comments on commit cbf73f1

Please sign in to comment.