Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into nwb2asset
Browse files Browse the repository at this point in the history
* upstream/master: (116 commits)
  ENH: basic duecredit support
  DOC: strip away duplicate with the handbook information
  Update CHANGELOG.md [skip ci]
  Tweak pubschemata commit message
  Adjust workflow path triggers
  Add comment to numpy API warning ignore setting
  Workflow for publishing model schemata to dandi/schema
  [#275] Ignore numpy API warning
  Support h5py 3.0
  Add healthchecks for the Postgres and minio Docker containers
  Include item path in "Multiple files found for item" message
  Copy files with `cp --reflink=auto` where supported
  Test the rest of keyring_lookup()
  More keyring_lookup() tests
  Test askyesno()
  Test that keyring backends specified with env vars take precedence over config files
  Test keyring_lookup() when backend is set via config file
  Test asking for an API key twice via input()
  Test keyring_lookup() when backend is set via env var
  Basic test of getting an API key via input()
  ...
  • Loading branch information
satra committed Nov 30, 2020
2 parents 33c7e53 + 194ce14 commit f110465
Show file tree
Hide file tree
Showing 34 changed files with 2,059 additions and 724 deletions.
7 changes: 7 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"onlyPublishWithReleaseLabel": true,
"baseBranch": "master",
"author": "auto <auto@nil>",
"noVersionPrefix": true,
"plugins": ["git-tag"]
}
51 changes: 51 additions & 0 deletions .github/workflows/publish-schemata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish model schemata

on:
# ATM, this is the closest trigger to a PR merging
push:
branches:
- master
paths:
- dandi/model*.py
- tools/pubschemata.py

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # Need history for `git describe`
path: dandi

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'

- name: Install dandi
run: python -m pip install .
working-directory: dandi

- name: Checkout dandi/schema
uses: actions/checkout@v2
with:
repository: dandi/schema
path: schema
token: ${{ secrets.DANDI_GITHUB_TOKEN }}

- name: Generate model schemata
run: python dandi/tools/pubschemata.py schema/releases

- name: Commit changes
run: |
git add releases
if ! git diff --quiet
then git commit -m "Publish model schemata as of dandi-cli $(git -C ../dandi describe --tags)"
git push
else echo "No changes to commit"
fi
working-directory: schema

# vim:set sts=2:
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Auto-release on PR merge

on:
# ATM, this is the closest trigger to a PR merging
push:
branches:
- master

jobs:
auto-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
outputs:
auto-version: ${{ steps.auto-version.outputs.version }}
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download latest auto
run: |
auto_download_url="$(curl -fsSL https://github.com/gitapi/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')"
wget -O- "$auto_download_url" | gunzip > ~/auto
chmod a+x ~/auto
- name: Check whether a release is due
id: auto-version
run: |
version="$(~/auto version)"
echo "::set-output name=version::$version"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create release
run: ~/auto shipit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pypi:
runs-on: ubuntu-latest
needs: auto-release
if: "needs.auto-release.outputs.auto-version != ''"
steps:
# By default, actions/checkout will checkout the commit that that was
# pushed to master and triggered the workflow, but this does not include
# the commit & tag created by `auto`. In order to get that, we need to
# look up the tag for the latest release.
- name: Get tag of latest release
id: latest-release
run: |
latest_tag="$(curl -fsSL https://github.com/gitapi/repos/$GITHUB_REPOSITORY/releases/latest | jq -r .tag_name)"
echo "::set-output name=tag::$latest_tag"
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ steps.latest-release.outputs.tag }}

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.6

- name: Install build & twine
run: python -m pip install build twine

- name: Build
run: python -m build

- name: Upload
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

# vim:set sts=2:
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
python -m pip install --upgrade pip
pip install ".[test]"
- name: Set environment variable when using Python 3.6 to cover more code
run: echo "::set-env name=DANDI_LOG_GIRDER::1"
run: echo DANDI_LOG_GIRDER=1 >> "$GITHUB_ENV"
if: matrix.python == '3.6'
- name: ${{ matrix.module }} tests
run: |
Expand Down
Loading

0 comments on commit f110465

Please sign in to comment.