diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f2f0eab..2808367 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -26,15 +26,21 @@ jobs: run: | python -m pip install --upgrade pip - - name: Install dependencies + - name: Install dependencies with the compiled requirements (for Python 3.12) + if: ${{matrix.python-version == '3.12'}} run: | - pip install -e .[dev] + pip install -r requirements.txt -e .[dev] - - name: Lint + - name: Install dependencies based on the pyproject.toml file (for older Python versions) + if: ${{matrix.python-version != '3.12'}} run: | - black --check . - mypy . + pip install -e .[dev] - name: Test with pytest run: | pytest + + - name: Lint + run: | + black --check . + mypy . diff --git a/pyproject.toml b/pyproject.toml index 374b58c..e40a4d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,51 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel" -] +requires = ["setuptools>=64.0", "setuptools_scm>=8"] build-backend = "setuptools.build_meta" + +[project] +name = "alitra" +authors = [{ name = "Equinor ASA", email = "fg_robots_dev@equinor.com" }] +description = "Simple alignment and transformation between coordinate frames" +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "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", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Software Development :: Libraries", +] +dependencies = ["dacite", "scipy", "numpy"] +dynamic = ["version"] + +[project.urls] +repository = "https://github.com/equinor/alitra.git" + +[project.optional-dependencies] +dev = ["black", "mypy", "pip-tools", "pre-commit", "pytest"] + +[tool.setuptools_scm] +# This section is empty but required for dynamic versioning. + +[tool.mypy] +no_strict_optional = true +no_site_packages = true +ignore_missing_imports = true +exclude = ["build"] +files = ["src", "tests"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +log_cli = true + +[tool.black] +line_length = 88 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 11bf1fd..0000000 --- a/setup.cfg +++ /dev/null @@ -1,11 +0,0 @@ -[tool:isort] -line_length = 88 -multi_line_output = 3 -include_trailing_comma = True -force_grid_wrap = 0 -use_parentheses = True - -[mypy] -follow_imports = normal -no_strict_optional = True -ignore_missing_imports = True diff --git a/setup.py b/setup.py deleted file mode 100644 index e751726..0000000 --- a/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -from setuptools import find_packages, setup - -setup( - name="alitra", - description="Simple alignment and transformation between coordinate frames", - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - version="1.1.3", - author="Equinor ASA", - author_email="arnts@equinor.com, euel@equinor.com, chjo@equinor.com", - license="MIT", - url="https://github.com/equinor/alitra", - packages=find_packages(where="src"), - package_dir={"": "src"}, - classifiers=[ - "Environment :: Other Environment", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python", - "Topic :: Scientific/Engineering", - "Topic :: Scientific/Engineering :: Physics", - "Topic :: Software Development :: Libraries", - ], - include_package_data=True, - install_requires=["scipy", "numpy", "dacite"], - python_requires=">=3.8", - extras_require={"dev": ["pytest", "black", "mypy", "pre-commit"]}, -)