diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89e032a..cd1153f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,28 +12,33 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - python-version: [3.6, 3.7, 3.8] + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel - pip install --no-cache-dir -e .[test] - pip list + python -m pip install --upgrade '.[test]' + python -m pip list + - name: Lint with Flake8 - if: matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' run: | flake8 --exclude=tests/* --ignore=E501,W503 + - name: Test with pytest run: | - python -m pytest + pytest + - name: Report coverage with Codecov - if: github.event_name == 'push' && matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest' + if: github.event_name == 'push' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v1 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..77a10e4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,65 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "make-it-sync" +version = "1.0.0" +description = "Create a sync version of an async function" +readme = "README.md" +requires-python = ">=3.7" +license = "MIT" +keywords = [] +authors = [ + { name = "Gordon Watts", email = "gwatts@uw.edu" }, +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Topic :: Software Development", + "Topic :: Utilities", + "Programming Language :: Python", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", +] +dependencies = [] + +[project.urls] +Documentation = "https://github.com/gordonwatts/make-it-sync" +Homepage = "https://github.com/gordonwatts/make-it-sync" +Issues = "https://github.com/gordonwatts/make-it-sync/issues" +"Release Notes" = "https://github.com/gordonwatts/make-it-sync/releases" +"Releases" = "https://github.com/gordonwatts/make-it-sync/releases" +"Source Code" = "https://github.com/gordonwatts/make-it-sync" + +[project.optional-dependencies] +test = [ + "pytest>=3.9", + "pytest-asyncio", + "pytest-mock", + "pytest-cov", + "coverage", + "flake8", + "codecov", + "autopep8", + "build", + "twine", + "wheel", +] + +[tool.hatch.build.targets.sdist] +# hatchling always includes: +# pyproject.toml, .gitignore, any README, any LICENSE, AUTHORS +include = [ + "/make_it_sync/", + "/tests/" +] + +[tool.hatch.build.targets.wheel] +packages = ["make_it_sync"] diff --git a/setup.py b/setup.py deleted file mode 100644 index d3444f4..0000000 --- a/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -# setuptools loads some plugins necessary for use here. -from setuptools import find_packages # noqa: F401 -from distutils.core import setup - -# Use the readme as the long description. -with open("README.md", "r") as fh: - long_description = fh.read() - -setup(name="make-it-sync", - version='1.0.0', - packages=['make_it_sync'], - scripts=[], - description="Create a sync version of an async function", - long_description=long_description, - long_description_content_type="text/markdown", - author="G. Watts (IRIS-HEP/UW Seattle)", - author_email="gwatts@uw.edu", - maintainer="Gordon Watts (IRIS-HEP/UW Seattle)", - maintainer_email="gwatts@uw.edu", - url="https://github.com/gordonwatts/make-it-sync", - license="MIT", - python_requires='>=3.6', - test_suite="tests", - install_requires=[ - ], - extras_require={ - 'test': [ - 'pytest>=3.9', - 'pytest-asyncio', - 'pytest-mock', - 'pytest-cov', - 'coverage', - 'flake8', - 'codecov', - 'autopep8', - 'twine', - 'wheel' - ], - }, - classifiers=[ - "Development Status :: 3 - Alpha", - # "Development Status :: 4 - Beta", - # "Development Status :: 5 - Production/Stable", - # "Development Status :: 6 - Mature", - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "Programming Language :: Python", - "Topic :: Software Development", - "Topic :: Utilities", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - ], - platforms="Any", - )