Skip to content

Commit

Permalink
Initial commit with changes to template
Browse files Browse the repository at this point in the history
  • Loading branch information
eurunuela committed Jul 19, 2022
1 parent 83e1210 commit cb1a092
Show file tree
Hide file tree
Showing 22 changed files with 182 additions and 208 deletions.
2 changes: 1 addition & 1 deletion .circleci/artifact_path
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0/tmp/src/template-package/docs/_build/html/index.html
0/tmp/src/tedana_regressors/docs/_build/html/index.html
81 changes: 40 additions & 41 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ version: 2.1
orbs:
codecov: codecov/[email protected]
jobs:

py36_unittest:
working_directory: /tmp/src/template-package
working_directory: /tmp/src/tedana_regressors
docker:
- image: continuumio/miniconda3
steps:
- checkout
- persist_to_workspace:
root: /tmp
paths:
- src/template-package
- run: # will overwrite template-package installation each time
- src/tedana_regressors
- run: # will overwrite tedana_regressors installation each time
name: Generate environment
command: |
command: |
if [[ -e /opt/conda/envs/py36_env ]]; then
echo "Restoring environment from cache"
source activate py36_env
Expand All @@ -31,25 +30,25 @@ jobs:
python setup.py install --user
- run:
name: Run tests
command: |
command: |
apt-get update
apt-get install -yqq make
source activate py36_env
make unittest
py37_unittest:
working_directory: /tmp/src/template-package
working_directory: /tmp/src/tedana_regressors
docker:
- image: continuumio/miniconda3
steps:
- checkout
- persist_to_workspace:
root: /tmp
paths:
- src/template-package
- run: # will overwrite template-package installation each time
- src/tedana_regressors
- run: # will overwrite tedana_regressors installation each time
name: Generate environment
command: |
command: |
if [[ -e /opt/conda/envs/py37_env ]]; then
echo "Restoring environment from cache"
source activate py37_env
Expand All @@ -61,25 +60,25 @@ jobs:
python setup.py install --user
- run:
name: Run tests
command: |
command: |
apt-get update
apt-get install -yqq make
source activate py37_env
make unittest
py38_unittest:
working_directory: /tmp/src/template-package
working_directory: /tmp/src/tedana_regressors
docker:
- image: continuumio/miniconda3
steps:
- checkout
- persist_to_workspace:
root: /tmp
paths:
- src/template-package
- run: # will overwrite template-package installation each time
- src/tedana_regressors
- run: # will overwrite tedana_regressors installation each time
name: Generate environment
command: |
command: |
if [[ -e /opt/conda/envs/py38_env ]]; then
echo "Restoring environment from cache"
source activate py38_env
Expand All @@ -92,27 +91,27 @@ jobs:
python setup.py install --user
- run:
name: Run tests
command: |
command: |
apt-get update
apt-get install -yqq make
source activate py38_env
make unittest
py39_env:
working_directory: /tmp/src/template-package
working_directory: /tmp/src/tedana_regressors
docker:
- image: continuumio/miniconda3
steps:
- checkout
- persist_to_workspace:
root: /tmp
paths:
- src/template-package
- restore_cache: # ensure this step occurs *before* installing dependencies
key: deps1-{{ checksum "template-package/setup.cfg" }}-{{ checksum "setup.py" }}
- run: # will overwrite template-package installation each time
- src/tedana_regressors
- restore_cache: # ensure this step occurs *before* installing dependencies
key: deps1-{{ checksum "tedana_regressors/setup.cfg" }}-{{ checksum "setup.py" }}
- run: # will overwrite tedana_regressors installation each time
name: Generate environment
command: |
command: |
if [[ -e /opt/conda/envs/py39_env ]]; then
echo "Restoring environment from cache"
source activate py39_env
Expand All @@ -122,40 +121,40 @@ jobs:
pip install -e .[tests,doc]
fi
python setup.py install --user
- save_cache: # environment cache tied to requirements
key: deps1-{{ checksum "template-package/setup.cfg" }}-{{ checksum "setup.py" }}
- save_cache: # environment cache tied to requirements
key: deps1-{{ checksum "tedana_regressors/setup.cfg" }}-{{ checksum "setup.py" }}
paths:
- "/opt/conda/envs/py39_env"

