From eba91fe4d36a39874e271375f9c776bb45494a32 Mon Sep 17 00:00:00 2001 From: Mike Baynton Date: Tue, 31 Oct 2023 11:57:54 -0500 Subject: [PATCH] Add convention to mark a package unsupported (#363) * Add convention to mark a package unsupported This allows us to leave package installation scripts present in this repo for users who may want to rebuild old projects with pinned old versions of the package, while providing an escape hatch for CI that would otherwise fail. * CHANGELOG about unsupported * rgeos unsupported --- .github/workflows/main.yml | 4 ++-- CHANGELOG.md | 13 +++++++++++++ packages/rgdal/UNSUPPORTED | 1 + packages/rgeos/UNSUPPORTED | 1 + test | 2 +- test-list.sh | 10 ++++++++++ 6 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 packages/rgdal/UNSUPPORTED create mode 100644 packages/rgeos/UNSUPPORTED create mode 100755 test-list.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a0e787..fbf7421 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,10 +21,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Print Tests - run: echo "matrix=$(ls -1 -d packages/* | grep -v gsl | tr '\n' '\0' | xargs -0 -n 1 basename | jq -Rsc '. / "\n" - [""]')" + run: echo "matrix=$(./test-list.sh | jq -Rsc '. / "\n" - [""]')" - name: List Tests As Output id: list-tests - run: echo "matrix=$(ls -1 -d packages/* | grep -v gsl | tr '\n' '\0' | xargs -0 -n 1 basename | jq -Rsc '. / "\n" - [""]')" >> $GITHUB_OUTPUT + run: echo "matrix=$(./test-list.sh | jq -Rsc '. / "\n" - [""]')" >> $GITHUB_OUTPUT test-package: name: ${{ matrix.stack }} on ${{ matrix.os }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 7636a55..c603362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## October 31st 2023 + +### Added + * Convention to mark packages as no longer officially supported. Packages with an `UNSUPPORTED` file + in their directory will not be subject to testing, but may still work for you, espeically if your + application uses an old version of the package. + + Packages may be marked unsupported for a variety of reasons, but commonly because they have been + removed from CRAN. + +### Removed + * `rgdal` and `rgeos` is marked unsupported because they were removed from CRAN. + ## September 22nd 2023 ### Added diff --git a/packages/rgdal/UNSUPPORTED b/packages/rgdal/UNSUPPORTED new file mode 100644 index 0000000..4cd25af --- /dev/null +++ b/packages/rgdal/UNSUPPORTED @@ -0,0 +1 @@ +Removed from cran diff --git a/packages/rgeos/UNSUPPORTED b/packages/rgeos/UNSUPPORTED new file mode 100644 index 0000000..4cd25af --- /dev/null +++ b/packages/rgeos/UNSUPPORTED @@ -0,0 +1 @@ +Removed from cran diff --git a/test b/test index 91c58f9..afec5d3 100755 --- a/test +++ b/test @@ -24,7 +24,7 @@ DIR=`dirname $0` cd "${DIR}" || exit 1 if [ $# -eq 0 ]; then - PACKAGES=$(ls -1 -d $DIR/packages/* | grep -v gsl | tr '\n' '\0' | xargs -0 -n 1 basename) + PACKAGES=$(./test-list.sh) else PACKAGES=$@ fi diff --git a/test-list.sh b/test-list.sh new file mode 100755 index 0000000..92b8a14 --- /dev/null +++ b/test-list.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Lists packages that are supported and testable. +all_packages=$(find packages/ -mindepth 1 -maxdepth 1 -type d) + +for package in ${all_packages}; do + if [ ! -f "${package}"/UNSUPPORTED ]; then + basename "${package}" + fi +done