Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
smoia authored Jul 25, 2024
0 parents commit 269d18c
Show file tree
Hide file tree
Showing 25 changed files with 3,038 additions and 0 deletions.
206 changes: 206 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
{
"plugins": [
"git-tag",
"conventional-commits",
"first-time-contributor",
["released", {"label": "Released", "prereleaseLabel": "Prereleased"}],
["pr-body-labels", { "disabledLabels": ["release", "Release", "Released", "Prereleased", "Skip release"] }]
],
"owner": "physiopy",
"repo": "<reponame>",
"name": "Stefano Moia",
"email": "[email protected]",
"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": "Refactoring",
"changelogTitle": "💻 Refactored",
"description": "Improve nonfunctional attributes and bump up a minor version (0.+1.0)",
"releaseType": "minor",
"overwrite": true,
"color": "#9494ff"
},
{
"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"
},
{
"name": "Discussion",
"description": "Discussion of a concept or implementation, needs to stay open",
"releaseType": "none",
"overwrite": true,
"color": "#1c778c"
},
{
"name": "Duplicate",
"description": "This issue or pull request already exists",
"releaseType": "none",
"overwrite": true,
"color": "#cfd3d7"
},
{
"name": "Enhancement",
"description": "New feature or request",
"releaseType": "none",
"overwrite": true,
"color": "#a2eeef"
},
{
"name": "Good First Issue",
"description": "A good first issue to tackle to get comfortable with the project",
"releaseType": "none",
"overwrite": true,
"color": "#4e2a84"
},
{
"name": "Hacktoberfest",
"description": "Issue/PR for hacktoberfest. Completing this issue/PR might not grant the all-contributor recognition",
"releaseType": "none",
"overwrite": true,
"color": "#ff7518"
},
{
"name": "hacktoberfest-accepted",
"description": "To accept a PR for the aims of the hacktoberfest",
"releaseType": "none",
"overwrite": true,
"color": "#ff7518"
},
{
"name": "BrainHack",
"description": "This issue is suggested for BrainHack participants!",
"releaseType": "none",
"overwrite": true,
"color": "#000000"
},
{
"name": "Help wanted",
"description": "A pair of extra eyes are needed here!",
"releaseType": "none",
"overwrite": true,
"color": "#57db1a"
},
{
"name": "Invalid",
"description": "This just doesn't seem right",
"releaseType": "skip",
"overwrite": true,
"color": "#960018"
},
{
"name": "Paused",
"description": "Issue should not be worked on until the resolution of other issues or Pull Requests",
"releaseType": "none",
"overwrite": true,
"color": "#f7c38c"
},
{
"name": "Question",
"description": "Request information about the project. For users only",
"releaseType": "none",
"overwrite": true,
"color": "#d876e3"
},
{
"name": "Urgent",
"description": "If you don't know where to start, start here!",
"releaseType": "none",
"overwrite": true,
"color": "#fff200"
},
{
"name": "Wontfix",
"description": "This will not be worked on",
"releaseType": "none",
"overwrite": true,
"color": "#ffffff"
},
{
"name": "Released",
"description": "This PR has been released!",
"releaseType": "none",
"overwrite": true,
"color": "#ffffff"
},
{
"name": "Prereleased",
"description": "This PR has been released in a prerelease",
"releaseType": "none",
"overwrite": true,
"color": "#ffffff"
}
]
}
145 changes: 145 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# See: https://circleci.com/docs/2.0/orb-intro/
orbs:
# The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files
# Orb commands and jobs help you with common scripting around a language/tool
# so you dont have to copy and paste it everywhere.
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
python: circleci/[email protected]
codecov: codecov/[email protected]

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
test37: # This is the name of the job, feel free to change it to better match what you're trying to do!
# These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/
# You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub
# A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python
# The executor is the environment in which the steps below will be executed - below will use a python 3.6.14 container
# Change the version below to your required version of python
docker:
- image: cimg/python:3.7
working_directory: /tmp/src/<reponame>
resource_class: medium
# Checkout the code as the first step. This is a dedicated CircleCI step.
# The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default.
# Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt.
# Then run your tests!
# CircleCI will report the results back to your VCS provider.
steps:
- checkout
# Install Pillow first to avoid jpsg and zlib issues
- python/install-packages:
path-args: .[test]
pypi-cache: false
venv-cache: false
pkg-manager: pip-dist
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
# pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements.
- run:
name: Run tests
# This assumes pytest is installed via the install-package step above
command: |
pytest --cov=./<reponame>
mkdir /tmp/src/coverage
mv ./.coverage /tmp/src/coverage/.coverage.py37
- store_artifacts:
path: /tmp/src/coverage
# Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job.
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
# taken to be the root directory of the workspace.
root: /tmp
# Must be relative path from root
paths:
- src/coverage/.coverage.py37

test310:
docker:
- image: cimg/python:3.10
working_directory: /tmp/src/<reponame>
resource_class: medium
steps:
- checkout
- python/install-packages:
path-args: .[test]
pypi-cache: false
venv-cache: false
pkg-manager: pip-dist
- run:
name: Run tests
command: |
pytest --cov=./<reponame>
mkdir /tmp/src/coverage
mv ./.coverage /tmp/src/coverage/.coverage.py310
- store_artifacts:
path: /tmp/src/coverage
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py310

style_check:
docker:
- image: cimg/python:3.7
working_directory: /tmp/src/<reponame>
resource_class: small
steps:
- checkout
- python/install-packages:
path-args: .[style]
pypi-cache: false
venv-cache: false
pkg-manager: pip-dist
- run:
name: Check style
command: |
isort --check .
black --check <reponame>
flake8 ./<reponame>
merge_coverage:
working_directory: /tmp/src/<reponame>
docker:
- image: cimg/python:3.10
resource_class: small
steps:
- attach_workspace:
at: /tmp
- checkout
- python/install-packages:
args: coverage
pkg-manager: pip
- run:
name: Merge coverage files
command: |
sudo apt update && sudo apt install curl
cd /tmp/src/coverage/
coverage combine
coverage xml
- store_artifacts:
path: /tmp/src/coverage
- codecov/upload:
file: /tmp/src/coverage/coverage.xml

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
build_test: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- style_check
- test37:
requires:
- style_check
- test310:
requires:
- style_check
- merge_coverage:
requires:
- test37
- test310
19 changes: 19 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[run]
omit =
docs/*
tests/*
_version.py
__init__.py
**/__init__.py
due.py
.*rc
versioneer.py
setup.py
*/tests/*
*/_version.py
*/__init__.py
*/**/__init__.py
*/due.py
*/.*rc
*/versioneer.py
*/setup.py
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<reponame>/_version.py export-subst

*.py eol=lf
*.rst eol=lf
Loading

0 comments on commit 269d18c

Please sign in to comment.