Skip to content

Commit

Permalink
Merge branch 'master' into jpfeuffer-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester authored Aug 9, 2023
2 parents 11f812c + aa08857 commit c8e0895
Show file tree
Hide file tree
Showing 173 changed files with 1,378 additions and 24,710 deletions.
90 changes: 0 additions & 90 deletions .circleci/build-docs.sh

This file was deleted.

78 changes: 39 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# The autobump bot runs on CircleCI (rather than run on Azure Pipelines or
# GitHub Actions) so that we avoid additional workload on those other services
# which currently take care of PRs and bulk branch, respectively.
#
# Note that this runs the version of bioconda-utils configured in
# bioconda-common/common.sh (via the installation script), rather than the
# latest commit on the branch where this is running.

version: 2

Expand All @@ -16,59 +20,52 @@ jobs:
- checkout

- run:
name: Download common definitions
command: curl -s https://raw.githubusercontent.com/bioconda/bioconda-common/master/common.sh > .circleci/common.sh
name: Download bioconda install script
command: wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{install-and-set-up-conda,configure-conda,common}.sh

- run:
name: set up env vars
command: echo "export PATH=$(pwd)/miniconda/bin:$PATH" >> "$BASH_ENV"
command: echo "export PATH=/opt/mambaforge/bin:$PATH" >> "$BASH_ENV"

- run:
name: Ensure cache has path to restore to
command: |
sudo mkdir -p /opt
sudo chown -R $USER /opt
- restore_cache:
keys:
- bioconda-utils-{{
checksum ".circleci/common.sh" }}-{{
checksum ".circleci/config.yml" }}-{{
checksum "bioconda_utils/bioconda_utils-requirements.txt" }}
key: bioconda-utils-{{ checksum "install-and-set-up-conda.sh" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "common.sh" }}

- run:
name: Setup dependencies
name: Install bioconda-utils
command: |
if [ -d miniconda ]
then
echo "Restored from cache"
exit 0
source $BASH_ENV
if [ ! -e /opt/mambaforge ]; then
bash install-and-set-up-conda.sh
fi
source .circleci/common.sh
git checkout ${BIOCONDA_UTILS_TAG}
curl -L -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-${MINICONDA_VER}-Linux-x86_64.sh
bash miniconda.sh -b -p ./miniconda
conda config --system --add channels defaults
conda config --system --add channels bioconda
conda config --system --add channels conda-forge
conda install -y mamba
mamba install -y --file bioconda_utils/bioconda_utils-requirements.txt --file test-requirements.txt
conda clean -y --all
python setup.py install
- save_cache:
key: bioconda-utils-{{
checksum ".circleci/common.sh" }}-{{
checksum ".circleci/config.yml" }}-{{
checksum "bioconda_utils/bioconda_utils-requirements.txt" }}
key: bioconda-utils-{{ checksum "install-and-set-up-conda.sh" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "common.sh" }}
paths:
- miniconda
- /opt/mambaforge

- store_artifacts:
path: /tmp/artifacts
- run:
name: Configure conda
command: |
source $BASH_ENV
bash configure-conda.sh
- run:
name: Check recipes for new upstream releases
command: |
source $BASH_ENV
git clone [email protected]:bioconda/bioconda-recipes
cd bioconda-recipes
git config user.name "Autobump"
git config user.email "[email protected]"
mkdir -p /tmp/artifacts
eval "$(conda shell.bash hook)"
conda activate bioconda
bioconda-utils autobump \
--unparsed-urls /tmp/artifacts/unparsed_urls.txt \
--failed-urls /tmp/artifacts/failed_urls.txt \
Expand All @@ -81,15 +78,18 @@ jobs:
--commit-as BiocondaBot [email protected] \
$AUTOBUMP_OPTS
- store_artifacts:
path: /tmp/artifacts

workflows:
version: 2
bioconda-utils-autobump:
triggers:
- schedule:
cron: "0 * * * *"
filters:
triggers:
- schedule:
cron: "0 * * * *"
filters:
branches:
only:
- master
jobs:
- autobump
only:
- master
jobs:
- autobump
5 changes: 3 additions & 2 deletions .github/quay-namespace-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
HEADERS = {'Content-Type': 'application/json'}
QUAY_OAUTH_TOKEN = os.getenv('QUAY_OAUTH_TOKEN')
if QUAY_OAUTH_TOKEN:
print(f'Quay Token found, using it for {args.namespace}')
HEADERS['Authorization'] = f'Bearer {QUAY_OAUTH_TOKEN}'

# Starting querying Quay
Expand Down Expand Up @@ -116,10 +117,10 @@
repo_status[repo]['is_public'] = "True (changed by script)"
# Again, be nice to Quay
time.sleep(0.3)
fh.write(f'Changed visibility of {args.namespace}/{repo} to public')
fh.write(f'Changed visibility of {args.namespace}/{repo} to public\n')

# Print status
with open(f'{args.namespace}-status.tsv', 'w') as fh:
with open(f'{args.namespace}-status.txt', 'w') as fh:
fh.write('namespace\tname\tis_public\n')
for k,v in sorted(repo_status.items()):
fh.write(f'{v["namespace"]}\t{v["name"]}\t{v["is_public"]}\n')
139 changes: 92 additions & 47 deletions .github/workflows/GithubActionTests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PR Tests
on: [pull_request]
concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Expand All @@ -14,60 +14,105 @@ jobs:
- not long_running_1 and not long_running_2
- long_running_1
- long_running_2

