Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/dev/setuptools-65.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDoyle2 authored Sep 18, 2023
2 parents fbef9d5 + ebfd2c8 commit 5bf0394
Show file tree
Hide file tree
Showing 459 changed files with 88,735 additions and 12,834 deletions.
83 changes: 44 additions & 39 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name: CI
# │ │ ┌────────── day of the month (1 - 31)
# │ │ │ ┌────────── month (1 - 12)
# │ │ │ │ ┌────────── day of the week (0 - 6)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
Expand Down Expand Up @@ -60,35 +60,36 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11-dev']
# '3.9', '3.11-dev'
python-version: ['3.10', '3.11']
os: [ubuntu-latest]
# , macos-latest, windows-latest
mode: ['latest', 'latest_basic', 'old', 'latest_pyqt5_gui', 'latest_pyqt6_gui', 'latest_pyside2_gui', 'latest_pyside6_gui']
# 'old_basic', 'old_pyside2_gui', 'old_pyqt5_gui'.
mode: ['latest', 'latest_basic', 'old', 'latest_pyqt5_gui', 'latest_pyqt6_gui', 'latest_pyside2_gui', ]
# 'old_basic', 'old_pyside2_gui', 'old_pyqt5_gui', 'latest_pyside6_gui'
experimental: [false]
#include:
# - python: '3.11-dev'
# experimental: true
# experimental: true
#include:
#- node: 13
# os: ubuntu-18.04
# experimental: true
exclude:
# Exclude all DB images except "mariadb_10.4" for all PHP versions except "7.3".
- {python-version: '3.9', mode: 'latest_pyside6_gui'} # 'pip install imageio pillow' fails
- {python-version: '3.9', mode: 'latest_pyqt5_gui'} # 'pip install imageio pillow' fails
- {python-version: '3.9', mode: 'latest_pyqt6_gui'} # 'pip install imageio pillow' fails
#- {python-version: '3.9', mode: 'latest_pyside6_gui'} # 'pip install imageio pillow' fails
#- {python-version: '3.9', mode: 'latest_pyqt5_gui'} # 'pip install imageio pillow' fails
#- {python-version: '3.9', mode: 'latest_pyqt6_gui'} # 'pip install imageio pillow' fails

- {python-version: '3.10', mode: 'old'} # redundant
- {python-version: '3.10', mode: 'latest_pyqt5_gui'} # 'pip install imageio pillow' fails
- {python-version: '3.10', mode: 'latest_pyqt5_gui'} # 'pip install imageio pillow' fails
- {python-version: '3.10', mode: 'latest_pyqt6_gui'} # 'pip install imageio pillow' fails

- {python-version: '3.11-dev', mode: 'old'} # redundant
- {python-version: '3.11-dev', mode: 'latest_pyqt5_gui'}
- {python-version: '3.11-dev', mode: 'latest_pyqt6_gui'}
- {python-version: '3.11-dev', mode: 'latest_pyside2_gui'}
- {python-version: '3.11-dev', mode: 'latest_pyqt6_gui'}
- {python-version: '3.11', mode: 'old'} # redundant
- {python-version: '3.11', mode: 'latest_pyqt5_gui'}
- {python-version: '3.11', mode: 'latest_pyqt6_gui'}
- {python-version: '3.11', mode: 'latest_pyside2_gui'}
- {python-version: '3.11', mode: 'latest_pyqt6_gui'}
fail-fast: false
#- continue-on-error: ${{ matrix.experimental }}
#strategy:
Expand All @@ -102,7 +103,7 @@ jobs:
#env:
# COVERAGE_RUN='coverage run'
# CODECOV='codecov'
# NUMPY='numpy scipy matplotlib h5py vtk pyqt5 pandas>=0.25 imageio pillow>5.2,!=7.1.0'
# NUMPY='numpy scipy matplotlib h5py vtk pyqt5 'pandas>=1.0,<2.0' imageio pillow>5.2,!=7.1.0'
# LIB='libblas-dev liblapack-dev'

