Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
corranwebster authored May 22, 2023
2 parents f2bc2b2 + f18497a commit 0712077
Show file tree
Hide file tree
Showing 165 changed files with 522 additions and 320 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bootstrap-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
click
37 changes: 19 additions & 18 deletions .github/workflows/ets-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,42 @@ on:
workflow_dispatch:

env:
INSTALL_EDM_VERSION: 3.2.3
INSTALL_EDM_VERSION: 3.5.0

jobs:

# Test against EDM packages
test-with-edm:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
runtime: ['3.8']

runs-on: ${{ matrix.os }}
env:
# Set root directory, mainly for Windows, so that the EDM Python
# environment lives in the same drive as the cloned source. Otherwise
# 'pip install' raises an error while trying to compute
# relative path between the site-packages and the source directory.
EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm
steps:
- uses: actions/checkout@v2
- name: Checkout the target commit
uses: actions/checkout@v3
- name: Set up bootstrap Python (3.10)
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '.github/workflows/bootstrap-requirements.txt'
- name: Install necessary packages to the bootstrap environment
run: python -m pip install -r .github/workflows/bootstrap-requirements.txt
- name: Cache EDM packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache
key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.py') }}
key: ${{ runner.os }}-${{ matrix.runtime }}-${{ hashFiles('etstool.py') }}
- name: Setup EDM
uses: enthought/setup-edm-action@v1
uses: enthought/setup-edm-action@v2
with:
edm-version: ${{ env.INSTALL_EDM_VERSION }}
- name: Install click to the default EDM environment
run: edm install -y wheel click coverage
- name: Install test environment
run: edm run -- python etstool.py install --source
run: python etstool.py install --runtime=${{ matrix.runtime }} --source
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
run: edm run -- python etstool.py test
run: python etstool.py test --runtime=${{ matrix.runtime }}

notify-on-failure:
needs: test-with-edm
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/publish-on-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish release to PyPI

on:
workflow_dispatch:
release:
types: [published]

jobs:
build-and-upload:
runs-on: ubuntu-latest

steps:
- name: Check out the release commit
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python packages needed for build and upload
run: |
python -m pip install build twine
- name: Build sdist and wheel
run: |
python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m twine check --strict dist/*
python -m twine upload dist/*
43 changes: 22 additions & 21 deletions .github/workflows/test-with-edm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,45 @@

name: Test with EDM

on: pull_request
on: [pull_request, workflow_dispatch]

env:
INSTALL_EDM_VERSION: 3.2.3
INSTALL_EDM_VERSION: 3.5.0

jobs:

# Test against EDM packages
test-with-edm:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: ['ubuntu-latest', 'windows-latest']
runtime: ['3.6', '3.8']

runs-on: ${{ matrix.os }}
env:
# Set root directory, mainly for Windows, so that the EDM Python
# environment lives in the same drive as the cloned source. Otherwise
# 'pip install' raises an error while trying to compute
# relative path between the site-packages and the source directory.
EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm
steps:
- uses: actions/checkout@v2
- name: Checkout the target commit
uses: actions/checkout@v3
- name: Set up bootstrap Python (3.10)
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '.github/workflows/bootstrap-requirements.txt'
- name: Install necessary packages to the bootstrap environment
run: python -m pip install -r .github/workflows/bootstrap-requirements.txt
- name: Cache EDM packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache
key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.py') }}
key: ${{ runner.os }}-${{ matrix.runtime }}-${{ hashFiles('etstool.py') }}
- name: Setup EDM
uses: enthought/setup-edm-action@v1
uses: enthought/setup-edm-action@v2
with:
edm-version: ${{ env.INSTALL_EDM_VERSION }}
- name: Install click to the default EDM environment
run: edm install -y wheel click coverage
- name: Install test environment
run: edm run -- python etstool.py install
- name: Flake8
run: edm run -- python etstool.py flake8
run: python etstool.py install --runtime=${{ matrix.runtime }}
- name: Run style checks (only on Linux)
run: python etstool.py flake8 --runtime=${{ matrix.runtime }}
if: startsWith(matrix.os, 'ubuntu')
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
run: edm run -- python etstool.py test
run: python etstool.py test --runtime=${{ matrix.runtime }}
30 changes: 30 additions & 0 deletions .github/workflows/test-with-pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test with pip

on:
- pull_request
- workflow_dispatch

jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

runs-on: ${{ matrix.os }}

steps:
- name: Get apptools source
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and local packages
run: |
python -m pip install .[h5,preferences]
- name: Run tests
run: |
mkdir testdir
cd testdir
python -m unittest discover -v apptools
55 changes: 55 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
Apptools CHANGELOG
==================

Version 5.2.0
~~~~~~~~~~~~~

Released: 2022-08-16

This is a minor release, focusing primarily on Python 3.8 support and updating
of development workflows.

Thanks to the following contributors:

* Aaron Ayres
* Mark Dickinson
* Jonas Heinrich
* Robert T. McGibbon
* Sai Rahul Poruri
* Corran Webster

Features
--------
* Replace some uses of ``on_trait_change`` and ``depends_on`` with ``observe``.
(#285, #289)
* Use ``importlib.resources`` in preference to ``importlib_resources``
on new enough Python versions. (#284)

Fixes
-----
* Replace ``eval`` with ``ast.literal_eval`` in ``apptools.preferences``.
(#299)
* Use context managers to handle locks in ``apptools.preferences``. (#306)
* Fix test failures due to ``collections.abc`` changes in Python 3.10. (#313)
* Remove a redundant ``elif`` branch in ``preference_binding``. (#298)

Documentation
-------------
* Copyrights have been updated for 2022. (#307)
* A Read the Docs configuration file has been added. (#296)
* A use of the deprecated ``contributes_to`` decorator in the documentation
has been fixed. (#286)

Build
-----
* The default branch has been renamed from ``master`` to ``main``. (#297)
* ``etstool.py`` now supports Python 3.8 as well as Python 3.6, and test
workflows will run on both Python 3.6 and Python 3.8. (#316)
* Continuous integration now uses GitHub Actions instead of Travis CI
and Appveyor. (#288, #291, #292)
* Added a GitHub Actions test workflow that tests against PyPI packages instead
of EDM packages. (#314)
* Added a GitHub Actions workflow to automatically publish releases to PyPI.
(#315)
* Cron job failures are now reported to the main ETS Slack channel, not the
bots channel. (#295, #308)
* The cron job can now also be triggered manually. (#294)


Version 5.1.0
~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion apptools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/_testing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2006-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2006-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/_testing/optional_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2006-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2006-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/dict_node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
4 changes: 2 additions & 2 deletions apptools/io/h5/file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand All @@ -7,7 +7,7 @@
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
from collections import Mapping, MutableMapping
from collections.abc import Mapping, MutableMapping
from functools import partial
import inspect

Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/table_node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/tests/test_dict_node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/tests/test_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/tests/test_table_node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/h5/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/tests/test_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/io/tests/test_folder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/logger/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/logger/agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
2 changes: 1 addition & 1 deletion apptools/logger/agent/attachments.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
Expand Down
Loading

0 comments on commit 0712077

Please sign in to comment.