diff --git a/docs/conf.py b/docs/conf.py index 73e713e..9030952 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,11 +12,20 @@ # import os import sys +import tomli sys.path.insert(0, os.path.abspath('..')) # -- General configuration --------------------------------------------------- +with open("../../pyproject.toml", "rb") as f: + py_project = tomli.load(f) +project = py_project['tool']['poetry']['name'] +copyright = u'2022, Daniel Tchoń' +author = 'Daniel Tchoń' +version = py_project['tool']['poetry']['version'] +release = py_project['tool']['poetry']['version'] + # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. diff --git a/pyproject.toml b/pyproject.toml index fbc4698..2a048f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,32 @@ [tool.poetry] name = "hikari" -version = "0.3.0" +version = "0.2.3" description = "A high-level tool for manipulating crystallographic files" -authors = ["Daniel Tchoń"] +authors = ["Daniel Tchoń "] license = "MIT" readme = "README.md" +include = ['hikari/resources/*'] +classifiers = [ + 'Development Status :: 3 - Alpha', + 'Environment :: Console', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3 :: Only', + 'Topic :: Scientific/Engineering', + 'Topic :: Scientific/Engineering :: Chemistry', + 'Topic :: Scientific/Engineering :: Physics', +] + [tool.poetry.dependencies] python = ">=3.9" numpy = ">=1.25" @@ -27,6 +48,7 @@ sphinx-rtd-theme = ">=3" jupyter = ">=1.1" python-semantic-release = {version = "^9.11.1", python = "^3.8"} docutils = "!=0.21.post1" +tomli = ">= 2" [tool.semantic_release] version_toml = ["pyproject.toml:tool.poetry.version", ] # version location diff --git a/setup.py b/setup.py deleted file mode 100644 index 773adb1..0000000 --- a/setup.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import io -import os -import sys -from setuptools import setup, find_packages - -# Version control -python_requires = '>=3.9' -MIN_VERSION = (3, 9) -error_msg = ('This package requires Python %d.%d or higher.' % MIN_VERSION) -try: - if sys.version_info < MIN_VERSION: - sys.exit(error_msg) -except AttributeError: # sys.version_info was introduced in Python 2.0 - sys.exit(error_msg) - - -# Defining constants, file paths, README contents etc. -HERE = os.path.abspath(os.path.dirname(__file__)) -SHORT_DESCRIPTION = 'A high-level tool for manipulating crystallographic files' -with io.open(os.path.join(HERE, "README.md"), encoding="utf-8") as f: - LONG_DESCRIPTION = "\n" + f.read() - -setup( - name='hikari-toolkit', - version='0.2.3', - author='Daniel Tchoń', - author_email='dtchon@chem.uw.edu.pl', - packages=find_packages(exclude=('legacy', )), - package_data={'': ['*.csv', '*.dic', '*.gnu', 'hkl.msd', '*.json', - '*.wsv', 'NaCl.cif', 'NaCl.fcf', 'NaCl.hkl', - 'NaCl.lst', 'NaCl.res']}, - url='https://github.com/Baharis/hikari', - license='MIT', - description=SHORT_DESCRIPTION, - long_description_content_type='text/markdown', - long_description=LONG_DESCRIPTION, - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Environment :: Console', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Programming Language :: Python :: 3 :: Only', - 'Topic :: Scientific/Engineering', - 'Topic :: Scientific/Engineering :: Chemistry', - 'Topic :: Scientific/Engineering :: Physics' - ], - install_requires=[ - 'matplotlib>=3.0.0,!=3.3.*', - 'numpy>=1.18.1', - 'pandas>=1.0.1', - 'seaborn>=0.11.0', - 'scipy>=1.5.1', - 'uncertainties>=3.*', - ] -)