Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
179a09c
Drop 3.7 from test workflows
mdickinson Jun 27, 2024
8464f7f
Add news entry
mdickinson Jun 27, 2024
369a083
Avoid running on Apple Silicon - pytables is not installable there
mdickinson Jun 27, 2024
e9559b8
Restrict version of NumPy, which conflicts with the most recent relea…
mdickinson Jun 27, 2024
e5a35c9
Be consistent about numpy versions
mdickinson Jun 27, 2024
b4a4703
Merge branch 'main' into dev/drop-python37
mdickinson Jun 27, 2024
bd1a99d
Drop support for Python 3.6 in etstool.py
mdickinson Jun 27, 2024
50838f6
Merge remote-tracking branch 'origin/dev/drop-python37' into dev/drop…
mdickinson Jun 27, 2024
81b52ed
Experiment: attempt to run tests on EDM Python 3.11
mdickinson Jun 27, 2024
014be0a
Add dependabot config
mdickinson Jun 27, 2024
999df0c
Update EDM version in workflows
mdickinson Jun 27, 2024
de8e08b
Use rh8-x8_64 for Python 3.11
mdickinson Jun 27, 2024
e644db2
Don't include Sphinx or the Enthought Sphinx Theme on Python 3.11
mdickinson Jun 27, 2024
90231f0
Fix missing return
mdickinson Jun 27, 2024
1bf139b
Move flake8_ets out of depenencies on 3.11
mdickinson Jun 27, 2024
a760bc9
Streamline dependency calculation
mdickinson Jun 27, 2024
aa9ec79
Move flake8 into 3.8-only dependencies
mdickinson Jun 27, 2024
69bc850
Only run style checks on 3.8
mdickinson Jun 27, 2024
c7d98c6
Fixing comments
mdickinson Jun 27, 2024
88841ad
Go back to Apple Silicon, but don't install pytables there
mdickinson Jun 27, 2024
b873a4f
Add issue references
mdickinson Jun 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
4 changes: 2 additions & 2 deletions .github/workflows/ets-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

env:
INSTALL_EDM_VERSION: 3.5.0
INSTALL_EDM_VERSION: 3.7.0

jobs:

Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
path: ~/.cache
key: ${{ runner.os }}-${{ matrix.runtime }}-${{ hashFiles('etstool.py') }}
- name: Setup EDM
uses: enthought/setup-edm-action@v2
uses: enthought/setup-edm-action@v3
with:
edm-version: ${{ env.INSTALL_EDM_VERSION }}
- name: Install test environment
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-with-edm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Test with EDM
on: [pull_request, workflow_dispatch]

env:
INSTALL_EDM_VERSION: 3.5.0
INSTALL_EDM_VERSION: 3.7.0

jobs:

Expand All @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
runtime: ['3.6', '3.8']
runtime: ['3.8', '3.11']

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Set up bootstrap Python (3.10)
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '.github/workflows/bootstrap-requirements.txt'
- name: Install necessary packages to the bootstrap environment
Expand All @@ -36,13 +36,13 @@ jobs:
path: ~/.cache
key: ${{ runner.os }}-${{ matrix.runtime }}-${{ hashFiles('etstool.py') }}
- name: Setup EDM
uses: enthought/setup-edm-action@v2
uses: enthought/setup-edm-action@v3
with:
edm-version: ${{ env.INSTALL_EDM_VERSION }}
- name: Install test environment
run: python etstool.py install --runtime=${{ matrix.runtime }}
- name: Run style checks (only on Linux)
- name: Run style checks (only on Linux, 3.8)
run: python etstool.py flake8 --runtime=${{ matrix.runtime }}
if: startsWith(matrix.os, 'ubuntu')
if: startsWith(matrix.os, 'ubuntu') && matrix.runtime == '3.8'
- name: Run tests
run: python etstool.py test --runtime=${{ matrix.runtime }}
13 changes: 9 additions & 4 deletions .github/workflows/test-with-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

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

