Skip to content

Commit

Permalink
Merge pull request #2 from smoia/int/setup
Browse files Browse the repository at this point in the history
Finish setup and attempt built
  • Loading branch information
smoia authored Feb 13, 2024
2 parents 777490d + ab2a318 commit b90b8a9
Show file tree
Hide file tree
Showing 59 changed files with 1,032 additions and 441 deletions.
2 changes: 1 addition & 1 deletion .autorc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
["pr-body-labels", { "disabledLabels": ["release", "Release", "Released", "Prereleased", "Skip release"] }]
],
"owner": "physiopy",
"repo": "<reponame>",
"repo": "physiopy-community-guidelines",
"name": "Stefano Moia",
"email": "s.moia.research@gmail.com",
"labels": [
Expand Down
108 changes: 3 additions & 105 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,83 +10,15 @@ orbs:
# 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/python@2.0.3
codecov: codecov/codecov@3.2.2

# 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>
working_directory: /tmp/src/physiopy-community-guidelines
resource_class: small
steps:
- checkout
Expand All @@ -99,32 +31,8 @@ jobs:
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
black --check physiopy-community-guidelines
flake8 ./physiopy-community-guidelines
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
Expand All @@ -133,13 +41,3 @@ workflows:
# 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: 0 additions & 19 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<reponame>/_version.py export-subst
physiopy-community-guidelines/_version.py export-subst

*.py eol=lf
*.rst eol=lf
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ repos:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
Expand Down
11 changes: 7 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ version: 2
build:
os: "ubuntu-20.04"
tools:
python: "3.7"
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
configuration: docs/source/conf.py

formats:
- pdf
- epub

python:
install:
- method: pip
path: .
extra_requirements:
- doc
system_packages: true
- style
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"license":"<License>",
"title":"<Title>",
"license":"CC-BY-SA-4.0",
"title":"Physiopy Community Guidelines",
"upload_type":"software",
"creators":[
{
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.* LICENSE setup* MANIFEST.in requirements.txt

include versioneer.py
include <reponame>/_version.py
include docs/_version.py
104 changes: 17 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,33 @@
<a name="readme"></a>
<img alt="repository" src="https://raw.githubusercontent.com/physiopy/phys2bids/master/docs/_static/physiopy_logo_small.png" height="150">

This is a template for physiopy's repositories (and other repositories based on the same settings).

Remember to change the licence as soon as you adopt the template.

Available Configurations
------------------------
This repository is meant to be a template for python3 projects.
- CircleCI medium docker running Linux (python 3.7, 3.10, style checks, and coverage)
- Auto release based on Github versioning with Physiopy's labels.
- `.gitattributes` for python
- `.gitignore` for python and containers
- Pre-commit (black, isort, flake8, pydocstyle, and RST documentation)
- Read the Docs (based on sphinx)
- Zenodo
- Codecov (for master branch, 90%+)
- Python setup with `extra_require` options
- Versioneer
- Issue templates (bugs, feature requests, generic)
- PR template
- Workflows (Auto release and PyPI upload)

Usage
-----
1. Find and replace the items between `<>`, for instance `<reponame>`
2. Change licence
3. Set up your default pushes to `origin` (`git config remote.pushDefault origin`)
4. Finish setting up everything.

More explanation coming soon.

<reponame>
==========

[![Latest version](https://img.shields.io/github/v/release/physiopy/<reponame>?style=flat&logo=github&sort=semver)](https://github.com/physiopy/<reponame>/releases)
[![Release date](https://img.shields.io/github/release-date/physiopy/<reponame>?style=flat&logo=github)](https://github.com/physiopy/<reponame>/releases)
[![Auto Release](https://img.shields.io/badge/release-auto.svg?style=flat&colorA=888888&colorB=9B065A&label=auto&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACzElEQVR4AYXBW2iVBQAA4O+/nLlLO9NM7JSXasko2ASZMaKyhRKEDH2ohxHVWy6EiIiiLOgiZG9CtdgG0VNQoJEXRogVgZYylI1skiKVITPTTtnv3M7+v8UvnG3M+r7APLIRxStn69qzqeBBrMYyBDiL4SD0VeFmRwtrkrI5IjP0F7rjzrSjvbTqwubiLZffySrhRrSghBJa8EBYY0NyLJt8bDBOtzbEY72TldQ1kRm6otana8JK3/kzN/3V/NBPU6HsNnNlZAz/ukOalb0RBJKeQnykd7LiX5Fp/YXuQlfUuhXbg8Di5GL9jbXFq/tLa86PpxPhAPrwCYaiorS8L/uuPJh1hZFbcR8mewrx0d7JShr3F7pNW4vX0GRakKWVk7taDq7uPvFWw8YkMcPVb+vfvfRZ1i7zqFwjtmFouL72y6C/0L0Ie3GvaQXRyYVB3YZNE32/+A/D9bVLcRB3yw3hkRCdaDUtFl6Ykr20aaLvKoqIXUdbMj6GFzAmdxfWx9iIRrkDr1f27cFONGMUo/gRI/jNbIMYxJOoR1cY0OGaVPb5z9mlKbyJP/EsdmIXvsFmM7Ql42nEblX3xI1BbYbTkXCqRnxUbgzPo4T7sQBNeBG7zbAiDI8nWfZDhQWYCG4PFr+HMBQ6l5VPJybeRyJXwsdYJ/cRnlJV0yB4ZlUYtFQIkMZnst8fRrPcKezHCblz2IInMIkPzbbyb9mW42nWInc2xmE0y61AJ06oGsXL5rcOK1UdCbEXiVwNXsEy/6+EbaiVG8eeEAfxvaoSBnCH61uOD7BS1Ul8ESHBKWxCrdyd6EYNKihgEVrwOAbQruoytuBYIFfAc3gVN6iawhjKyNCEpYhVJXgbOzARyaU4hCtYizq5EI1YgiUoIlT1B7ZjByqmRWYbwtdYjoWoN7+LOIQefIqKawLzK6ID69GGpQgwhhEcwGGUzfEPAiPqsCXadFsAAAAASUVORK5CYII=)](https://github.com/intuit/auto)
This repository contains the source files for our community guidelines.

[![See the documentation at: https://<reponame>.readthedocs.io](https://img.shields.io/badge/docs-read%20latest-informational?style=flat&logo=readthedocs)](https://<reponame>.readthedocs.io/en/latest/?badge=latest)
<!-- [![Latest DOI](https://zenodo.org/badge/<doi>.svg)](https://zenodo.org/badge/latestdoi/<doi>) -->
<!-- [![Licensed Apache 2.0](https://img.shields.io/github/license/physiopy/<reponame>?style=flat&logo=apache)](https://github.com/physiopy/<reponame>/blob/master/LICENSE) -->
Find them at https://physiopy-community-guidelines.readthedocs.io/en/latest/


physiopy-community-guidelines
=============================

[![Codecov](https://img.shields.io/codecov/c/gh/physiopy/<reponame>?style=flat&label=codecov&logo=codecov)](https://codecov.io/gh/physiopy/<reponame>)
[![Build Status](https://img.shields.io/circleci/build/github/physiopy/<reponame>?style=flat&label=circleci&logo=circleci)](https://circleci.com/gh/physiopy/<reponame>)
[![Documentation Status](https://img.shields.io/readthedocs/<reponame>?style=flat&label=readthedocs&logo=readthedocs)](https://<reponame>.readthedocs.io/en/latest/?badge=latest)
[![Latest version](https://img.shields.io/github/v/release/physiopy/physiopy-community-guidelines?style=flat&logo=github&sort=semver)](https://github.com/physiopy/physiopy-community-guidelines/releases)
[![Release date](https://img.shields.io/github/release-date/physiopy/physiopy-community-guidelines?style=flat&logo=github)](https://github.com/physiopy/physiopy-community-guidelines/releases)
[![Auto Release](https://img.shields.io/badge/release-auto.svg?style=flat&colorA=888888&colorB=9B065A&label=auto&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACzElEQVR4AYXBW2iVBQAA4O+/nLlLO9NM7JSXasko2ASZMaKyhRKEDH2ohxHVWy6EiIiiLOgiZG9CtdgG0VNQoJEXRogVgZYylI1skiKVITPTTtnv3M7+v8UvnG3M+r7APLIRxStn69qzqeBBrMYyBDiL4SD0VeFmRwtrkrI5IjP0F7rjzrSjvbTqwubiLZffySrhRrSghBJa8EBYY0NyLJt8bDBOtzbEY72TldQ1kRm6otana8JK3/kzN/3V/NBPU6HsNnNlZAz/ukOalb0RBJKeQnykd7LiX5Fp/YXuQlfUuhXbg8Di5GL9jbXFq/tLa86PpxPhAPrwCYaiorS8L/uuPJh1hZFbcR8mewrx0d7JShr3F7pNW4vX0GRakKWVk7taDq7uPvFWw8YkMcPVb+vfvfRZ1i7zqFwjtmFouL72y6C/0L0Ie3GvaQXRyYVB3YZNE32/+A/D9bVLcRB3yw3hkRCdaDUtFl6Ykr20aaLvKoqIXUdbMj6GFzAmdxfWx9iIRrkDr1f27cFONGMUo/gRI/jNbIMYxJOoR1cY0OGaVPb5z9mlKbyJP/EsdmIXvsFmM7Ql42nEblX3xI1BbYbTkXCqRnxUbgzPo4T7sQBNeBG7zbAiDI8nWfZDhQWYCG4PFr+HMBQ6l5VPJybeRyJXwsdYJ/cRnlJV0yB4ZlUYtFQIkMZnst8fRrPcKezHCblz2IInMIkPzbbyb9mW42nWInc2xmE0y61AJ06oGsXL5rcOK1UdCbEXiVwNXsEy/6+EbaiVG8eeEAfxvaoSBnCH61uOD7BS1Ul8ESHBKWxCrdyd6EYNKihgEVrwOAbQruoytuBYIFfAc3gVN6iawhjKyNCEpYhVJXgbOzARyaU4hCtYizq5EI1YgiUoIlT1B7ZjByqmRWYbwtdYjoWoN7+LOIQefIqKawLzK6ID69GGpQgwhhEcwGGUzfEPAiPqsCXadFsAAAAASUVORK5CYII=)](https://github.com/intuit/auto)

[![Latest version](https://img.shields.io/pypi/v/<reponame>?style=flat&logo=pypi&logoColor=white)](https://pypi.org/project/<reponame>/)
[![Supports python version](https://img.shields.io/pypi/pyversions/<reponame>?style=flat&logo=python&logoColor=white)](https://pypi.org/project/<reponame>/)
[![See the documentation at: https://physiopy-community-guidelines.readthedocs.io](https://img.shields.io/badge/docs-read%20latest-informational?style=flat&logo=readthedocs)](https://physiopy-community-guidelines.readthedocs.io/en/latest/?badge=latest)
<!-- [![Latest DOI](https://zenodo.org/badge/<doi>.svg)](https://zenodo.org/badge/latestdoi/<doi>) -->
<!-- [![Licensed Apache 2.0](https://img.shields.io/github/license/physiopy/physiopy-community-guidelines?style=flat&logo=apache)](https://github.com/physiopy/physiopy-community-guidelines/blob/master/LICENSE) -->

[![Documentation Status](https://img.shields.io/readthedocs/physiopy-community-guidelines?style=flat&label=readthedocs&logo=readthedocs)](https://physiopy-community-guidelines.readthedocs.io/en/latest/?badge=latest)
[![Latest version](https://img.shields.io/pypi/v/physiopy-community-guidelines?style=flat&logo=pypi&logoColor=white)](https://pypi.org/project/physiopy-community-guidelines/)
[![Auto Release](https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto)](https://github.com/intuit/auto)
[![Supports python version](https://img.shields.io/pypi/pyversions/<reponame>)](https://pypi.org/project/<reponame>/)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat)](#contributors)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

``<reponame>`` is a python3 library meant to do something.

> If you use ``<reponame>`` in your work, please support it by citing the zenodo DOI of the version you used. You can find the latest version [here](https://doi.org/10.5281/zenodo.3470091)
> We also support gathering all relevant citations via [DueCredit](http://duecredit.org).
> If you use ``physiopy-community-guidelines`` in your work, please support it by citing the zenodo DOI of the version you used. You can find the latest version [here](https://doi.org/10.5281/zenodo.3470091)
[Read the latest documentation](https://<reponame>.readthedocs.io/en/latest/) for more information on <reponame>!

## Tested OSs
We woudl love to do that, but for teh moment we cannot support **Windows or MacOS testing**. The reason is related to the cost of running such tests: for each non-Linux test, we can run up to 8 tests on Linux instead. Partial Windows and MacOS testing might be introduced in future releases.

Hence, while **we cannot ensure that <reponame> will run on Windows or MacOS**, however we don't see any reason it shouldn't.
Besides, it will run on Windows Linux Subsistems.

We apologise for the discomfort.


<!-- ## Hacktoberfest
Hacktoberfest participants, welcome!
We have some issues for you [here](https://github.com/physiopy/<reponame>/issues?q=is%3Aissue+is%3Aopen+label%3Ahacktoberfest)!
However, feel free to tackle any issue you'd like. Depending on the issue and extent of contribution, Hacktoberfest related PRs might not count toward being listed as contributors and authors (unless there is the specific interest). You can ask about it in the issue itself!
Feel free to ask help to the contributors over gitter, happy coding and (hopefully) enjoy hour tee (or tree)!
## The BrainWeb
BrainWeb participants, welcome!
We have a milestone [here](https://github.com/physiopy/<reponame>/milestone/5) as a collection of issues you could work on with our help.
Check the issues with a `BrainWeb` label. Of course, they are only suggestions, so feel free to tackle any issue you want, even open new ones!
You can also contact us on Gitter, in the BrainHack Mattermost (<a href="https://mattermost.brainhack.org/brainhack/channels/physiopy">#physiopy</a>), and don't hesitate to contact [Stefano](https://github.com/smoia) in other ways to jump in the development!
-->

**We're looking for code contributors,** but any suggestion/bug report is welcome! Feel free to open issues!

Expand All @@ -106,18 +49,5 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
License
-------

This template is released under The Unlicense. Commented here below a copy of the Apache 2.0 Licence, adopted by Physiopy.
Remember to change the licence of your repository as soon as you adopt the template.
<!-- Copyright 2019-2020, The Physiopy community.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
Copyright 2019-2024, The Physiopy Community
This repository and all its content are licensed under the CC-BY-SA-4.0 license.
43 changes: 0 additions & 43 deletions codecov.yml

This file was deleted.

Loading

0 comments on commit b90b8a9

Please sign in to comment.