diff --git a/.autorc b/.autorc new file mode 100644 index 0000000..209ff7d --- /dev/null +++ b/.autorc @@ -0,0 +1,92 @@ +{ + "plugins": [ + "git-tag", + "conventional-commits", + "first-time-contributor", + "released" + ], + "owner": "physiopy", + "repo": "physutils", + "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, + "color": "#05246d" + }, + { + "name": "Minormod", + "changelogTitle": "🚀 Enhancement", + "description": "This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0)", + "releaseType": "minor", + "overwrite": true, + "color": "#05246d" + }, + { + "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, + "color": "#05246d" + }, + { + "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, + "color": "#d73a4a" + }, + { + "name": "Documentation", + "changelogTitle": "📝 Documentation", + "description": "This issue or PR is about the documentation ", + "releaseType": "none", + "overwrite": true, + "color": "#1D70CF" + }, + { + "name": "Testing", + "changelogTitle": "⚠️ Tests", + "description": "This is for testing features, writing tests or producing testing code", + "releaseType": "none", + "overwrite": true, + "color": "#ffb5b4" + }, + { + "name": "Internal", + "changelogTitle": "🏠 Internal", + "description": "Changes affect the internal API. It doesn't increase the version, but produces a changelog", + "releaseType": "none", + "overwrite": true, + "color": "#ffffff" + }, + { + "name": "Outreach", + "changelogTitle": "🖋️ Outreach", + "description": "Issue about outreaching of any form", + "releaseType": "none", + "overwrite": true, + "color": "#0e8a16" + }, + { + "name": "Skip release", + "description": "This PR preserves the current version when merged, and doesn't appear in the changelog", + "releaseType": "skip", + "overwrite": true, + "color": "#ffffff" + }, + { + "name": "Release", + "description": "For PR only, trigger a release at the merge", + "releaseType": "release", + "overwrite": true, + "color": "#FFFFFF" + } + ] +} diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_BUGS.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_BUGS.md new file mode 100644 index 0000000..bb21794 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_BUGS.md @@ -0,0 +1,34 @@ +--- +name: Bug issue +about: Use this template to report bugs. +title: '' +labels: Bug +assignees: +--- + + + +## Expected Behavior + + + +## Actual Behavior + + + + +## Steps to Reproduce the Problem + + + 1. + 2. + 3. + +## Specifications + + - Python version: + - peakdet version: + - Platform: + +## Possible solution + diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_DISCUSSION.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_DISCUSSION.md new file mode 100644 index 0000000..265dd0b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_DISCUSSION.md @@ -0,0 +1,27 @@ +--- +name: Discussion +about: Use this template to start a discussion issue, i.e. an issue meant to open a community debate over a topic +title: '' +labels: Discussion +assignees: '' +--- + + + +I'm opening this discussion because/I think that/I noticed that... + + + + +## Outstanding questions + + + + - + - + - diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_FEATURE_REQUEST.md new file mode 100644 index 0000000..6695ddd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_FEATURE_REQUEST.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Use this template to request new features. +title: '' +labels: Enhancement +assignees: '' +--- + + + +## Detailed Description + + +## Context / Motivation + + + +## Possible Implementation + + diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_GENERAL.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_GENERAL.md new file mode 100644 index 0000000..957ba84 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_GENERAL.md @@ -0,0 +1,23 @@ +--- +name: General issue +about: Use this template for any issues not related to bugs or feature requests +title: '' +labels: +assignees: '' +--- + + + + +## Summary + + +## Additional detail + + +## Next Steps + + + * + * + * diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..5d5c0ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,4 @@ +contact_links: + - name: Usage question + url: https://neurostars.org/tag/physiopy + about: Please ask questions about using physiopy libraries here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ec3eb96 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,40 @@ + + + +Closes # + + + + +## Proposed Changes + + - + - + - + +## Change Type + +- [ ] `bugfix` (+0.0.1) +- [ ] `minor` (+0.1.0) +- [ ] `major` (+1.0.0) +- [ ] `refactoring` (no version update) +- [ ] `test` (no version update) +- [ ] `infrastructure` (no version update) +- [ ] `documentation` (no version update) +- [ ] `other` + +## Checklist before review + + +- [ ] I added everything I wanted to add to this PR. +- [ ] \[Code or tests only\] I wrote/updated the necessary docstrings. +- [ ] \[Code or tests only\] I ran and passed tests locally. +- [ ] \[Documentation only\] I built the docs locally. +- [ ] My contribution is harmonious with the rest of the code: I'm not introducing repetitions. +- [ ] My code respects the adopted style, especially linting conventions. +- [ ] The title of this PR is explanatory on its own, enough to be understood as part of a changelog. +- [ ] I added or indicated the right labels. + +- [ ] I added information regarding the timeline of completion for this PR. + +- [ ] Please, comment on my PR while it's a draft and give me feedback on the development! diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..9eb9bfe --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,11 @@ +Documentation: + - changed-files: + - any-glob-to-any-file: ['docs/*', '.readthedocs.yml', 'README.md', 'LICENSE', 'MANIFEST.in'] + +Internal: + - changed-files: + - any-glob-to-any-file: ['.*', 'codecov.yml', 'setup.cfg', 'setup.py', 'versioneer.py', '.github/*', '.circleci/*', 'physutils/_version.py', 'requirements.txt', 'pyproject.toml'] + +Testing: + - changed-files: + - any-glob-to-any-file: ['physutils/tests/*', '.circleci/*'] diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml new file mode 100644 index 0000000..8b102ae --- /dev/null +++ b/.github/workflows/auto-author-assign.yml @@ -0,0 +1,17 @@ +name: Auto Author Assign + +on: + issues: + types: [ opened, reopened ] + pull_request_target: + types: [ opened, reopened ] + +permissions: + pull-requests: write + issues: write + +jobs: + assign-author: + runs-on: ubuntu-latest + steps: + - uses: toshimaru/auto-author-assign@v2.1.0 diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 0000000..a4c3f22 --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,15 @@ +name: auto-label +concurrency: + group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} + cancel-in-progress: true +on: # yamllint disable-line rule:truthy + pull_request_target + +jobs: + pr: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 0000000..e75c32d --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,43 @@ +# This workflows will create a release using auto when a PR is merged in master. + +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-22.04 + # Set skip ci to avoid loops + if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" + # Set bash as default shell for jobs + defaults: + run: + shell: bash + steps: + - name: Checkout source + uses: actions/checkout@v2 + with: + # Fetch all history for all branches and tags + fetch-depth: 0 + # Use token with write access to the repo + token: ${{ secrets.GH_TOKEN }} + - name: Download and install latest auto + env: + # OS can be linux, macos, or win + OS: linux + # Retrieve URL of latest auto, download it, unzip it, and give exec permissions. + run: | + curl -vkL -o - $( curl -s https://api.github.com/repos/intuit/auto/releases/latest \ + | grep browser_download_url | grep ${OS} | awk -F'"' '{print $4}') \ + | gunzip > ~/auto + chmod a+x ~/auto + - name: Create release without version prefix + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + # Run auto release, don't use 'v' prefix, and be verbose + run: | + ~/auto shipit --no-version-prefix -v diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..8e539a9 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -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-22.04 + + steps: + - name: Checkout source + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.6' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/*