Skip to content

Commit 44fecc3

Browse files
authored
Merge branch 'master' into clowder-internal-url
2 parents 8726253 + 4489c7a commit 44fecc3

File tree

17 files changed

+368
-103
lines changed

17 files changed

+368
-103
lines changed

.github/workflows/ci.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Python package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- name: Cache pip
21+
uses: actions/cache@v2
22+
with:
23+
# This path is specific to Ubuntu
24+
path: ~/.cache/pip
25+
# Look to see if there is a cache hit for the corresponding requirements file
26+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
27+
restore-keys: |
28+
${{ runner.os }}-pip-
29+
${{ runner.os }}-
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install flake8 pytest pipenv
35+
pip install -r requirements.txt
36+
37+
- name: Lint with flake8
38+
run: |
39+
# stop the build if there are Python syntax errors or undefined names
40+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
41+
# exit-zero treats all errors as warnings.
42+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
43+
44+
# - name: Test with pytest
45+
# run: |
46+
# pytest

.github/workflows/pypi.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish Python package
2+
3+
on:
4+
push:
5+
tags:
6+
7+
jobs:
8+
publish:
9+
name: Build and publish python packages
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python 3.7
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.7
18+
19+
- name: Install dependencies
20+
run: python -m pip install --upgrade pip setuptools wheel
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
- name: Cache pip
28+
uses: actions/cache@v2
29+
with:
30+
# This path is specific to Ubuntu
31+
path: ~/.cache/pip
32+
# Look to see if there is a cache hit for the corresponding requirements file
33+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
34+
restore-keys: |
35+
${{ runner.os }}-pip-
36+
${{ runner.os }}-
37+
38+
- name: Build dist file
39+
run: |
40+
python setup.py sdist bdist_wheel
41+
42+
- name: Publish distribution to PyPI
43+
if: startsWith(github.ref, 'refs/tags')
44+
uses: pypa/gh-action-pypi-publish@master
45+
with:
46+
password: ${{ secrets.pypi_password }}

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,33 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7-
## Unreleased
7+
## 2.3.1 - 2020-09-18
8+
9+
With this version we no longer gurantee support for versions of python below 3.
10+
11+
### Fixed
12+
- There was an issue where status messages could cause an exception. This would prevent most extractors from running correctly.
13+
14+
## 2.3.0 - 2020-09-15
15+
16+
**CRITICAL BUG IN THIS VERSION. PLEASE USE VERSION 2.3.1**
17+
18+
Removed develop branch, all pull requests will need to be against master from now
19+
forward. Please update version number in setup.py in each PR.
20+
21+
From this version no more docker images are build, please use pip install to
22+
install pyclowder.
823

924
### Added
1025
- Simple extractors now support datasets, can also create new datasets.
26+
- Ability to add tags from simple extractor to files and datasets.
27+
- Ability to add additional files (outputs) to dataset in simple extractor.
28+
- Use pipenv to manage dependencies.
29+
- Add job_id to each status message returned by pyclowder.
30+
- PyClowderExtractionAbort to indicate the message shoudl not be retried.
31+
32+
### Changed
33+
- Better handling of status messages
1134

1235
## 2.2.3 - 2019-10-14
1336

Pipfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[dev-packages]
7+
8+
[packages]
9+
pika = "*"
10+
requests = "*"
11+
requests-toolbelt = "*"
12+
pyyaml = "==5.1"
13+
14+
[requires]
15+
python_version = "3.7"

Pipfile.lock

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyclowder/collections.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import requests
99

1010
from pyclowder.client import ClowderClient
11-
from pyclowder.utils import StatusMessage
1211

1312

1413
def create_empty(connector, host, key, collectionname, description, parentid=None, spaceid=None):
@@ -121,8 +120,7 @@ def upload_preview(connector, host, key, collectionid, previewfile, previewmetad
121120
section this preview should be associated with.
122121
"""
123122

124-
connector.status_update(StatusMessage.processing, {"type": "collection", "id": collectionid},
125-
"Uploading collection preview.")
123+
connector.message_process({"type": "collection", "id": collectionid}, "Uploading collection preview.")
126124

127125
logger = logging.getLogger(__name__)
128126
headers = {'Content-Type': 'application/json'}

0 commit comments

Comments
 (0)