diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 63498e8..5ae1096 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -13,26 +13,21 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # fetch the entire repo history, required to guarantee setuptools_scm will pick up tags - - - uses: actions/setup-python@v2 - name: Install Python + - uses: actions/setup-python@v5 with: - python-version: '3.9' - + python-version: '3.13' - run: pip install build twine - - name: Build sdist and wheel run: python -m build - - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: | dist/*.tar.gz dist/*.whl - + # Check that the distributions would be valid on PyPI - run: twine check --strict dist/* upload_pypi: @@ -41,12 +36,13 @@ jobs: # upload to PyPI when a GitHub Release is created if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: artifact path: dist + merge-multiple: true # download and extract all artifacts in the same directory - - uses: pypa/gh-action-pypi-publish@v1.4.2 + - uses: pypa/gh-action-pypi-publish@v1.8.11 with: user: __token__ password: ${{ secrets.PYPI_SCHEIL_TOKEN }} diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 80bfb4e..1ee6197 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -1,8 +1,5 @@ name: Scheil tests - -on: - push: - pull_request: +on: [push, pull_request] jobs: Tests: @@ -11,21 +8,18 @@ jobs: fail-fast: false max-parallel: 100 matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] pycalphad_develop_version: [true, false] - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 with: - fetch-depth: 0 # fetch the entire repo history, required to guarantee setuptools_scm will pick up tags - - name: Set up Python - uses: actions/setup-python@v2 + fetch-depth: 0 # fetch the entire repo history, required to guarantee versioneer will pick up the tags + - uses: astral-sh/setup-uv@v6 with: python-version: ${{ matrix.python-version }} - - run: python -m pip install -U pip setuptools - - name: Install pycalphad development version - if: matrix.pycalphad_develop_version - run: python -m pip install git+https://github.com/pycalphad/pycalphad.git@develop - - run: python -m pip install --editable .[dev] - - run: python -m pip list - - run: python -m pytest -v + enable-cache: true + - if: ${{ ! matrix.pycalphad_develop_version }} + run: uv sync --dev + - if: ${{ matrix.pycalphad_develop_version }} + run: uv sync --dev -P "pycalphad @ git+https://github.com/pycalphad/pycalphad.git@develop" + - run: uv run pytest -v diff --git a/pyproject.toml b/pyproject.toml index a25663c..8725d33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,52 @@ requires = [ ] build-backend = "setuptools.build_meta" +[project] +name = "scheil" +authors = [ + {name = "Brandon Bocklund", email = "brandonbocklund@gmail.com"}, +] +description = "Scheil-Gulliver simulations using pycalphad." +readme = {file = "README.rst", content-type = "text/x-rst"} +license = {text = "MIT"} +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Scientific/Engineering :: Chemistry", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", +] +requires-python = ">=3.11" +dependencies = [ + "numpy", + "pycalphad>=0.11.0", + "setuptools_scm[toml]>=6.0", + "scipy", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://scheil.readthedocs.io" + +[project.optional-dependencies] +dev = [ + "furo", + "ipython", + "pytest", + "sphinx", + "twine", +] + +[dependency-groups] +dev = [ + "furo", + "ipython", + "pytest", + "sphinx", + "twine", +] + [tool.pytest.ini_options] norecursedirs = ["scheil/_dev"] addopts = "--doctest-modules" @@ -14,4 +60,4 @@ testpaths = [ "tests", ] -[tool.setuptools_scm] \ No newline at end of file +[tool.setuptools_scm] diff --git a/setup.py b/setup.py deleted file mode 100644 index 61edeef..0000000 --- a/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -from setuptools import setup -import os - -def readme(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() - -setup( - name='scheil', - author='Brandon Bocklund', - author_email='brandonbocklund@gmail.com', - description='Scheil-Gulliver simulations using pycalphad.', - packages=['scheil'], # do not include _dev - license='MIT', - long_description=readme('README.rst'), - long_description_content_type='text/x-rst', - url='https://scheil.readthedocs.io/', - install_requires=[ - 'numpy', - 'scipy', - 'setuptools_scm[toml]>=6.0', - 'pycalphad>=0.11.0', - ], - extras_require={ - 'dev': [ - 'furo', - 'sphinx', - 'pytest', - 'twine', - ], - }, - classifiers=[ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - 'Development Status :: 4 - Beta', - - 'Intended Audience :: Science/Research', - 'Topic :: Scientific/Engineering :: Physics', - 'Topic :: Scientific/Engineering :: Chemistry', - - 'License :: OSI Approved :: MIT License', - - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - ], -)