Skip to content

Commit

Permalink
Merge pull request #13 from clowder-framework/develop
Browse files Browse the repository at this point in the history
release 2.3.0
  • Loading branch information
robkooper authored Sep 16, 2020
2 parents 5c4e91d + 39a6e61 commit cac8426
Show file tree
Hide file tree
Showing 18 changed files with 474 additions and 116 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Python package

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pipenv
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
# - name: Test with pytest
# run: |
# pytest
46 changes: 46 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Python package

on:
push:
tags:

jobs:
publish:
name: Build and publish python packages
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Build dist file
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.3.0 - 2020-09-15

Removed develop branch, all pull requests will need to be against master from now
forward. Please update version number in setup.py in each PR.

From this version no more docker images are build, please use pip install to
install pyclowder.

### Added
- Simple extractors now support datasets, can also create new datasets.
- Ability to add tags from simple extractor to files and datasets.
- Ability to add additional files (outputs) to dataset in simple extractor.
- Use pipenv to manage dependencies.
- Add job_id to each status message returned by pyclowder.
- PyClowderExtractionAbort to indicate the message shoudl not be retried.

### Changed
- Better handling of status messages

## 2.2.3 - 2019-10-14

### Fixed
Expand Down
15 changes: 15 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
pika = "*"
requests = "*"
requests-toolbelt = "*"
pyyaml = "==5.1"

[requires]
python_version = "3.7"
92 changes: 92 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions pyclowder/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import requests

from pyclowder.client import ClowderClient
from pyclowder.utils import StatusMessage


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

connector.status_update(StatusMessage.processing, {"type": "collection", "id": collectionid},
"Uploading collection preview.")
connector.message_process({"type": "collection", "id": collectionid}, "Uploading collection preview.")

logger = logging.getLogger(__name__)
headers = {'Content-Type': 'application/json'}
Expand Down
Loading

0 comments on commit cac8426

Please sign in to comment.