#--------------------------------------------------------------------------------------------------
Expand All @@ -112,7 +113,7 @@ jobs:
#env:
#- COVERAGE_RUN='coverage run'
#- CODECOV='codecov'
#- NUMPY='numpy scipy matplotlib h5py vtk pyqt5 pandas>=0.25 imageio pillow>5.2,!=7.1.0'
#- NUMPY='numpy scipy matplotlib h5py vtk pyqt5 'pandas>=1.0,<2.0' imageio pillow>5.2,!=7.1.0'
##- LIB='libblas-dev liblapack-dev'
#- LIBH5='libhdf5-dev'
#--------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -150,64 +151,64 @@ jobs:
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip list
#mode: ['latest', 'latest_basic',
#mode: ['latest', 'latest_basic',
# 'latest_pyside2_gui', 'latest_pyside6_gui',
# 'latest_pyqt5_gui', 'latest_pyqt6_gui',
# 'old', 'old_basic',
# 'old_pyside_gui', 'old_pyqt_gui']
#
- name: Install latest basic packages
if: ${{ matrix.mode == 'latest_basic' || matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
if: ${{ matrix.mode == 'latest_basic' || matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui' }}
run: |
pip install numpy scipy
#--no-binary :all:

- name: Install latest packages (pandas, matplotlib)
if: ${{ matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
if: ${{ matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui' }}
run: |
pip install pandas>=0.25 matplotlib
pip install 'pandas>=1.0,<2.0' matplotlib
- name: Install latest packages (h5py)
if: ${{ matrix.python-version != '3.11-dev' && (matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
if: ${{ matrix.python-version != '3.11' && (matrix.mode == 'latest' ||
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
run: |
pip install h5py
pip install h5py tables
- name: Install latest packages (imageio, pillow)
if: ${{ matrix.python-version != '3.11-dev' && (
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
if: ${{ matrix.python-version != '3.11' && (
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
run: |
pip install imageio<3 pillow>5.2,!=7.1.0
pip install imageio pillow>5.2,!=7.1.0
- name: Install latest packages (vtk)
if: ${{ matrix.python-version != '3.11-dev' && (
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
if: ${{ matrix.python-version != '3.11' && (
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
run: |
pip install vtk
- if: ${{ matrix.mode == 'latest_pyside2_gui' && matrix.python-version != '3.11-dev' }}
- if: ${{ matrix.mode == 'latest_pyside2_gui' && matrix.python-version != '3.11' }}
name: Install PySide2
run: |
pip install PySide2
- if: ${{ matrix.mode == 'latest_pyside6_gui' && matrix.python-version != '3.11-dev' }}
- if: ${{ matrix.mode == 'latest_pyside6_gui' && matrix.python-version != '3.11' }}
name: Install PySide6
run: |
pip install PySide6
- if: ${{ matrix.mode == 'latest_pyqt5_gui' && matrix.python-version != '3.11-dev' }}
- if: ${{ matrix.mode == 'latest_pyqt5_gui' && matrix.python-version != '3.11' }}
name: Install PyQt5
run: |
pip install PyQt5
- if: ${{ matrix.mode == 'latest_pyqt6_gui' && matrix.python-version != '3.11-dev' }}
- if: ${{ matrix.mode == 'latest_pyqt6_gui' && matrix.python-version != '3.11' }}
name: Install PyQt6
run: |
pip install PyQt6
Expand Down Expand Up @@ -240,7 +241,7 @@ jobs:
pip list
- name: Run No GUI
if: ${{ matrix.python-version == '3.11-dev' || (
if: ${{ matrix.python-version == '3.11' || (
matrix.mode == 'latest' || matrix.mode == 'latest_basic' || matrix.mode == 'old') }}
run: |
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
Expand All @@ -249,17 +250,21 @@ jobs:
# 3.11 - No matching distribution found for vtk
- name: Run GUI
if: ${{ matrix.python-version != '3.11-dev' && (
matrix.mode == 'latest_pyside_gui' || matrix.mode == 'latest_pyside6_gui' ||
if: ${{ matrix.python-version != '3.11' && (
matrix.mode == 'latest_pyside_gui' || matrix.mode == 'latest_pyside6_gui' ||
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
run: |
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python pyNastran/all_tests.py
coverage run pyNastran/all_tests.py
#- name: Upload coverage
# run: |
# codecov
- name: Upload coverage
run: |
codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

#--------------------------------------------------------------------------------------------------
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
Expand Down
30 changes: 30 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# https://blog.readthedocs.com/migrate-configuration-v2/

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/html_docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# https://docs.readthedocs.io/en/stable/config-file/v2.html#python-install
python:
install:
- requirements: requirements_docs.txt
- method: pip
path: .
#extra_requirements:
# - docs
#- method: pip
# path: another/package
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The biggest new features are:
- improved op2 support
Programmatics:
- Supports Python 3.7 - 3.10
- Supports Python 3.7 - 3.10 (later versions of Python requires downloading from github)
- GUI is compatible with PyQt5/6 and PySide2/6 and VTK 7-10
- improved testing of old versions of packages
- updated nptyping requirements
Expand Down
151 changes: 151 additions & 0 deletions dev/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# https://peps.python.org/pep-0621/
# pip wheel . --no-build-isolation -vvv

#-------------------------------------------------------------------------------------------
[project]
name = "pyNastran"
version = "1.4.0"
description = "pyNastran project"
#long_description = "pyNastran project" # renamed to readme

authors = [
{name = "Steve Doyle", email="[email protected]"},
#{email = "[email protected]"}
]
license = {file = "LICENSE.txt"}
#readme = {file = "README.md"} # doesn't work
#readme = "pyNastran project" # it's looking for a file
#readme = "README.md" # doesn't work

requires-python = ">=3.9"

#keywords = ["packaging", "dependency", "infer", "pyproject.toml"]
keywords = ["nastran"]

classifiers = [
"Topic :: Software Development",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD-3",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
]

# Requirements: This is done differently by poetry!
dependencies = [
'numpy',
'scipy',
'matplotlib',
'cpylog>=1.4.0',
]
#-------------------------------------------------------------------------------------------
[project.optional-dependencies]
#dev = [
# #"black>=23",
#]

# fancy
#pandas = [
# 'pandas>=1.0,<2.0',
#]

formats = [
'pandas>=1.0,<2.0',
'tables', # hdf5
'h5py', # hdf5
]
gui_pyqt5 = [
'PyQt5', # gui library
'vtk>=9.0', # rendering library
"pyNastran[formats]",
]
#gui_pyqt6_buggy = [
# # PyQt6 buggy
# 'PyQt6', # gui library
# 'vtk>=9.0', # rendering library
# "pyNastran[formats]",
#]
gui_pyside2 = [
'PySide2', # gui library
'vtk>=9.0', # rendering library
"pyNastran[formats]",
]
gui_pyside6 = [
'PySide6', # gui library
'vtk>=9.0', # rendering library
"pyNastran[formats]",
]
gui = gui_pyside6
#----
all = [
"pyNastran[gui]",
]
dev = [
"pyNastran[all]",
"tox",
"pre-commit",
"bump2version",
"setuptools>=66.0",
"wheel",
]
none = []
#-------------------------------------------------------------------------------------------
[project.scripts]
#poetry = "infer_pyproject.cli:main"
pyNastranGUI = "pyNastran.gui.gui:cmd_line"

#-------------------------------------------------------------------------------------------
[project.urls]

homepage = "https://github.com/SteveDoyle2/pyNastran/"
issue_tracker = "https://github.com/SteveDoyle2/pyNastran/issues"
documentation = "https://pynastran-git.readthedocs.io/en/1.3/"
repository = "https://github.com/SteveDoyle2/pyNastran.git"

#-------------------------------------------------------------------------------------------
[build-system]
requires = [

# main
"setuptools >= 66.0.0",
"setuptools_scm[toml]>=6.2",
"wheel<0.40",
]
build-backend = "setuptools.build_meta"
#requires = ["setuptools>=61.0.0", "setuptools_scm[toml]>=6.2"]

#-------------------------------------------------------------------------------------------
# makes "pip wheel ." work
# lets us create a wheel for distribution
#
[tool.distutils.bdist_wheel]
universal = true

#-------------------------------------------------------------------------------------------
# https://github.com/sphinx-toolbox/sphinx-pyproject/blob/master/pyproject.toml
[tool.setuptools]
include-package-data = false
#packages = ["pyNastran"]

[tool.setuptools.packages.find]
# https://stackoverflow.com/questions/75387904/how-to-exclude-tests-folder-from-the-wheel-of-a-pyproject-toml-managed-lib
# don't include pdfs/dat files in the wheel
#find = {}
#where
include = ["pyNastran*"]
#include = ["pkg*"]

exclude = [
'models/*',
'pyNastran/converters/dev*',
'pyNastran/converters/dev*',
#'pyNastran/bdf/*.bdf'
]

#-------------------------------------------------------------------------------------------

#[tool.setuptools_scm]
6 changes: 3 additions & 3 deletions dev/requirements_build_gui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scipy>=0.16.0
docopt==0.6.2
vtk==9.0.1
pillow>=3.1.1
pywin32 # installs a DLL (I forget which)
setuptools==65.5.1 # note that 19.3-19.6.2 don't work; it'll cause:
# # ImportError: The 'packaging' package is required; normally this is bundled with this package so if you get this warning
pywin32 # installs a DLL (I forget which)
setuptools>=65.5.1 # note that 19.3-19.6.2 don't work; it'll cause:
#setuptools>=50.3.1 # earliest version released after for python 3.9.0
#numpydoc
Loading

0 comments on commit 5bf0394

Please sign in to comment.