Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Github actions to new versions and runon Python 3.8+. #138

Merged
merged 9 commits into from
Jun 6, 2024
35 changes: 18 additions & 17 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
name: Run tests and build docs

on:
push:
branches: master
pull_request:
branches: master

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ['3.7', '3.8', '3.9', '3.10']

python: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2

- name: Set up Git repository
uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: conda-incubator/setup-miniconda@v3
with:
cache-downloads: true
cache-env: true
auto-update-conda: true
python-version: ${{ matrix.python }}
environment-file: yeadon-dev-env.yml
environment-name: yeadon-dev
extrax-specs: |
python=${{ matrix.python }}

- name: Run the tests
activate-environment: yeadon-dev
miniforge-version: latest
- name: Run nose
shell: bash -l {0}
if: ${{ matrix.python != '3.12' }}
run: |
nosetests -v --with-coverage --cover-package=yeadon

- name: Run pytest
shell: bash -l {0}
if: ${{ matrix.python == '3.12' }}
run: |
conda install pytest
coverage run -m pytest yeadon
- name: Build the documentation
shell: bash -l {0}
run: |
cd doc && make html

- name: Install the software
shell: bash -l {0}
run: |
python setup.py install
yeadon -h
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Directories
Installing
==========

This package was developed for Python 3.7+.
This package was developed for Python 3.8+.

Dependencies
------------
Expand Down Expand Up @@ -107,9 +107,9 @@ This option is required if you want to use `yeadon` in a virtualenv. You can
build the dependencies from source and then install them by using a tool like
`pip`::

$ python -m pip install numpy PyYAML
$ python -m pip install nose sphinx mayavi
$ python -m pip install numpydoc
$ python -m pip install numpy PyYAML # required
$ python -m pip install mayavi # optional
$ python -m pip install nose sphinx numpydoc # development tools

or you can obtain the source code, perhaps from GitHub_, and install the
packages manually.
Expand All @@ -123,13 +123,13 @@ Once you've obtained the dependencies, you can install `yeadon`. The
easiest way to download and install the `yeadon` package is by using a tool
like `pip` to obtain the package from the Python Package Index (PyPi)::

$ python -m pip install yeadon # sudo if system install
$ python -m pip install yeadon

You can also obtain an archive of the package at the Python Package Index
(`<https://pypi.python.org/pypi/yeadon>`_), and then install the package on your
own by executing the following from the root directory of the package::

$ python setup.py install # sudo if system install
$ python setup.py install

On Unix, you can obtain the package source code and install it without leaving
your terminal::
Expand All @@ -138,7 +138,7 @@ your terminal::
$ wget https://pypi.python.org/packages/source/y/yeadon/yeadon-X.X.X.tar.gz
$ tar -zxfv yeadon-X.X.X.tar.gz
$ cd yeadon-X.X.X.tar.gz
$ python setup.py install # sudo if system install
$ python setup.py install

Run the tests with::

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
intersphinx_mapping = {'python': ('http://docs.python.org/', None)}
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy>=1.16.5
pyyaml>=5.3.1
numpydoc>=0.7.0
numpy>=1.21.5
pyyaml>=5.4.1
numpydoc>=1.2
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
keywords="human inertia yeadon sports biomechanics gymnastics",
license='LICENSE.txt',
packages=find_packages(),
# NOTE : The minimum versions correspond to those in Ubuntu 20.04 LTS.
install_requires=['numpy>=1.16.5',
'pyyaml>=5.3.1'],
# NOTE : The minimum versions correspond to those in Ubuntu 22.04 LTS.
install_requires=['numpy>=1.21.5',
'pyyaml>=5.4.1'],
extras_require={'gui': ['mayavi>=4.7.1'],
'doc': ['sphinx>=1.8.5', 'numpydoc>=0.7.0']},
'doc': ['sphinx>=4.3.2', 'numpydoc>=1.2']},
tests_require=['nose>=1.3.7'],
test_suite='nose.collector',
include_package_data=True,
Expand All @@ -28,10 +28,11 @@
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Physics',
],
],
)
14 changes: 7 additions & 7 deletions yeadon-dev-env.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: yeadon-dev
channels:
- conda-forge
# NOTE : The minimum versions correspond to those in Ubuntu 20.04 LTS.
# NOTE : The minimum versions correspond to those in Ubuntu 22.04 LTS.
dependencies:
- coverage >=4.5.2
- coverage >=6.2
- nose >=1.3.7
- numpy >=1.16.5
- numpydoc >=0.7.0
- pyyaml >=5.3.1
- setuptools >=44.0.0
- sphinx >=1.8.5
- numpy >=1.21.5
- numpydoc >=1.2
- pyyaml >=5.4.1
- setuptools >=59.6.0
- sphinx >=4.3.2
Loading