From 14a1d9873eedf4f62083b7210052debf64037209 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 21 Jan 2025 08:18:22 -0700 Subject: [PATCH] try updating some things in prep for release --- .github/workflows/release.yml | 4 ++-- LICENSE | 2 +- pyproject.toml | 34 ++++++++++++++++++++++++++++++++++ scp/__init__.py | 4 +++- setup.cfg | 2 -- setup.py | 25 ------------------------- 6 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ab1bd3..3306ac7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,11 +19,11 @@ jobs: - name: Install Pip Dependencies shell: bash - run: pip install wheel setuptools + run: pip install build wheel - name: Build the Wheel shell: bash - run: rm -rf dist/ build/ && python3 setup.py bdist_wheel sdist + run: rm -rf dist/ build/ && python3 -m build - name: Deploy on PyPi uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/LICENSE b/LICENSE index b71bf7e..5e6afc7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2024, Matt Mitchell +Copyright (c) 2025, Matt Mitchell All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..425bef8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,34 @@ +[project] +name = "ghedesigner" +version = "1.3" +description = "Fluid property routines for secondary coolants based on correlations developed by Åke Melinder, 2010 \"Properties of Secondary Working Fluids for Indirect Systems\" 2nd ed., International Institute of Refrigeration." +authors = ["Matt Mitchell "] +readme = "README.md" +license = "BSD-3-Clause" +dependencies = [ + "click>=8.1" +] + +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "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", + "Topic :: Scientific/Engineering", +] + +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[project.scripts] +scprop = "scp:cli:cli" + +[tool.pytest.ini_options] +minversion = "6.0" +testpaths = "tests" +# Manually add these flags to `pytest` when running locally for coverage details. +addopts = ["--cov=scp", "--cov-report=html"] diff --git a/scp/__init__.py b/scp/__init__.py index 5ce0602..232d1b8 100644 --- a/scp/__init__.py +++ b/scp/__init__.py @@ -1 +1,3 @@ -VERSION = "1.2" +import importlib.metadata + +VERSION = importlib.metadata.version(__package__) diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index af0d138..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[tool:pytest] -addopts = --cov=scp diff --git a/setup.py b/setup.py deleted file mode 100644 index 74e95c9..0000000 --- a/setup.py +++ /dev/null @@ -1,25 +0,0 @@ -import pathlib - -from setuptools import setup - -from scp import VERSION - -readme_file = pathlib.Path(__file__).parent.resolve() / 'README.md' -readme_contents = readme_file.read_text() - -setup( - name="SecondaryCoolantProps", - version=VERSION, - packages=['scp'], - description="A collection of secondary coolant fluid property functions and classes", - install_requires=['click'], - long_description=readme_contents, - long_description_content_type='text/markdown', - author='Matt Mitchell', - author_email='mitchute@gmail.com', - url='https://github.com/mitchute/SecondaryCoolantProps', - license='BSD license', - entry_points={ - 'console_scripts': ['scprop=scp.cli:cli'] - } -)