py39_unittest_and_coverage:
working_directory: /tmp/src/template-package
working_directory: /tmp/src/tedana_regressors
docker:
- image: continuumio/miniconda3
steps:
- attach_workspace: # get template-package
- attach_workspace: # get tedana_regressors
at: /tmp
- restore_cache: # load environment
key: deps1-{{ checksum "template-package/setup.cfg" }}-{{ checksum "setup.py" }}
- restore_cache: # load environment
key: deps1-{{ checksum "tedana_regressors/setup.cfg" }}-{{ checksum "setup.py" }}
- run:
name: Run tests and compile coverage
command: |
command: |
apt-get update
apt-get install -yqq make
apt-get install -yqq curl
source activate py39_env
make unittest
- codecov/upload:
file: /tmp/src/template-package/coverage.xml
file: /tmp/src/tedana_regressors/coverage.xml

build_docs:
working_directory: /tmp/src/template-package
working_directory: /tmp/src/tedana_regressors
docker:
- image: continuumio/miniconda3
steps:
- attach_workspace: # get template-package
- attach_workspace: # get tedana_regressors
at: /tmp
- restore_cache: # load environment
key: deps1-{{ checksum "template-package/setup.cfg" }}-{{ checksum "setup.py" }}
- restore_cache: # load environment
key: deps1-{{ checksum "tedana_regressors/setup.cfg" }}-{{ checksum "setup.py" }}
- run:
name: Build documentation
command: |
Expand All @@ -165,22 +164,22 @@ jobs:
make -C docs html
no_output_timeout: 30m
- store_artifacts:
path: /tmp/src/template-package/docs/_build/html
path: /tmp/src/tedana_regressors/docs/_build/html

style_check:
working_directory: /tmp/src/template-package
working_directory: /tmp/src/tedana_regressors
docker:
- image: continuumio/miniconda3
steps:
- attach_workspace: # get template-package
- attach_workspace: # get tedana_regressors
at: /tmp
- restore_cache: # load environment
key: deps1-{{ checksum "template-package/setup.cfg" }}-{{ checksum "setup.py" }}
- restore_cache: # load environment
key: deps1-{{ checksum "tedana_regressors/setup.cfg" }}-{{ checksum "setup.py" }}
- run:
name: Linting
command: |
command: |
source activate py39_env
flake8 /tmp/src/template-package/template-package
flake8 /tmp/src/tedana_regressors/tedana_regressors
- store_artifacts:
path: /tmp/data/lint

Expand Down
7 changes: 3 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ coverage:
threshold: 0

