Skip to content

Commit

Permalink
Updated pyproject.toml and deleted files that are no longer necessa…
Browse files Browse the repository at this point in the history
…ry (#61)
  • Loading branch information
eurunuela authored Sep 22, 2023
1 parent 556d013 commit e96ff1c
Show file tree
Hide file tree
Showing 15 changed files with 234 additions and 2,711 deletions.
104 changes: 52 additions & 52 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,138 +6,138 @@ version: 2.1
orbs:
codecov: codecov/[email protected]
jobs:
makeenv_37:
makeenv_38:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/mapca
steps:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py38-v1-{{ checksum "pyproject.toml" }}
- run:
name: Generate environment
command: |
if [ ! -d /opt/conda/envs/mapca_py37 ]; then
conda create -yq -n mapca_py37 python=3.7
source activate mapca_py37
if [ ! -d /opt/conda/envs/mapca_py38 ]; then
conda create -yq -n mapca_py38 python=3.8
source activate mapca_py38
pip install .[tests]
fi
- save_cache:
key: conda-py37-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py38-v1-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/mapca_py37
- /opt/conda/envs/mapca_py38

unittest_35:
unittest_39:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/mapca
steps:
- checkout
- restore_cache:
key: conda-py35-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py39-v1-{{ checksum "pyproject.toml" }}
- run:
name: Generate environment
command: |
apt-get update
apt-get install -yqq make
if [ ! -d /opt/conda/envs/mapca_py35 ]; then
conda create -yq -n mapca_py35 python=3.5
source activate mapca_py35
if [ ! -d /opt/conda/envs/mapca_py39 ]; then
conda create -yq -n mapca_py39 python=3.9
source activate mapca_py39
pip install .[tests]
fi
- run:
name: Running unit tests
command: |
source activate mapca_py35
source activate mapca_py39
py.test --ignore mapca/tests/test_integration.py --cov-append --cov-report term-missing --cov=mapca mapca/
mkdir /tmp/src/coverage
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py35
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py39
- save_cache:
key: conda-py35-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py39-v1-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/mapca_py35
- /opt/conda/envs/mapca_py39
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py35
- src/coverage/.coverage.py39

unittest_36:
unittest_310:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/mapca
steps:
- checkout
- restore_cache:
key: conda-py36-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py310-v1-{{ checksum "pyproject.toml" }}
- run:
name: Generate environment
command: |
apt-get update
apt-get install -yqq make
if [ ! -d /opt/conda/envs/mapca_py36 ]; then
conda create -yq -n mapca_py36 python=3.6
source activate mapca_py36
if [ ! -d /opt/conda/envs/mapca_py310 ]; then
conda create -yq -n mapca_py310 python=3.10
source activate mapca_py310
pip install .[tests]
fi
- run:
name: Running unit tests
command: |
source activate mapca_py36
source activate mapca_py310
py.test --ignore mapca/tests/test_integration.py --cov-append --cov-report term-missing --cov=mapca mapca/
mkdir /tmp/src/coverage
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py36
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py310
- save_cache:
key: conda-py36-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py310-v1-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/mapca_py36
- /opt/conda/envs/mapca_py310
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py36
- src/coverage/.coverage.py310

unittest_37:
unittest_38:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/mapca
steps:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py38-v1-{{ checksum "pyproject.toml" }}
- run:
name: Running unit tests
command: |
apt-get update
apt-get install -y make
source activate mapca_py37 # depends on makeenv_37
source activate mapca_py38 # depends on makeenv_38
py.test --ignore mapca/tests/test_integration.py --cov-append --cov-report term-missing --cov=mapca mapca/
mkdir /tmp/src/coverage
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py37
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py38
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py37
- src/coverage/.coverage.py38

integrationtest_37:
integrationtest_38:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/mapca
steps:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py38-v1-{{ checksum "pyproject.toml" }}
- run:
name: Running unit tests
command: |
apt-get update
apt-get install -y make
source activate mapca_py37 # depends on makeenv_37
source activate mapca_py38 # depends on makeenv_38
py.test --log-cli-level=INFO --cov-append --cov-report term-missing --cov=mapca -k test_integration mapca/tests/test_integration.py
mkdir /tmp/src/coverage
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py37
mv /tmp/src/mapca/.coverage /tmp/src/coverage/.coverage.py38
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py37
- src/coverage/.coverage.py38

style_check:
docker:
Expand All @@ -146,13 +146,13 @@ jobs:
steps:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py38-v1-{{ checksum "pyproject.toml" }}
- run:
name: Style check
command: |
apt-get update
apt-get install -yqq make
source activate mapca_py37 # depends on makeenv37
source activate mapca_py38 # depends on makeenv38
flake8 mapca
merge_coverage:
Expand All @@ -164,13 +164,13 @@ jobs:
at: /tmp
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "mapca/info.py" }}-{{ checksum "setup.py" }}
key: conda-py38-v1-{{ checksum "pyproject.toml" }}
- run:
name: Merge coverage files
command: |
apt-get update
apt-get install -yqq curl
source activate mapca_py37 # depends on makeenv37
source activate mapca_py38 # depends on makeenv38
cd /tmp/src/coverage/
coverage combine
coverage xml
Expand Down Expand Up @@ -205,23 +205,23 @@ workflows:
version: 2.1
build_test:
jobs:
- makeenv_37
- unittest_35
- unittest_36
- unittest_37:
- makeenv_38
- unittest_39
- unittest_310
- unittest_38:
requires:
- makeenv_37
- integrationtest_37:
- makeenv_38
- integrationtest_38:
requires:
- makeenv_37
- makeenv_38
- style_check:
requires:
- makeenv_37
- makeenv_38
- merge_coverage:
requires:
- unittest_35
- unittest_36
- unittest_37
- unittest_38
- unittest_39
- unittest_310
- deploy:
requires:
- merge_coverage
Expand Down
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
files: ^mapca/
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
files: ^mapca/
18 changes: 18 additions & 0 deletions mapca/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Base module variables."""

try:
from mapca._version import __version__
except ImportError:
__version__ = "0+unknown"

__packagename__ = "mapca"
__copyright__ = "Copyright 2023, The ME-ICA Developers"
__credits__ = (
"Contributors: please check the ``.zenodo.json`` file at the top-level folder"
"of the repository"
)
__url__ = "https://github.com/ME-ICA/mapca"

DOWNLOAD_URL = f"https://github.com/ME-ICA/{__packagename__}/archive/{__version__}.tar.gz"
9 changes: 3 additions & 6 deletions mapca/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
GIFT.
"""

from ._version import get_versions
from .mapca import MovingAveragePCA, ma_pca
import warnings

__version__ = get_versions()["version"]
from mapca.__about__ import __version__

import warnings
from .mapca import MovingAveragePCA, ma_pca

# cmp is not used, so ignore nipype-generated warnings
warnings.filterwarnings("ignore", r"cmp not installed")
Expand All @@ -18,5 +17,3 @@
"MovingAveragePCA",
"__version__",
]

del get_versions
Loading

0 comments on commit e96ff1c

Please sign in to comment.