Skip to content

Commit f4b18b0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f1369d6 commit f4b18b0

File tree

15 files changed

+31
-19
lines changed

15 files changed

+31
-19
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ MANIFEST
5151

5252
# Singularity Images
5353
**/*.simg
54-
**/*.sif
54+
**/*.sif

README.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,38 +42,38 @@ Usage
4242
[--tag TAG] [--working_dir PATH] [-v] [-vv]
4343
{run,utils,version,group,gradients,tsconcat,pull,upgrade,enter,bash,shell,parse-resources,parse_resources,crash}
4444
...
45-
46-
cpac: a Python package that simplifies using C-PAC <http://fcp-indi.github.io> containerized images.
47-
45+
46+
cpac: a Python package that simplifies using C-PAC <http://fcp-indi.github.io> containerized images.
47+
4848
This commandline interface package is designed to minimize repetition.
4949
As such, nearly all arguments are optional.
50-
51-
When launching a container, this package will try to bind any paths mentioned in
50+
51+
When launching a container, this package will try to bind any paths mentioned in
5252
• the command
5353
• the data configuration
54-
54+
5555
An example minimal run command:
5656
cpac run /path/to/data /path/for/outputs
57-
57+
5858
An example run command with optional arguments:
5959
cpac -B /path/to/data/configs:/configs \
6060
--image fcpindi/c-pac --tag latest \
6161
run /path/to/data /path/for/outputs \
6262
--data_config_file /configs/data_config.yml \
6363
--save_working_dir
64-
64+
6565
Each command can take "--help" to provide additonal usage information, e.g.,
66-
66+
6767
cpac run --help
68-
68+
6969
Known issues:
7070
- Some Docker containers unexpectedly persist after cpac finishes. To clear them, run
7171
1. `docker ps` to list the containers
7272
For each C-PAC conatainer that persists, run
7373
2. `docker attach <container_name>`
7474
3. `exit`
7575
- https://github.com/FCP-INDI/cpac/issues
76-
76+
7777
positional arguments:
7878
{run,utils,version,group,gradients,tsconcat,pull,upgrade,enter,bash,shell,parse-resources,parse_resources,crash}
7979
run Run C-PAC. See
@@ -87,7 +87,7 @@ Usage
8787
"cpac [--platform {docker,apptainer,singularity}] [--image IMAGE] [--tag TAG] group --help"
8888
for more information.
8989
gradients Run ba_timeseries_gradients. See
90-
"cpac [--platform "{docker,singularity}] gradients --help"
90+
"cpac [--platform "{docker,singularity}] gradients --help"
9191
for more information.
9292
tsconcat Run ba-tsconcat (<0.2.0,>=0.1.2)
9393
pull (upgrade) Upgrade your local C-PAC version to the latest version
@@ -98,21 +98,21 @@ Usage
9898
Enter a new C-PAC container via BASH.
9999
parse-resources (parse_resources)
100100
.
101-
101+
102102
When provided with a `callback.log` file, this utility can sort through
103103
the memory `runtime` usage, `estimate`, and associated `efficiency`, to
104104
identify the `n` tasks with the `highest` or `lowest` of each of these
105105
categories.
106106
"parse-resources" is intended to be run outside a C-PAC container.
107107
See "cpac parse-resources --help" for more information.
108108
crash Convert a crash pickle to plain text (C-PAC < 1.8.0).
109-
109+
110110
options:
111111
-h, --help show this help message and exit
112112
--version show program's version number and exit
113113
-o OPT, --container_option OPT, --container_options OPT
114114
parameters and flags to pass through to Docker or Singularity
115-
115+
116116
This flag can take multiple arguments so cannot be
117117
the final argument before the command argument (i.e.,
118118
run or any other command that does not start with - or --)
@@ -123,7 +123,7 @@ Usage
123123
real_path:container_path
124124
(eg, /home/C-PAC/run5/outputs:/outputs).
125125
Use absolute paths for both paths.
126-
126+
127127
This flag can take multiple arguments so cannot be
128128
the final argument before the command argument (i.e.,
129129
run or any other command that does not start with - or --)
@@ -134,7 +134,7 @@ Usage
134134
--image IMAGE path to Apptainer/Singularity image file OR name of Docker image (eg, "fcpindi/c-pac").
135135
Will attempt to pull from Singularity Hub or Docker Hub if not provided.
136136
If image is specified but platform is not, platform is
137-
assumed to be Apptainer/Singularity if image is a path or
137+
assumed to be Apptainer/Singularity if image is a path or
138138
Docker if image is an image name.
139139
--tag TAG tag of the Docker image to use (eg, "latest" or "nightly").
140140
--working_dir PATH working directory

src/cpac/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""Init file for cpac."""
3+
34
from importlib.metadata import distribution, PackageNotFoundError
45

56
DIST_NAME = __name__
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Backend for Apptainer images."""
2+
23
from .apptainer import Apptainer
34

45
__all__ = ["Apptainer"]

src/cpac/backends/apptainer/apptainer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Backend for Apptainer images."""
2+
23
from spython import main as spython_main
34
from spython.main.base import command
45

src/cpac/backends/apptainer/spython.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
33
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
"""Modifications to ``spython`` run Apptainer instead of Singularity."""
5+
56
from spython.main import get_client as get_spython_client
67

78

src/cpac/helpers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Hepler functions for cpac Python package."""
2+
23
from itertools import chain
34
import re
45

src/cpac/helpers/cpac_parse_resources.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
categories.
88
`cpac_parse_resources` is intended to be run outside a C-PAC container.
99
"""
10+
1011
from argparse import ArgumentParser
1112
import configparser
1213
import json

src/cpac/utils/checks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Functions to check things like the in-container C-PAC version."""
2+
23
from packaging.version import Version
34
from semver import VersionInfo
45

tests/.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[MAIN]
2-
ignore-imports=y
2+
ignore-imports=y

0 commit comments

Comments
 (0)