steps:
- uses: actions/checkout@v1
- name: Setup
uses: bioconda/bioconda-actions/bioconda_utils_setup_conda/@master
- name: Install bioconda-utils
run: |
python setup.py install
- name: Build docker container
run: |
docker build -t quay.io/bioconda/bioconda-utils-build-env-cos7:latest ./
docker history quay.io/bioconda/bioconda-utils-build-env-cos7:latest
docker run --rm -t quay.io/bioconda/bioconda-utils-build-env-cos7:latest sh -lec 'type -t conda && conda info -a && conda list'
docker build -t quay.io/bioconda/bioconda-utils-test-env-cos7:latest -f ./Dockerfile.test ./
- name: Run tests '${{ matrix.py_test_marker }}'
run: |
if git diff --name-only origin/master...HEAD | grep -vE ^docs; then
py.test --durations=0 test/ -v --log-level=DEBUG --tb=native -m '${{ matrix.py_test_marker }}'
else
echo "Skipping pytest - only docs modified"
fi
- uses: actions/checkout@v1

- name: set path
run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH

- name: Install bioconda-utils
run: |
export BIOCONDA_DISABLE_BUILD_PREP=1
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh
bash install-and-set-up-conda.sh
eval "$(conda shell.bash hook)"
mamba create -n bioconda -y --file test-requirements.txt --file bioconda_utils/bioconda_utils-requirements.txt
conda activate bioconda
python setup.py install
- name: Build docker container
run: |
docker build -t quay.io/bioconda/bioconda-utils-build-env-cos7:latest ./
docker history quay.io/bioconda/bioconda-utils-build-env-cos7:latest
docker run --rm -t quay.io/bioconda/bioconda-utils-build-env-cos7:latest sh -lec 'type -t conda && conda info -a && conda list'
docker build -t quay.io/bioconda/bioconda-utils-test-env-cos7:latest -f ./Dockerfile.test ./
- name: Run tests '${{ matrix.py_test_marker }}'
run: |
eval "$(conda shell.bash hook)"
conda activate bioconda
if git diff --name-only origin/master...HEAD | grep -vE ^docs; then
py.test --durations=0 test/ -v --log-level=DEBUG --tb=native -m '${{ matrix.py_test_marker }}'
else
echo "Skipping pytest - only docs modified"
fi
test-macosx:
name: OSX tests
runs-on: macOS-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- name: set path
run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH

- name: set path
run: echo "${HOME}/miniconda/bin" >> $GITHUB_PATH
- name: Install bioconda-utils
run: |
export BIOCONDA_DISABLE_BUILD_PREP=1
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh
bash install-and-set-up-conda.sh
eval "$(conda shell.bash hook)"
mamba create -n bioconda -y --file test-requirements.txt --file bioconda_utils/bioconda_utils-requirements.txt
conda activate bioconda
python setup.py install
- name: Install bioconda-utils
run: |
export BIOCONDA_PREP_MACOS_FOR_BUILDING=0
curl -L "https://raw.githubusercontent.com/bioconda/bioconda-common/master/macos-github-runner.sh" | bash
mamba install -y --file test-requirements.txt --file bioconda_utils/bioconda_utils-requirements.txt
python setup.py install
- name: Run tests
run: |
eval "$(conda shell.bash hook)"
conda activate bioconda
if git diff --name-only origin/master...HEAD | grep -vE ^docs; then
py.test --durations=0 test/ -v --log-level=DEBUG -k "not docker" --tb=native
else
echo "Skipping pytest - only docs modified"
fi
- name: Run tests
run: |
if git diff --name-only origin/master...HEAD | grep -vE ^docs; then
py.test --durations=0 test/ -v --log-level=DEBUG -k "not docker" --tb=native
else
echo "Skipping pytest - only docs modified"
fi
autobump-test:
name: autobump test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup
uses: bioconda/bioconda-actions/bioconda_utils_setup_conda@master
- name: Install bioconda-utils
run: |
python setup.py install
- name: Test autobump
env:
AUTOBUMP_OPTS: --dry-run
uses: bioconda/bioconda-actions/bioconda_utils_autobump@master
- uses: actions/checkout@v1
- name: set path
run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH

- name: Install bioconda-utils
run: |
export BIOCONDA_DISABLE_BUILD_PREP=1
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh
bash install-and-set-up-conda.sh
eval "$(conda shell.bash hook)"
mamba create -n bioconda -y --file test-requirements.txt --file bioconda_utils/bioconda_utils-requirements.txt
conda activate bioconda
python setup.py install
- name: Test autobump
run: |
eval "$(conda shell.bash hook)"
conda activate bioconda
git clone --depth 1 https://github.com/bioconda/bioconda-recipes.git
cd bioconda-recipes
git config user.name Autobump
git config user.email [email protected]
mkdir /tmp/artifacts
bioconda-utils autobump \
--packages "a*" \
--unparsed-urls /tmp/artifacts/unparsed_urls.txt \
--failed-urls /tmp/artifacts/failed_urls.txt \
--recipe-status /tmp/artifacts/status.txt \
--create-pr \
--no-check-pinnings \
--no-check-pending-deps \
--no-follow-graph \
--exclude bioconductor-* \
--commit-as BiocondaBot [email protected] \
--max-updates 5 \
--dry-run
Loading

0 comments on commit c8e0895

Please sign in to comment.