Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
build-wheel:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
environment: pypi-deployment
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/sphinx.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: "Sphinx: Render docs"

on: push

on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -14,10 +16,10 @@ jobs:

- name: Get MOPAC shared library
run: |
curl -OL https://github.com/openmopac/mopac/releases/download/v23.1.2/mopac-23.1.2-linux.tar.gz
tar -xvzf mopac-23.1.2-linux.tar.gz
curl -OL https://github.com/openmopac/mopac/releases/download/v23.2/mopac-23.2-linux.tar.gz
tar -xvzf mopac-23.2-linux.tar.gz
mkdir src/mopactools/lib
cp mopac-23.1.2-linux/lib/* src/mopactools/lib
cp mopac-23.2-linux/lib/* src/mopactools/lib

- name: Build HTML
uses: ammaraskar/sphinx-action@master
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "mopactools"
version = "0.1.0"
version = "0.1.1"
authors = [
{ name="Jonathan Moussa", email="jemoussa@vt.edu" },
]
Expand All @@ -23,6 +23,7 @@ license = { text="Apache-2.0" }
dependencies = [
"numpy",
"scipy",
"packaging",
]

[project.urls]
Expand Down
8 changes: 7 additions & 1 deletion src/mopactools/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import ctypes
import numpy as np
import scipy
from packaging.version import Version, InvalidVersion
from . import binding

class MopacSystem:
Expand Down Expand Up @@ -646,4 +647,9 @@ def from_file(input_path):
binding.libmopac.get_mopac_version(buffer)
#: Semantic version number of the MOPAC shared library
VERSION = buffer.value.decode('utf-8')
# In the future, it might make sense to put a minimum version test here
MIN_VERSION = "23.2"
try:
if Version(VERSION) < Version(MIN_VERSION):
raise ValueError(f"MOPAC shared library version ({VERSION}) is older than the minimum required version ({MIN_VERSION}).")
except InvalidVersion:
print(f"WARNING: MOPAC shared library has a non-standard version ({VERSION}) and might not be compatible with mopactools.")