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

BLD: Switch from setup.py to pyproject.toml #302

Merged
merged 2 commits into from
Jul 4, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -8,4 +8,4 @@ updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
2 changes: 2 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
11 changes: 7 additions & 4 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -64,6 +64,8 @@ jobs:
version: '3.11'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install cp2k
if: matrix.special[0] == 'CP2K'
@@ -88,11 +90,10 @@ jobs:
case "${{ matrix.special[0] }}" in
"pre-release")
pip install --pre -e .[test] --upgrade --force-reinstall
pip uninstall plams -y; pip install git+https://github.com/SCM-NV/PLAMS@master --upgrade
pip install git+https://github.com/NLeSC/noodles@master --upgrade
;;
"no optional")
pip install -e .[test_no_optional]
pip install -e .[test-no-optional]
;;
*)
pip install -e .[test]
@@ -133,14 +134,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install linters
run: pip install -r linting_requirements.txt
run: pip install .[lint]

- name: Python info
run: |
@@ -151,7 +154,7 @@ jobs:
run: pip list

- name: Run flake8
run: flake8 src test conftest.py setup.py
run: flake8 src test conftest.py

- name: Run pydocstyle
run: pydocstyle src
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@ var/
*.egg-info/
.installed.cfg
*.egg
src/qmflows/_version.py
qmflows-*/

# PyInstaller
# Usually these files are written by a python script from a template
6 changes: 5 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
exclude test/*
exclude test/**
exclude docs/**
exclude jupyterNotebooks/**
exclude scripts/**
exclude qmflows.png
include src/qmflows/py.typed
include src/qmflows/data/dictionaries/*yaml
11 changes: 0 additions & 11 deletions linting_requirements.txt

This file was deleted.

105 changes: 105 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,108 @@
[build-system]
requires = [
"setuptools>=61.0",
"wheel>=0.21",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"

[project]
name = "qmflows"
dynamic = [
"version",
"readme",
]
description = "Automation of computations in quantum chemistry."
license = { file = "LICENSE.md" }
authors = [
{ name = "Felipe Zapata", email = "[email protected]" },
]
keywords = [
"chemistry",
"workflows",
"simulation",
"materials",
]
classifiers = [
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Chemistry",
"Typing :: Typed",
]
requires-python = ">=3.8"
dependencies = [
"more-itertools",
"h5py",
"numpy>=1.21",
"pandas",
"noodles>=0.3.3",
"plams==1.5.1",
"pyparsing!=3.0.0,<3.1.0",
"pyyaml>=5.1",
"filelock",
"packaging>=1.16.8",
]

[project.urls]
Homepage = "https://github.com/SCM-NV/qmflows"
"Bug Tracker" = "https://github.com/SCM-NV/qmflows/issues"
Documentation = "https://qmflows.readthedocs.io/en/latest/"

[project.optional-dependencies]
doc = [
"sphinx>=2.1,!=3.1.1",
"sphinx-autodoc-typehints",
"sphinx_rtd_theme",
"nbsphinx",
"jupyter",
"pandoc",
]
lint = [
"flake8",
"pydocstyle[toml]>=6.1",
"Flake8-pyproject>=1.2.2",
"mypy",
"types-PyYAML",
"types-setuptools",
"pytest>=6.0",
]
test = [
"qmflows[test-no-optional]",
"rdkit>=2018.03.1",
]
test-no-optional = [
"assertionlib>=3.1.0",
"pytest>=6.0",
"pytest-cov",
"pytest-mock",
"typing_extensions",
]

[tool.setuptools.packages.find]
where = ["src"]
include = ["qmflows*"]

[tool.setuptools.package-data]
FOX = [
"data/dictionaries/*yaml",
"py.typed",
]

[tool.setuptools.dynamic]
readme = { file = ["README.rst"], content-type = "text/x-rst" }

[tool.setuptools_scm]
write_to = "src/qmflows/_version.py"

[tool.mypy]
plugins = "numpy.typing.mypy_plugin"
show_error_codes = true
98 changes: 0 additions & 98 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/qmflows/__init__.py
Original file line number Diff line number Diff line change
@@ -7,8 +7,7 @@
import sys
from typing import TYPE_CHECKING

from ._version import __version__ as __version__
from ._version_info import version_info as version_info
from ._version import __version__, __version_tuple__

from ._logger import logger

@@ -28,6 +27,7 @@
_RDKIT_EX = None

__all__ = [
'__verion__', '__version_tuple__',
'logger',
'InitRestart',
'Angle', 'Dihedral', 'Distance', 'Settings',
3 changes: 0 additions & 3 deletions src/qmflows/_version.py

This file was deleted.

40 changes: 0 additions & 40 deletions src/qmflows/_version_info.py

This file was deleted.

16 changes: 0 additions & 16 deletions test/test_version.py

This file was deleted.