Skip to content

Commit

Permalink
IP-242 - Add .snyk file.
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlittlejohns committed Jun 20, 2024
1 parent 3dddc73 commit b7cfd09
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 25 deletions.
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.11"
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## v1.0.0
### 2024-04-12
# Change Log

The Harmony Regridding Service follows semantic versioning. All notable changes
to this project will be documented in this file. The format is based on [Keep a
Changelog](http://keepachangelog.com/en/1.0.0/).

## [v1.0.1] - 2024-06-20

### Changed
This version of the Harmony Regridding Service updates to use Python 3.11.

## [v1.0.0] - 2024-04-12

This version of the Harmony Regridding Service contains all functionality
previously released internally to EOSDIS as `sds/harmony-regridder:0.0.4`.
Expand All @@ -11,3 +21,7 @@ include updated documentation and files outlined by the

For more information on internal releases prior to NASA open-source approval,
see legacy-CHANGELOG.md.

[unreleased]: https://github.com/nasa/harmony-regridding-service/compare/1.0.1..HEAD
[v1.0.1]: https://github.com/nasa/harmony-regridding-service/compare/1.0.0..1.0.1
[v1.0.0]: https://github.com/nasa/harmony-regridding-service/compare/0.0.4-legacy..1.0.0
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ GPM/IMERGHH and MERRA collections.
|- tests
```

* .snyk - A file used by the Snyk webhook to ensure the correct version of
Python is used when installing the full dependency tree for the Harmony
Regridding Service. This file should be updated when the version of Python is
updated in the service Docker image.
* CHANGELOG.md - This file contains a record of changes applied to each new
public release of a service Docker image. Any release of a new service
version since migrating to GitHub should have a record of what was changed in
Expand Down
31 changes: 20 additions & 11 deletions bin/extract-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,31 @@
###############################################################################
#
# A bash script to extract only the notes related to the most recent version of
# the Harmony Regridding service from CHANGELOG.md
# the Harmony Regridding Service from CHANGELOG.md
#
# 2023-06-16: Created.
# 2023-10-10: Copied from earthdata-varinfo repository to HOSS.
# 2024-04-12: Copied from HOSS to the Harmony Regridding service.
# 2024-01-03: Copied from HOSS repository to the Swath Projector.
# 2024-01-23: Copied and modified from Swath Projector repository to HyBIG.
# 2024-06-20: Copied and modified from HyBIG.
#
###############################################################################

CHANGELOG_FILE="CHANGELOG.md"
VERSION_PATTERN="^## v"
# Count number of versions in version file:
number_of_versions=$(grep -c "${VERSION_PATTERN}" ${CHANGELOG_FILE})

if [ ${number_of_versions} -gt 1 ]
then
grep -B 9999 -m 2 "${VERSION_PATTERN}" ${CHANGELOG_FILE} | sed '$d' | sed '$d'
else
cat ${CHANGELOG_FILE}
fi
## captures versions
## >## v1.0.0
## >## [v1.0.0]
VERSION_PATTERN="^## [\[]v"

## captures url links
## [unreleased]:https://github.com/nasa/harmony-regridding-service/compare/1.0.1..HEAD
## [v1.2.0]: https://github.com/nasa/harmony-regridding-service/compare/1.0.0..1.0.1
LINK_PATTERN="^\[.*\].*\.\..*"

# Read the file and extract text between the first two occurrences of the
# VERSION_PATTERN
result=$(awk "/$VERSION_PATTERN/{c++; if(c==2) exit;} c==1" "$CHANGELOG_FILE")

# Print the result
echo "$result" | grep -v "$VERSION_PATTERN" | grep -v "$LINK_PATTERN"
2 changes: 1 addition & 1 deletion docker/service.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# 2023-01-26: Added to repository.
#
###############################################################################
FROM python:3.9.14-slim-bullseye
FROM python:3.11.9-slim-bullseye

WORKDIR "/home"

Expand Down
2 changes: 1 addition & 1 deletion docker/service_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
5 changes: 3 additions & 2 deletions docs/Harmony_Regridding_Service_User_Documentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"Other Python requirements are listed in `docs/pip_requirements.txt`. It is recommended to install all required packages via the following commands:\n",
"\n",
"```bash\n",
"$ conda create --name regridder-demo python=3.10 --channel conda-forge --channel defaults -y\n",
"$ conda create --name regridder-demo python=3.11 --channel conda-forge --channel defaults -y\n",
"$ conda activate regridder-demo\n",
"$ pip install -r pip_requirements.txt\n",
"```\n",
Expand Down Expand Up @@ -177,6 +177,7 @@
"player_grid = pnw.Player(\n",
" name='time', start=0, end=23, loop_policy='once', interval=200, width=900\n",
")\n",
"\n",
"ax = (\n",
" ds_grid.Q850.interactive(loc='bottom', width=900, height=600)\n",
" .isel(time=player_grid)\n",
Expand Down Expand Up @@ -291,7 +292,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
17 changes: 9 additions & 8 deletions docs/pip_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
#
# Example conda environment creation:
#
# conda create --name regridder-docs python=3.10 --channel conda-forge \
# conda create --name regridder-docs python=3.11 --channel conda-forge \
# --channel defaults -y
#
# pip install -r pip_requirements.txt
#
###############################################################################
curlify~=2.2.1
harmony-py~=0.4.6
hvplot~=0.8.3
matplotlib~=3.7.1
netCDF4~=1.6.3
notebook~=6.5.3
panel~=0.14.4
xarray~=2023.1.0
harmony-py~=0.4.15
holoviews~=1.18.3 # Mitigates deprecation warning from hvplot
hvplot~=0.10.0
matplotlib~=3.7.5
netCDF4~=1.6.5
notebook~=7.2.1
panel~=1.4.4
xarray~=2024.5.0

0 comments on commit b7cfd09

Please sign in to comment.