Skip to content

Commit

Permalink
Update minimum python version to 3.9 (#56)
Browse files Browse the repository at this point in the history
* update setup.py and propagate hippynn versions to sphinx

* Update doc builder GitHub Actions

1. ammaraskar/sphinx-action only supports Python 3.8, switch to
   actions/setup-python@v5 to use Python 3.9
2. Bump actions/checkout to v4
3. Bump actions/upload-artifact to v4

* Update version in docs (#57)

* removed no longer used package imports

* Update Python version requirement to >=3.9

---------

Co-authored-by: Nicholas Lubbers <hippynn@lanl.gov>
Co-authored-by: Xinyang Li <lix@lanl.gov>
Co-authored-by: Emily Shinkle <eshinkle@lanl.gov>
  • Loading branch information
4 people authored Jan 23, 2024
1 parent 8e99f0e commit ceea653
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/auto_doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
# Standard drop-in approach that should work for most people.
- uses: ammaraskar/sphinx-action@master
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# FIXME: how to build with mocking torch?
# use CPU only torch as this action will be likely for doc building only
pre-build-command: "pip3 install -U sphinx sphinx_rtd_theme graphviz ase torch --extra-index-url https://download.pytorch.org/whl/cpu && pip install ."
docs-folder: "docs/"
# a new target that always builds api_doc first
build-command: "make html_all"
python-version: "3.9"

- name: Install dependencies and package
run: >-
pip3 install -U sphinx sphinx_rtd_theme graphviz ase torch --extra-index-url https://download.pytorch.org/whl/cpu && pip install .
- name: Build docs
run: |
cd docs
make html_all
# Create an artifact of the html output.
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: DocumentationHTML
path: docs/build/html/
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
author = "Nicholas Lubbers"

# The full version, including alpha/beta/rc tags
release = "0.0.1"

import hippynn
release = hippynn.__version__

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requirements
^^^^^^^^^^^^

Requirements:
* Python_ >= 3.7
* Python_ >= 3.9
* pytorch_ >= 1.9
* numpy_
Optional Dependencies:
Expand Down
6 changes: 6 additions & 0 deletions hippynn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
The hippynn python package.
"""

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

# Configurational settings
from ._settings_setup import settings


# Pytorch modules
from . import layers
from . import networks
Expand Down
2 changes: 0 additions & 2 deletions hippynn/layers/pairs/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import numpy as np
from scipy.spatial import KDTree
import torch
import os
from datetime import datetime

from .open import PairMemory

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version=versioneer.get_version(),
author="Nicholas Lubbers et al",
author_email="hippynn@lanl.gov",
python_requires=">3.7",
python_requires=">=3.9",
install_requires=[
"numpy",
"torch",
Expand Down

0 comments on commit ceea653

Please sign in to comment.