diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 6c7b9df..79055f2 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -21,10 +21,9 @@ jobs: sudo apt-get install libopenblas-dev python -m pip install --upgrade pip python -m pip install scipy==1.8.0 - python -m pip install -r requirements_dev.txt - name: Setup pyVBRc run: | - python -m pip install -e . + python -m pip install -e .[dev] - name: Run Tests run: pytest --cov=./ --cov-report=xml:coverage/coverage.xml -v pyVBRc/ # https://github.com/marketplace/actions/codecov#example-workflowyml-with-codecov-action diff --git a/.github/workflows/pypi-release.yaml b/.github/workflows/pypi-release.yaml index 29a4cc2..8d2b5af 100644 --- a/.github/workflows/pypi-release.yaml +++ b/.github/workflows/pypi-release.yaml @@ -21,7 +21,7 @@ jobs: python -m pip install --upgrade pip python -m pip install -U setuptools setuptools_scm wheel twine - name: Build and check source tarball - run: python setup.py sdist bdist_wheel + run: python _old_setup_py.txt sdist bdist_wheel - name: Twine check run: twine check dist/* - name: Publish distribution to PyPI diff --git a/MANIFEST.in b/MANIFEST.in index 0126f57..81dc02e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,9 +10,10 @@ include *.txt include Makefile recursive-include * *.m +recursive-include pyVBRc *.mat +recursive-include pyVBRc *.py recursive-exclude * __pycache__ recursive-exclude * *.py[co] -recursive-exclude * *.mat recursive-exclude examples *.mat recursive-exclude examples *.png include examples *.ipynb diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1e11d41 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "pyVBRc" +version = "0.1.1" +authors = [ + { name="Chris Havlin", email="chris.havlin@gmail.com" }, +] +description="python utilities for working with the VBRc" +readme = "README.md" +requires-python = ">=3.9" +classifiers=[ + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", +] +dependencies=["numpy", + "scipy", + "matplotlib", + "packaging", + "unyt", + ] + +[tool.setuptools] +packages = ["pyVBRc"] + +[project.urls] +"Homepage" = "https://github.com/vbr-calc/pyVBRc" +"Bug Tracker" = "https://github.com/vbr-calc/pyVBRc/issues" + +[project.optional-dependencies] +dev = [ + "pytest>=3", + "pytest-cov", + "pre-commit", +] +lint = [ + "black==22.8.0", + "isort==5.12.0", + "flake8==6.0.0" +] diff --git a/release_history.md b/release_history.md index 080c74e..cc401ea 100644 --- a/release_history.md +++ b/release_history.md @@ -1,3 +1,9 @@ +# v0.1.2 + +maintenance release +* full switch to pyproject +* docs improvements + # v0.1.1 Initial release of pyVBRc, still experimental diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 0de0154..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -numpy -scipy -matplotlib -packaging -unyt diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index fae8ee6..0000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,5 +0,0 @@ -pip>=21.1 -wheel==0.33.6 -twine==1.14.0 -pytest -pytest-cov diff --git a/requirements_style.txt b/requirements_style.txt deleted file mode 100644 index ced1c74..0000000 --- a/requirements_style.txt +++ /dev/null @@ -1,4 +0,0 @@ -pre-commit -black==22.8.0 -isort==5.12.0 -flake8==6.0.0 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b8a1655..0000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[bdist_wheel] -universal = 1 - diff --git a/setup.py b/setup.py deleted file mode 100644 index 947b615..0000000 --- a/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python - -"""The setup script.""" - -from setuptools import find_packages, setup - -with open("README.md") as readme_file: - readme = readme_file.read() - -with open("requirements.txt") as reqs_file: - requirements = [line.strip() for line in reqs_file.readlines()] - -test_requirements = [ - "pytest>=3", -] - -setup( - author="Chris Havlin", - author_email="chris.havlin@gmail.com", - python_requires=">=3.9", - classifiers=[ - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], - description="python utilities for working with the VBRc", - entry_points={ - "console_scripts": [ - "pyVBRc=pyVBRc.cli:main", - ], - }, - install_requires=requirements, - license="MIT license", - long_description=readme, - long_description_content_type="text/markdown", - include_package_data=True, - package_data={"": ["sample_data/*.mat"]}, - keywords="pyVBRc", - name="pyVBRc", - packages=find_packages(include=["pyVBRc", "pyVBRc.*"]), - test_suite="tests", - tests_require=test_requirements, - url="https://github.com/vbr-calc/pyVBRc", - version="0.1.1", -)