Expand All @@ -20,9 +20,14 @@ jobs:
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: Install dependencies and local packages (not macOS)
run: python -m pip install .[h5,preferences]
if: matrix.os != 'macos-latest'
- name: Install dependencies and local packages (macOS)
run: python -m pip install .[preferences]
# PyTables currently won't build on Apple Silicon, so exclude the h5 deps
# xref: enthought/apptools/issues/344
if: matrix.os == 'macos-latest'
- name: Run tests
run: |
mkdir testdir
Expand Down
1 change: 1 addition & 0 deletions docs/releases/upcoming/339.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for Python 3.7. (#339)
39 changes: 29 additions & 10 deletions etstool.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
import click

#: Supported Python versions.
SUPPORTED_RUNTIMES = ["3.6", "3.8"]
SUPPORTED_RUNTIMES = ["3.8", "3.11"]

#: Default Python version to use.
DEFAULT_RUNTIME = "3.8"
Expand All @@ -101,19 +101,27 @@ def edm_dependencies(runtime):

Returns a set of requirement strings.
"""
return {
"flake8",
"flake8_ets",
"traitsui",
common_dependencies = {
"configobj",
"coverage",
"importlib_resources>=1.1.0",
"pytables" if runtime == "3.6" else "tables",
"pandas",
"pyface",
"enthought_sphinx_theme",
"sphinx",
"tables",
"traitsui",
}
runtime_specific_dependencies = {
"3.8": {
# Most of these are currently unavailable on Python 3.11;
"enthought_sphinx_theme",
"flake8",
"flake8_ets",
"sphinx",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, just for context, I see that we don't have any CI jobs that build documentation, so are we using Sphinx anywhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use Sphinx to build docs after making a release, and the current workflow for that is to do it manually via etstool.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that we should ideally have a workflow for that.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks!

# importlib_resources is not needed on Python 3.11
"importlib_resources",
},
"3.11": set(),
}
return common_dependencies | runtime_specific_dependencies[runtime]


# Dependencies we install from source for cron tests
Expand Down Expand Up @@ -178,7 +186,8 @@ def install(edm, runtime, environment, source):
edm_packages = ' '.join(edm_dependencies(runtime))
# edm commands to setup the development environment
commands = [
"{edm} environments create {environment} --force --version={runtime}",
"{edm} environments create {environment} --force --version={runtime} "
"--platform={platform}",
"{edm} install -y -e {environment} " + edm_packages,
(
"{edm} run -e {environment} -- "
Expand Down Expand Up @@ -477,10 +486,20 @@ def get_parameters(edm, runtime, environment):
if edm is None:
edm = locate_edm()

if sys.platform.startswith("win32"):
platform = "win-x86_64"
elif sys.platform.startswith("linux"):
platform = "rh7-x86_64" if runtime == "3.8" else "rh8-x86_64"
elif sys.platform.startswith("darwin"):
platform = "osx-x86_64"
else:
raise click.ClickException(f"platform {sys.platform} not supported")

parameters = {
'edm': edm,
'runtime': runtime,
'environment': environment,
'platform': platform,
}
if environment is None:
parameters['environment'] = 'apptools-test-{runtime}'.format(
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,14 @@ def get_long_description():
"importlib-resources>=1.1.0; python_version<'3.9'",
],
"h5": [
"numpy",
# PyTables is currently incompatible with NumPy 2.0
# xref: enthought/apptools#345
"numpy < 2.0",
"pandas",
"tables",
],
"persistence": [
"numpy",
"numpy < 2.0",
],
"preferences": [
"configobj",
Expand All @@ -328,5 +330,5 @@ def get_long_description():
packages=find_packages(),
platforms=["Windows", "Linux", "Mac OS-X", "Unix", "Solaris"],
zip_safe=False,
python_requires=">=3.6",
python_requires=">=3.8",
)