ignore:
- 'template-package/tests/'
- 'template-package/due.py'
- 'template-package/_version.py'
- 'template-package/info.py'
- "tedana_regressors/tests/"
- "tedana_regressors/_version.py"
- "tedana_regressors/info.py"
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
template-package/_version.py export-subst
tedana_regressors/_version.py export-subst
6 changes: 3 additions & 3 deletions .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
newPRWelcomeComment: >
Thanks for opening this pull request!
We have detected this is the first time you have contributed
to *template-package*.
to *tedana_regressors*.
We invite you to list yourself as a *template-package* contributor, so if your name
We invite you to list yourself as a *tedana_regressors* contributor, so if your name
is not already mentioned, please modify the
[``.zenodo.json``](https://github.com/ME-ICA/template-package/blob/main/.zenodo.json).
[``.zenodo.json``](https://github.com/ME-ICA/tedana_regressors/blob/main/.zenodo.json).
Of course, if you want to opt out this time there is no
problem at all with adding your name later.
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!---
This is a suggested pull request template for template-package.
This is a suggested pull request template for tedana_regressors.
It's designed to capture information we've found to be useful in reviewing pull requests.
If there is other information that would be helpful to include, please don't hesitate to add it!
Expand Down
7 changes: 0 additions & 7 deletions .github/release-drafter.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/release-drafter.yml

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include versioneer.py
include template-package/_version.py
include tedana_regressors/_version.py
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ all_tests: lint unittest integrationtest
help:
@echo "Please use 'make <target>' where <target> is one of:"
@echo " lint to run flake8 on all Python files"
@echo " unittest to run unit tests on template-package"
@echo " unittest to run unit tests on tedana_regressors"
@echo " integrationtest to run integration tests"

lint:
@flake8 template-package
@flake8 tedana_regressors

unittest:
@py.test -m "not integration" --cov-append --cov-report xml --cov-report term-missing --cov=template-package template-package
@py.test -m "not integration" --cov-append --cov-report xml --cov-report term-missing --cov=tedana_regressors tedana_regressors

performancetest:
@py.test -m "integration" --cov-append --cov-report xml --cov-report term-missing --cov=template-package template-package
@py.test -m "integration" --cov-append --cov-report xml --cov-report term-missing --cov=tedana_regressors tedana_regressors
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# template-package
# tedana_regressors

A template repo to use for new repositories.

[![Latest Version](https://img.shields.io/pypi/v/template-package.svg)](https://pypi.python.org/pypi/template-package/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/template-package.svg)](https://pypi.python.org/pypi/template-package/)
[![Latest Version](https://img.shields.io/pypi/v/tedana_regressors.svg)](https://pypi.python.org/pypi/tedana_regressors/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tedana_regressors.svg)](https://pypi.python.org/pypi/tedana_regressors/)
[![DOI](https://zenodo.org/badge/111111.svg)](https://zenodo.org/badge/latestdoi/111111)
[![License](https://img.shields.io/badge/License-LGPL%202.1-blue.svg)](https://opensource.org/licenses/LGPL-2.1)
[![CircleCI](https://circleci.com/gh/ME-ICA/template-package.svg?style=shield)](https://circleci.com/gh/ME-ICA/template-package)
[![Documentation Status](https://readthedocs.org/projects/template-package/badge/?version=latest)](http://template-package.readthedocs.io/en/latest/?badge=latest)
[![Codecov](https://codecov.io/gh/me-ica/template-package/branch/main/graph/badge.svg)](https://codecov.io/gh/me-ica/template-package)
[![CircleCI](https://circleci.com/gh/ME-ICA/tedana_regressors.svg?style=shield)](https://circleci.com/gh/ME-ICA/tedana_regressors)
[![Documentation Status](https://readthedocs.org/projects/tedana_regressors/badge/?version=latest)](http://tedana_regressors.readthedocs.io/en/latest/?badge=latest)
[![Codecov](https://codecov.io/gh/me-ica/tedana_regressors/branch/main/graph/badge.svg)](https://codecov.io/gh/me-ica/tedana_regressors)

## Instructions

1. Replace `template-package` with the new repo name across the whole repository.
1. Replace `tedana_regressors` with the new repo name across the whole repository.
1. Enable the GitHub repository on Zenodo.
1. Set up the GitHub repository on CircleCI.
1. Set up the GitHub repository on ReadTheDocs.
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = template-package
SPHINXPROJ = tedana_regressors
SOURCEDIR = .
BUILDDIR = _build

Expand Down
12 changes: 6 additions & 6 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _api_ref:

.. currentmodule:: template-package
.. currentmodule:: tedana_regressors

###
API
Expand All @@ -10,21 +10,21 @@ API
.. _api_module_ref:

**************************************************
:mod:`template-package.module`: Module description
:mod:`tedana_regressors.module`: Module description
**************************************************

.. automodule:: template-package.module
.. automodule:: tedana_regressors.module
:no-members:
:no-inherited-members:

.. currentmodule:: template-package.module
.. currentmodule:: tedana_regressors.module

.. autosummary::
:toctree: generated/
:template: class.rst

template-package.module.Class
tedana_regressors.module.Class

:template: function.rst

template-package.module.function
tedana_regressors.module.function
Loading

0 comments on commit cb1a092

Please sign in to comment.