Skip to content

Commit 7957098

Browse files
authored
🔖 Release v0.5.0 (#33)
2 parents 9be16ca + 9d4191f commit 7957098

27 files changed

+1241
-549
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Upload Python Package
55

66
on:
77
release:
8-
types: [created, edited, published, released]
8+
types: [published]
99

1010
jobs:
1111
deploy:

.github/workflows/test_cpac.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
platform: [docker, singularity]
23-
tag: [latest, dev-v1.8]
22+
platform: [docker]
23+
tag: [latest, nightly]
2424
go: [1.14]
25-
python: [3.6, 3.7, 3.8]
25+
python: [3.7, 3.8, 3.9, "3.10"]
2626
singularity: [3.6.4]
2727

2828
steps:
@@ -39,45 +39,44 @@ jobs:
3939
run: python -m pip install --upgrade pip setuptools wheel
4040
- name: Set up Singularity
4141
if: ${{ matrix.platform == 'singularity' }}
42-
uses: eWaterCycle/setup-singularity@v5
42+
uses: eWaterCycle/setup-singularity@v7
4343
with:
4444
singularity-version: ${{ matrix.singularity }}
4545
- name: Prepare Singularity cache and tmp directories
4646
if: ${{ matrix.platform == 'singularity' }}
4747
run: mkdir -p ${SINGULARITY_CACHEDIR} && mkdir -p ${SINGULARITY_TMPDIR}
4848
- name: Install dependencies
4949
run: |
50-
sudo apt-get install libarchive-dev \
51-
libffi-dev \
52-
flawfinder \
53-
libgpgme11-dev \
54-
libseccomp-dev \
55-
squashfs-tools \
56-
libssl1.1 libssl-dev \
57-
libuuid1 uuid-dev
50+
sudo apt-get install libffi-dev \
51+
flawfinder \
52+
libgpgme11-dev \
53+
libseccomp-dev \
54+
squashfs-tools \
55+
libssl1.1 libssl-dev \
56+
libuuid1 uuid-dev
5857
pip install -r requirements.txt
5958
pip install -r requirements-dev.txt
6059
pip install coverage coveralls nipype
6160
- name: Install cpac
6261
run: cd $GITHUB_WORKSPACE && pip install -e .
6362
- name: Test cpac, platform and tag specified
6463
run: |
65-
coverage run --append -m pytest --doctest-modules --platform ${{ matrix.platform }} --tag ${{ matrix.tag }} .
64+
coverage run --append -m pytest --basetemp=${PWD}/tmp --doctest-modules --platform ${{ matrix.platform }} --tag ${{ matrix.tag }} .
6665
coverage report -m
6766
- name: Test cpac, platform specified, tag unspecified
6867
if: ${{ matrix.tag == 'latest' }}
6968
run: |
70-
coverage run --append -m pytest --doctest-modules --platform ${{ matrix.platform }} .
69+
coverage run --append -m pytest --basetemp=${PWD}/tmp --doctest-modules --platform ${{ matrix.platform }} .
7170
coverage report -m
7271
- name: Test cpac, platform unspecified, tag specified
7372
if: ${{ matrix.platform == 'docker' }}
7473
run: |
75-
coverage run --append -m pytest --doctest-modules --tag ${{ matrix.tag }} .
74+
coverage run --append -m pytest --basetemp=${PWD}/tmp --doctest-modules --tag ${{ matrix.tag }} .
7675
coverage report -m
7776
- name: Test cpac, platform and tag unspecified
7877
if: ${{ matrix.platform == 'docker' }} && ${{ matrix.tag }} == 'latest'
7978
run: |
80-
coverage run --append -m pytest --doctest-modules .
79+
coverage run --append -m pytest --basetemp=${PWD}/tmp --doctest-modules .
8180
coverage report -m
8281
- name: Report coverage
8382
uses: AndreMiras/coveralls-python-action@v20201129
@@ -102,6 +101,8 @@ jobs:
102101
runs-on: ubuntu-latest
103102
steps:
104103
- uses: actions/checkout@v2
104+
with:
105+
fetch-depth: 0
105106
- name: Install cpac
106107
run: cd $GITHUB_WORKSPACE && pip install .
107108
- name: Configure Git credentials

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ __pycache__/*
1212
.cache/*
1313
.*.swp
1414
*/.ipynb_checkpoints/*
15+
tmp
1516

1617
# Project files
1718
.ropeproject
@@ -49,4 +50,5 @@ MANIFEST
4950
.venv*/
5051

5152
# Singularity Images
52-
**/*.simg
53+
**/*.simg
54+
**/*.sif

CHANGELOG.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
=========
22
Changelog
33
=========
4+
`Version 0.5.0: Parse Resources <https://github.com/FCP-INDI/cpac/releases/tag/v0.5.0>`_
5+
================================================================================================
6+
* 🧮 Evaluates memory usage for specific nodes from ``callback.log`` files
7+
* ✨ Adds ``enter`` command to enter a container's ``BASH``
8+
* ✨ Adds ``version`` command to give version of in-container C-PAC
9+
* ✨ Adds ``parse-resources`` command to parse resources from ``callback.log``
10+
* 🐛 Fixes issue where ``--version`` command was not working
11+
* 🐛 Fixes issue where custom pipeline configurations were not binding to temporary container prior to checking for bind paths
12+
* ✅ Updates for tests that were failing
13+
* 📝 Add known issues to usage string
14+
* ⬆ Require Python ≥ 3.7 (for typing annotations)
15+
* 📝 Documents support for Singularity 3
16+
417
`Version 0.4.0: Goodbye Singularity Hub <https://github.com/FCP-INDI/cpac/releases/tag/v0.4.0>`_
518
================================================================================================
619
* 👽 Drop call to now-deprecated Singularity Hub

README.rst

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ C-PAC Python Package is a lightweight Python package that handles interfacing a
1414
Dependencies
1515
============
1616

17-
* `Python <https://www.python.org>`_ ≥3.6
17+
* `Python <https://www.python.org>`_ ≥3.7
1818
* `pip <https://pip.pypa.io>`_
1919
* At least one of:
2020

2121
* `Docker <https://www.docker.com>`_
22-
* `Singularity <https://sylabs.io/singularity>`_ ≥2.5&≤3.0
22+
* `Singularity <https://sylabs.io/singularity>`_ ≥2.5
2323

2424
Usage
2525
=====
@@ -32,7 +32,8 @@ Usage
3232
usage: cpac [-h] [--version] [-o OPT] [-B CUSTOM_BINDING]
3333
[--platform {docker,singularity}] [--image IMAGE] [--tag TAG]
3434
[--working_dir PATH] [-v] [-vv]
35-
{run,group,utils,pull,upgrade,crash} ...
35+
{run,utils,version,group,pull,upgrade,enter,bash,shell,parse-resources,parse_resources,crash}
36+
...
3637
3738
cpac: a Python package that simplifies using C-PAC <http://fcp-indi.github.io> containerized images.
3839
@@ -57,8 +58,40 @@ Usage
5758
5859
cpac run --help
5960
61+
Known issues:
62+
- Some Docker containers unexpectedly persist after cpac finishes. To clear them, run
63+
1. `docker ps` to list the containers
64+
For each C-PAC conatainer that persists, run
65+
2. `docker attach <container_name>`
66+
3. `exit`
67+
- https://github.com/FCP-INDI/cpac/issues
68+
6069
positional arguments:
61-
{run,group,utils,pull,upgrade,crash}
70+
{run,utils,version,group,pull,upgrade,enter,bash,shell,parse-resources,parse_resources,crash}
71+
run Run C-PAC. See
72+
"cpac [--platform {docker,singularity}] [--image IMAGE] [--tag TAG] run --help"
73+
for more information.
74+
utils Run C-PAC commandline utilities. See
75+
"cpac [--platform {docker,singularity}] [--image IMAGE] [--tag TAG] utils --help"
76+
for more information.
77+
version Print the version of C-PAC that cpac is using.
78+
group Run a group level analysis in C-PAC. See
79+
"cpac [--platform {docker,singularity}] [--image IMAGE] [--tag TAG] group --help"
80+
for more information.
81+
pull (upgrade) Upgrade your local C-PAC version to the latest version
82+
by pulling from Docker Hub or other repository.
83+
Use with "--image" and/or "--tag" to specify an image
84+
other than the default "fcpindi/c-pac:latest" to pull.
85+
enter (bash, shell)
86+
Enter a new C-PAC container via BASH.
87+
parse-resources (parse_resources)
88+
When provided with a `callback.log` file, this utility can sort through
89+
the memory `runtime` usage, `estimate`, and associated `efficiency`, to
90+
identify the `n` tasks with the `highest` or `lowest` of each of these
91+
categories.
92+
"parse-resources" is intended to be run outside a C-PAC container.
93+
See "cpac parse-resources --help" for more information.
94+
crash Convert a crash pickle to plain text (C-PAC < 1.8.0).
6295
6396
optional arguments:
6497
-h, --help show this help message and exit

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
docker >= 4.2.1
2+
dockerpty
23
docker-pycreds
34
pandas >= 0.23.4
45
pyyaml
56
setuptools
67
spython >= 0.0.81
78
tabulate >= 0.8.6
89
tornado
9-
websocket-client
10+
websocket-client
11+
rich

setup.cfg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers =
2323
Operating System :: OS Independent
2424
Programming Language :: Python :: 3
2525
Topic :: Scientific/Engineering :: Bio-Informatics
26-
version = 0.4.0
26+
version = 0.5.0
2727

2828
[options]
2929
zip_safe = False
@@ -37,14 +37,16 @@ setup_requires =
3737
pyyaml
3838
install_requires =
3939
docker
40+
dockerpty
4041
docker-pycreds
4142
pandas >= 0.23.4
4243
spython >= 0.0.81
4344
pyyaml
45+
rich
4446
tabulate >= 0.8.6
4547
tornado
4648
websocket-client
47-
python_requires = >=3.6
49+
python_requires = >=3.7
4850

4951
[options.packages.find]
5052
where = src

0 commit comments

Comments
 (0)