Skip to content

Commit

Permalink
Merge pull request #64 from handwerkerd/fixing-style-errors
Browse files Browse the repository at this point in the history
Updating style and python versions
  • Loading branch information
handwerkerd authored Feb 12, 2024
2 parents e91e16f + 043a9d2 commit 30c64b2
Show file tree
Hide file tree
Showing 10 changed files with 194 additions and 143 deletions.
73 changes: 72 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,74 @@ jobs:
paths:
- src/coverage/.coverage.py310

unittest_311:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/mapca
steps:
- checkout
- restore_cache:
key: conda-py311-v1-{{ checksum "pyproject.toml" }}
- run:
name: Generate environment
command: |
apt-get update
apt-get install -yqq make
if [ ! -d /opt/conda/envs/mapca_py311 ]; then
conda create -yq -n mapca_py311 python=3.11
source activate mapca_py311
pip install .[tests]
fi
- run:
name: Running unit tests
command: |
source activate mapca_py311
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.py311
- save_cache:
key: conda-py311-v1-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/mapca_py311
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py311

unittest_312:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/mapca
steps:
- checkout
- restore_cache:
key: conda-py312-v1-{{ checksum "pyproject.toml" }}
- run:
name: Generate environment
command: |
apt-get update
apt-get install -yqq make
if [ ! -d /opt/conda/envs/mapca_py312 ]; then
conda create -yq -n mapca_py312 python=3.12
source activate mapca_py312
pip install .[tests]
fi
- run:
name: Running unit tests
command: |
source activate mapca_py312
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.py312
- save_cache:
key: conda-py312-v1-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/mapca_py312
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py312

unittest_38:
docker:
- image: continuumio/miniconda3
Expand Down Expand Up @@ -202,12 +270,13 @@ jobs:
twine upload dist/*
workflows:
version: 2.1
build_test:
jobs:
- makeenv_38
- unittest_39
- unittest_310
- unittest_311
- unittest_312
- unittest_38:
requires:
- makeenv_38
Expand All @@ -222,6 +291,8 @@ workflows:
- unittest_38
- unittest_39
- unittest_310
- unittest_311
- unittest_312
- deploy:
requires:
- merge_coverage
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# version file autogenerated with pip install -e .'[all]'
_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
8 changes: 2 additions & 6 deletions mapca/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
"""
mapca: A Python implementation of the moving average principal components analysis methods from
GIFT.
"""
"""mapca: Python implementation of the moving average principal components analysis from GIFT."""

import warnings

from mapca.__about__ import __version__

from .mapca import MovingAveragePCA, ma_pca
from mapca.mapca import MovingAveragePCA, ma_pca

# cmp is not used, so ignore nipype-generated warnings
warnings.filterwarnings("ignore", r"cmp not installed")
Expand Down
Loading

0 comments on commit 30c64b2

Please sign in to comment.