Skip to content

Commit

Permalink
Merge pull request #181 from smoia/auto
Browse files Browse the repository at this point in the history
Implement automatic release
  • Loading branch information
Stefano Moia authored Jun 15, 2020
2 parents e417628 + 0de335e commit 4a648df
Show file tree
Hide file tree
Showing 9 changed files with 273 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
],
"imageSize": 100,
"commit": false,
"badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat)](#contributors-)",
"contributors": [
{
"login": "danalclop",
Expand Down Expand Up @@ -135,7 +136,7 @@
]
}
],
"contributorsPerLine": 5,
"contributorsPerLine": 7,
"projectName": "phys2bids",
"projectOwner": "physiopy",
"repoType": "github",
Expand Down
86 changes: 86 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"plugins": [
"git-tag",
"all-contributors",
"conventional-commits",
"first-time-contributor",
"released"
],
"release": {
"prerelease": true
},
"owner": "physiopy",
"repo": "phys2bids",
"name": "Stefano Moia",
"email": "s.moia@bcbl.eu",
"labels": [
{
"name": "Majormod",
"changelogTitle": "💥 Breaking Change",
"description": "This PR breaks compatibility, and increments the major version (+1.0.0)",
"releaseType": "major",
"overwrite": true
},
{
"name": "Minormod",
"changelogTitle": "🚀 Enhancement",
"description": "This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0)",
"releaseType": "minor",
"overwrite": true
},
{
"name": "Minormod-breaking",
"changelogTitle": "💥 Breaking Change during development",
"description": "For development only, this PR increments the minor version (0.+1.0) but breaks compatibility",
"releaseType": "minor",
"overwrite": true
},
{
"name": "BugFIX",
"changelogTitle": "🐛 Bug Fix",
"description": "This PR generally closes a `Bug` issue, and increments the patch version (0.0.+1)",
"releaseType": "patch",
"overwrite": true
},
{
"name": "Documentation",
"changelogTitle": "📝 Documentation",
"description": "This issue or PR is about the documentation ",
"releaseType": "none",
"overwrite": true
},
{
"name": "Testing",
"changelogTitle": "⚠️ Tests",
"description": "This is for testing features, writing tests or producing testing code",
"releaseType": "none",
"overwrite": true
},
{
"name": "Internal",
"changelogTitle": "🏠 Internal",
"description": "Changes affect the internal API. It doesn't increase the version, but produces a changelog",
"releaseType": "none",
"overwrite": true
},
{
"name": "Outreach",
"changelogTitle": "🖋️ Outreach",
"description": "Issue about outreaching of any form",
"releaseType": "none",
"overwrite": true
},
{
"name": "Skip release",
"description": "This PR preserves the current version when merged, and doesn't appear in the changelog",
"releaseType": "skip",
"overwrite": true
},
{
"name": "Release",
"description": "For PR only, trigger a release at the merge",
"releaseType": "release",
"overwrite": true
}
]
}
32 changes: 32 additions & 0 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-18.04

steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m python setup.py sdist bdist_wheel
python -m twine upload dist/*
42 changes: 38 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
language: python
sudo: false
dist: xenial
os: linux
dist: bionic
services:
- xvfb
notifications:
email: change

language: python

python:
- 3.6
- 3.7
Expand All @@ -28,9 +29,27 @@ matrix:
env:
- INSTALL_TYPE=wheel
- CHECK_TYPE=test
- language: node_js
node_js: 10
env:
- INSTALL_TYPE=auto-svl
- CHECK_TYPE=auto-svl
- GIT_NAME="Stefano Moia"
- GIT_EMAIL="s.moia@bcbl.eu"
- GH_USER="smoia"

before_install:
- python -m pip install --upgrade pip
- if [ "${CHECK_TYPE}" == "auto-svl" ]; then
CHECK_BRANCH=$( git branch | grep \*);
if [ "${CHECK_BRANCH}" == "* master" ]; then
git config --local user.name "${GIT_NAME}";
git config --local user.email "${GIT_EMAIL}";
else
echo "Not on master branch, skipping auto-svl";
fi;
else
python -m pip install --upgrade pip;
fi
- if [ "${CHECK_TYPE}" == "linting" ]; then
pip install flake8;
fi
Expand All @@ -53,6 +72,14 @@ install:
pip install "bioread>=1.0.5";
python setup.py bdist_wheel;
pip install dist/*.whl;
elif [ "${INSTALL_TYPE}" == "auto-svl" ]; then
CHECK_BRANCH=$( git branch | grep \*);
if [ "${CHECK_BRANCH}" == "* master" ]; then
curl -vkL -o - https://github.com/intuit/auto/releases/download/v9.39.0/auto-linux.gz | gunzip > build/auto;
chmod a+x build/auto;
else
echo "Not on master branch, skipping auto-svl";
fi;
else
false;
fi
Expand All @@ -71,6 +98,13 @@ script:
cp ../setup.cfg ./;
args="--doctest-modules --cov-report term-missing --cov=phys2bids --pyargs"
python -m pytest ${args} phys2bids;
elif [ "${CHECK_TYPE}" == "auto-svl" ]; then
CHECK_BRANCH=$( git branch | grep \*);
if [ "${CHECK_BRANCH}" == "* master" ]; then
build/auto shipit;
else
echo "Not on master branch, skipping auto-svl";
fi;
else
false;
fi
Expand Down
78 changes: 78 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"metadata": {
"license": {
"id": "Apache-2.0"
},
"title": "physiopy/phys2bids: BIDS formatting of physiological recordings",
"relations": {
"version": [
{
"count": 8,
"index": 7,
"parent": {
"pid_type": "recid",
"pid_value": "3470091"
}
}
]
},
"creators": [
{
"affiliation": "BCBL - Basque Center on Cognition, Brain and Language",
"name": "Daniel Alcal\u00e1"
},
{
"affiliation": "Northwestern University",
"name": "Apoorva Ayyagari"
},
{
"affiliation": "Northwestern University",
"name": "Molly Bright"
},
{
"affiliation": "BCBL - Basque Center on Cognition, Brain and Language",
"name": "C\u00e9sar Caballero Gaudes"
},
{
"affiliation": "BCBL - Basque Center on Cognition, Brain and Language",
"name": "Vicente Ferrer"
},
{
"name": "Soichi Hayashi"
},
{
"affiliation": "McGill University",
"name": "Ross Markello"
},
{
"orcid": "0000-0002-2553-3327",
"affiliation": "BCBL - Basque Center on Cognition, Brain and Language",
"name": "Stefano Moia"
},
{
"affiliation": "Northwestern University",
"name": "Rachael Stickland"
},
{
"affiliation": "BCBL - Basque Center on Cognition, Brain and Language",
"name": "Eneko Uru\u00f1uela"
},
{
"affiliation": "Northwestern University",
"name": "Kristina Zvolanek"
}
],
"access_right": "open",
"resource_type": {
"type": "software",
"title": "Software"
},
"related_identifiers": [
{
"scheme": "doi",
"identifier": "10.5281/zenodo.3470091",
"relation": "isVersionOf"
}
]
}
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ phys2bids
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3653153.svg)](https://doi.org/10.5281/zenodo.3653153)
[![Join the chat at Gitter: https://gitter.im/physiopy/phys2bids](https://badges.gitter.im/physiopy/phys2bids.svg)](https://gitter.im/physiopy/phys2bids?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)
[![codecov](https://codecov.io/gh/physiopy/phys2bids/branch/master/graph/badge.svg)](https://codecov.io/gh/physiopy/phys2bids)
[![Auto Release](https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto)](https://github.com/intuit/auto)

[![Build Status: Linux](https://travis-ci.org/physiopy/phys2bids.svg?branch=master)](https://travis-ci.org/physiopy/phys2bids)
[![Build Status. Windows](https://dev.azure.com/physiopy/phys2bids/_apis/build/status/physiopy.phys2bids?branchName=master)](https://dev.azure.com/physiopy/phys2bids/_build/latest?definitionId=1&branchName=master)
[![See the documentation at: https://phys2bids.readthedocs.io](https://readthedocs.org/projects/phys2bids/badge/?version=latest)](https://phys2bids.readthedocs.io/en/latest/?badge=latest)
[![Requirements Status](https://requires.io/github/physiopy/phys2bids/requirements.svg?branch=master)](https://requires.io/github/physiopy/phys2bids/requirements/?branch=master)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
Expand Down
51 changes: 32 additions & 19 deletions docs/contributorfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Already know what you're looking for in this guide? Jump to the following sectio
- `Contributing code through GitHub <#code>`_
- `Issues and Milestones <#issuesmilestones>`_
- `Labels <#labeltypes>`_
- `Issues & PRs labels <#issueprlabels>`_
- `Issues labels <#issuelabel>`_
- `PRs labels <#prlabel>`_
- `Issues & PRs labels <#issueprlabels>`_
- `Good First Issues <#g1i>`_
- `Contribution workflow <#workflow>`_
- `Pull Requests <#pr>`_
Expand Down Expand Up @@ -116,12 +116,26 @@ At physiopy, we use Issues and Milestones to keep track of and organise our work
Labels
------
The current list of labels are `here <https://github.com/physiopy/phys2bids/labels>`_. They can be used for **Issues**, **PRs**, or both.
We use `auto <https://github.com/intuit/auto>`_ to automatise our semantic versioning and Pypi upload, so **it's extremely important to use the right PR labels**!

.. _issueprlabels:

Issue & PR labels
~~~~~~~~~~~~~~~~~~~
- Documentation: Improvements or additions to documentation. This category includes (but is not limited to) docs pages, docstrings, and code comments.
- Duplicate: Whatever this is, it exists already! Maybe it’s a closed Issue/PR, that should be reopened.
- Enhancement: New features added or requested. This normally goes with a ``minormod`` label for PRs.
- Outreach: As part of the scientific community, we care about outreach. Check the relevant section about it, but know that this Issue/PR contains information or tasks about abstracts, talks, demonstrations, papers.
- Paused: Issue or PR should not be worked on until the resolution of other issues or PRs.
- Testing: This is for testing features, writing tests or producing testing code. Both user testing and CI testing!
- Urgent: If you don't know where to start, start here! This is probably related to a milestone due soon!

.. _issuelabel:

Issues labels
~~~~~~~~~~~~~
Issue-only labels
~~~~~~~~~~~~~~~~~~
- Bug: Something isn’t working. It either breaks the code or has an unexpected outcome.
- Community: This issue contains information about the `physiopy` community (e.g. the next developer call)
- Discussion: Discussion of a concept or implementation. These Issues are prone to be open ad infinitum. Jump in the conversation if you want!
- Good first issue: Good for newcomers. These issues calls for a **fairly** easy enhancement, or for a change that helps/requires getting to know the code better. They have educational value, and for this reason, unless urgent, experts in the topic should refrain from closing them - but help newcomers closing them.
- Hacktoberfest: Dedicated to the hacktoberfest event, so that people can help and feel good about it (and show it with a T-shirt!). **Such commits will not be recognised in the all-contributor table, unless otherwise specified**.
Expand All @@ -132,24 +146,23 @@ Issues labels

.. _prlabel:

PRs labels
~~~~~~~~~~
- BugFIX: These PRs close an issue labelled ``bug``. they also increase the semantic versioning for fixes (+0.0.1).
- Invalid: These PRs don't seem right. They actually seem so not right that they won’t be further processed. This label invalidates an Hacktoberfest contribution. If you think this is wrong, start a discussion in the relevant issue (or open one if missing). Reviewers are asked to give an explanation for the use of this label.
PR-only labels
~~~~~~~~~~~~~~~

Labels for semantic release and changelogs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Majormod: These PRs call for a new major release (+1.0.0). This means that the PR is breaking backward compatibility.
- Minormod: These PRs call for a new minor release (0.+1.0). This means that the PR is **not** breaking backward compatibility.

.. _issueprlabels:

Issues & PRs labels
~~~~~~~~~~~~~~~~~~~
- Documentation: Improvements or additions to documentation. This category includes (but is not limited to) docs pages, docstrings, and code comments.
- Duplicate: Whatever this is, it exists already! Maybe it’s a closed Issue/PR, that should be reopened.
- Enhancement: New features added or requested. This normally goes with a ``minormod`` label for PRs.
- Outreach: As part of the scientific community, we care about outreach. Check the relevant section about it, but know that this Issue/PR contains information or tasks about abstracts, talks, demonstrations, papers.
- Paused: Issue or PR should not be worked on until the resolution of other issues or PRs.
- Testing: This is for testing features, writing tests or producing testing code. Both user testing and CI testing!
- Urgent: If you don't know where to start, start here! This is probably related to a milestone due soon!
- BugFIX: These PRs close an issue labelled ``bug``. They also increase the semantic versioning for fixes (+0.0.1).
- Internal: This PR contains changes to the internal API. It won't trigger a release, but it will be reported in the changelog.
- Documentation: See above. This PR won't trigger a release, but it will be reported in the changelog.
- Testing: See above. This PR won't trigger a release, but it will be reported in the changelog.
- Skip release: This PR will **not** trigger a release.
- Release: This PR will force the trigger of a release.

Other labels
^^^^^^^^^^^^
- Invalid: These PRs don't seem right. They actually seem so not right that they won’t be further processed. This label invalidates a Hacktoberfest contribution. If you think this is wrong, start a discussion in the relevant issue (or open one if missing). Reviewers are asked to give an explanation for the use of this label.

.. _g1i:

Expand Down
3 changes: 3 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ phys2bids
:target: https://codecov.io/gh/physiopy/phys2bids
:alt: codecov

.. image:: https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto
:target: https://github.com/intuit/auto
:alt: Auto Release

``phys2bids`` is a python3 library meant to format physiological files in BIDS.
It was born for AcqKnowledge files (BIOPAC), and at the moment it supports
Expand Down
Empty file added phys2bids/heuristics/heur_ex.py
Empty file.

0 comments on commit 4a648df

Please sign in to comment.