diff --git a/README.rst b/README.rst index db1ebbf..8680298 100644 --- a/README.rst +++ b/README.rst @@ -52,9 +52,11 @@ of the project:: Testing ======= -The regression testsuite utilizes the `pytest` framework and may be executed by +The regression testsuite utilizes the `pytest` framework and may be installed +and executed by :: + pip install .[test] python -m pytest --basetemp=Testing Documentation diff --git a/pyproject.toml b/pyproject.toml index 5ce2510..a1a38d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,30 @@ -[build-system] -requires = ['setuptools', 'wheel', 'pytest', 'numpy', 'h5py', 'ase'] -build-backend = 'setuptools.build_meta' \ No newline at end of file +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "fortnet-python" +version = "0.4" +authors = [{name = "T. W. van der Heide"},] +dependencies = ["numpy", "h5py", "ase"] +requires-python = ">=3.10" +description = "Python Tools for the Fortnet Software Package" +readme = {file = "README.rst", content-type = "text/x-rst"} +license = {text = "BSD"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3", + "Environment :: Console", + "Operating System :: OS Independent", + "Topic :: Scientific/Engineering", +] + +[project.urls] +Homepage = "https://github.com/vanderhe/fortnet-python" +Documentation = "https://fortnet.readthedocs.io/en/latest/fortformat/index.html" +Repository = "https://github.com/vanderhe/fortnet-python.git" +Issues = "https://github.com/vanderhe/fortnet-python/issues" + +[project.optional-dependencies] +test = ["pytest",] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 1ee629c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,35 +0,0 @@ -[metadata] -name = fortnet-python -version = 0.4 -author = T. W. van der Heide -author_email = vanderhe@uni-bremen.de -url = https://github.com/vanderhe/fortnet-python -description = Python Tools for the Fortnet Software Package -long_description = file: README.rst -long_description_content_type = text/x-rst -license = BSD -license_file = LICENSE -platform = any -classifiers = - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - -[options] -include_package_data = True -package_dir = - = src -packages = fortformat -install_requires = - wheel - setuptools - pytest - numpy - h5py - ase - -[options.packages.find] -where = src diff --git a/setup.py b/setup.py deleted file mode 100644 index 7c3378a..0000000 --- a/setup.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 - -''' -Legacy setup.py file that gathers its -configuration from setup.cfg and pyproject.toml -''' - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - - -if __name__ == '__main__': - setup() diff --git a/src/fortformat/fnetdata.py b/src/fortformat/fnetdata.py index 066d1c7..cf8921c 100644 --- a/src/fortformat/fnetdata.py +++ b/src/fortformat/fnetdata.py @@ -192,7 +192,7 @@ def _process_data(self): pos = np.where( unique_global_zz == data[isys]['atomicnumbers'][iatom]) # Fortran indexing starts at 1 - data[isys]['localattoglobalsp'][iatom] = pos[0] + 1 + data[isys]['localattoglobalsp'][iatom] = pos[0].item() + 1 return data, unique_global_zz