Skip to content

Commit

Permalink
Merge pull request #74 from globus/release/0.13.0b1
Browse files Browse the repository at this point in the history
Release/0.13.0b1
  • Loading branch information
kurtmckee authored Dec 15, 2022
2 parents 255e841 + 8a80286 commit eed727a
Show file tree
Hide file tree
Showing 64 changed files with 850 additions and 2,127 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The automate team will be requested for review on all opened PRs.
* @ada-globus @joshbryan-globus @kurtmckee @sirosen @jakeglobus @derek-globus
77 changes: 57 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,65 @@ on:
push:

jobs:
ci:
name: Run full action-provider-tools pipeline
runs-on: ubuntu-latest
lint:
name: Lint
runs-on: [ubuntu-latest]
steps:
- name: Checkout source code
uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
fetch-depth: 1
python-version: "3.11"
- name: Install tox
run: python -m pip install -U tox
- name: Run black
run: tox -e black
- name: Run isort
run: tox -e isort
- name: Run mypy
run: tox -e mypy

- name: Set target python version
uses: actions/setup-python@v2
test:
strategy:
matrix:
# Broadly test supported Python versions on Linux.
os:
- name: Linux
value: ubuntu-latest
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# Narrowly test specific combinations of Windows and Mac.
include:
- os:
name: Windows
value: windows-latest
python-version: "3.10"
- os:
name: Mac
value: macos-latest
python-version: "3.10"
name: "Test Python ${{ matrix.python-version }} on ${{ matrix.os.name }}"
runs-on: ${{ matrix.os.value }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.6.x"

- name: Install poetry
run: python -m pip install poetry

- name: Install the project and dependencies
run: make install
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install -U tox
- name: Test
run: python -m tox -e py

- name: Run linters
run: make lint

- name: Run tests
run: make test
test-minimum-flask:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.11"]
name: "Minimum Flask: Test Python ${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install -U tox
- name: Test
run: tox -e py-minimum_flask
10 changes: 8 additions & 2 deletions .github/workflows/has_changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: Enforce Changelog Fragment
on:
- pull_request
pull_request:
types:
- labeled
- unlabeled
- opened
- reopened
- synchronize

jobs:
call-scriv-workflow:
uses: globus/globus-automate-client/.github/workflows/has_changelog.yaml@main
uses: globus/globus-sdk-python/.github/workflows/has_changelog.yaml@main
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ wheels/
.installed.cfg
*.egg
MANIFEST
docs/html/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -105,6 +106,11 @@ venv.bak/

# whattimeisitrightnow example provider's database file
whattimeisitrightnow.example.db
whattimeisitrightnow.example.db.*

# Emacs config
# Editor config
.dir-locals.el
.idea/

# Poetry
poetry.lock
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Update the hook revs in this file by running `pre-commit autoupdate`.

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black

# Allow tox to run black strictly as a linter.
- id: black
alias: black-check
stages: [manual]
args: [--check]

- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort

# Allow tox to run isort strictly as a linter.
- id: isort
alias: isort-check
stages: [manual]
args: [--check]
57 changes: 50 additions & 7 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,49 @@ Unreleased changes are documented in files in the `changelog.d`_ directory.

.. scriv-insert-here
.. _changelog-0.13.0b1:

0.13.0b1 — 2022-12-14
=====================

Python support
--------------

- Add support for Python 3.11.
- Drop support for Python 3.6.

Bugfixes
--------

- Fix a crash that will occur if a non-object JSON document is submitted.
For example, this will happen if the incoming JSON document is ``"string"``
or ``["array"]``.

- Fix a crash that occurs when an HTTP 400 "invalid grant" error is received
from Globus Auth while getting an authorizer for a given scope.

This is now caught by ``AuthState.get_authorizer_for_scope()`` and ``None`` is returned.

Changes
-------

- Remove the ``__version__`` attribute.

The ``importlib.metadata`` module in Python 3.8 and higher
(or the backported ``importlib_metadata`` package)
can be used to query the version of installed packages if needed.

- ``jsonschema>=4.17,<5`` is now required by action-provider-tools.

Consumers of the library will have to update to a more recent version of ``jsonschema``
if they are using it explicitly.

0.12.0 - 2022-03-02
===================

*No changes from 0.12.0b1.*


0.12.0b1 - 2022-02-11
=====================

Expand Down Expand Up @@ -62,7 +105,7 @@ Documentation
-------------

- Adds documentation around the new caching behavior:
https://action-provider-tools.readthedocs.io/en/latest/toolkit/caching.html
https://action-provider-tools.readthedocs.io/en/latest/toolkit/caching.html


0.11.3 - 2021-05-27
Expand Down Expand Up @@ -94,7 +137,7 @@ Features

- Allows the detail field to be a string.
- Improves logging output in the case where there is an Action Provider throws
Exceptions or an authentication issue.
Exceptions or an authentication issue.
- Allows for environment variable configuration.
- Bundles Flask an an optional dependency. See the README.md for information on
installing the toolkit with Flask.
Expand All @@ -112,7 +155,7 @@ Deprecations
------------

- The Flask Callback Loader Helper is now deprecated in favor of the Flask
Blueprint Helper.
Blueprint Helper.

0.11.0 - 2021-03-29
===================
Expand Down Expand Up @@ -159,7 +202,7 @@ Features
--------

- Improves testing tools for isolating tests between different instances of
ActionProviderBlueprints and the Flask helpers.
ActionProviderBlueprints and the Flask helpers.

0.10.3 - 2020-10-01
===================
Expand All @@ -168,11 +211,11 @@ Features
--------

- Adds a shared patch to the testing library to mock out an
ActionProviderBlueprints TokenChecker
ActionProviderBlueprints TokenChecker
- Users can now specify a Globus Auth Client Name (legacy) when creating an
instance of the ActionProviderBlueprint
instance of the ActionProviderBlueprint
- Users can now specify multiple acceptable scopes when creating an instance of
the ActionProviderBlueprint
the ActionProviderBlueprint

Bugfixes
--------
Expand Down
50 changes: 10 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
VIRTUAL_ENV ?= .venv
MIN_TEST_COVERAGE ?= 40
LINT_PATHS = globus_action_provider_tools/ tests/ examples/

.PHONY: help install docs redoc autoformat lint clean test poetry.lock requirements.txt
.PHONY: help install docs redoc clean test poetry.lock requirements.txt

define HELPTEXT
Please use "make <target>" where <target> is one of:

install:
Install this project and its dependencies into a virtual
Install this project and its dependencies into a virtual
environment at $(VIRTUAL_ENV)

docs:
Expand All @@ -17,28 +15,21 @@ Please use "make <target>" where <target> is one of:
redoc:
Build the ActionProvider OpenAPI Redoc Spec

autoformat:
Format code according to the project's autoformatters and
linters

lint:
Run autoformatters and linters in check-only mode

clean:
clean:
Remove any built artifacts or environments

test:
Run the full suite of tests

test-toolkit:
Run the toolkit's source code tests

test-examples:
Run the example Action Providers' tests

poetry.lock:
Generate this project's poetry.lock file

requirements.txt:
Generate this project's requirements.txt file

Expand All @@ -57,23 +48,6 @@ docs:
redoc:
npx redoc-cli bundle --output index.html actions_spec.openapi.yaml

autoformat:
poetry run isort $(LINT_PATHS)
poetry run black $(LINT_PATHS)

lint:
poetry run black --check $(LINT_PATHS)
poetry run isort --check-only --diff $(LINT_PATHS)
poetry run mypy --ignore-missing-imports \
globus_action_provider_tools/ \
tests/
poetry run mypy --ignore-missing-imports \
examples/watchasay
poetry run mypy --ignore-missing-imports \
examples/whattimeisitrightnow
poetry run mypy --ignore-missing-imports \
examples/apt_blueprint

clean:
rm -rf $(VIRTUAL_ENV)
rm -rf .make_install_flag
Expand All @@ -88,13 +62,9 @@ clean:
rm -rf docs/build/*

test:
poetry run pytest \
--cov=globus_action_provider_tools \
--cov-report= \
--cov-fail-under=${MIN_TEST_COVERAGE} \
tests/ examples/
poetry run tox

poetry.lock:
poetry.lock:
poetry lock

requirements.txt:
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ and plug into other web frameworks.
from flask import Flask
from globus_action_provider_tools import ActionProviderDescription
description = ActionProviderDescription(
description = ActionProviderDescription(
globus_auth_scope="https://auth.globus.org/scopes/00000000-0000-0000-0000-000000000000/action_all",
title="My Action Provider",
admin_contact="[email protected]",
Expand Down Expand Up @@ -82,7 +82,7 @@ share your feedback.
Testing, Development, and Contributing
--------------------------------------

Welcome and thank you for taking the time to contribute!
Welcome and thank you for taking the time to contribute!

The ``globus_action_provider_tools`` package is developed using poetry so to get
started you'll need to install `poetry <https://python-poetry.org/>`_. Once
Expand Down Expand Up @@ -115,7 +115,7 @@ Please follow the steps below when creating a new release of the toolkit:
- git push --tags
- Create a new GH release that references the recently created tag. Provide
release notes with information on the changeset. Once the release is created,
there's a GH workflow that will build the toolkit and publish it to pypi.
there's a GH workflow that will build the toolkit and publish it to pypi.

Links
-----
Expand Down
4 changes: 2 additions & 2 deletions actions_spec.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ paths:
description: Insufficient permissions for this resource.
404:
description: |
No provider description is present or visible on the requested URL.
Visibility may be limited by the visible_to property of the
No provider description is present or visible on the requested URL.
Visibility may be limited by the visible_to property of the
Provider Description.
/run:
Expand Down
2 changes: 1 addition & 1 deletion changelog.d/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To correctly include your GitHub username in the fragment filename,
run this command to modify your global git configuration:

.. code-block:: shell
git config --global github.user GITHUB_USERNAME
Collecting fragments
Expand Down
Loading

0 comments on commit eed727a

Please sign in to comment.