Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate setup.py to pyproject.toml #950

Merged
merged 11 commits into from
Oct 9, 2024
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow runs only on Ubuntu and aims to be more complete than the Mac and Windows workflows.
# In particular, Openbabel and many of the external command line dependencies are included for testing.defaults:
# This workflow runs only on Ubuntu and aims to be more complete than the MacOS and Windows workflows.
# In particular, Open Babel and many of the external command line dependencies are included for testing.defaults:
# The ext package is also only tested in this workflow. Coverage is also computed based on this platform.
name: Testing

Expand Down Expand Up @@ -61,14 +61,14 @@ jobs:

- name: Install Python dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools setuptools setuptools_scm
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools
python${{ matrix.python-version }} -m piptools sync --user requirements/ubuntu-latest_py${{ matrix.python-version }}.txt
# Using non-editable install for testing building of MANIFEST files
python${{ matrix.python-version }} -m pip install --no-deps .
python${{ matrix.python-version }} -m pip install pre-commit

- name: linting
run: |
python${{ matrix.python-version }} -m pip install pre-commit
pre-commit run --all-files

- name: Run tests
Expand All @@ -78,7 +78,6 @@ jobs:
- name: Build package
if: matrix.python-version == 3.9
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip build setuptools setuptools_scm wheel
python${{ matrix.python-version }} -m build

auto-gen-release:
Expand Down
71 changes: 68 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,74 @@
[build-system]
requires = [
"setuptools>=43.0.0",
]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "matminer"
description = "matminer is a library that contains tools for data mining in Materials Science"
readme = "README.md"
license = {text = "modified BSD"}
keywords = ["data mining", "materials science", "scientific tools"]
authors = [
{ name = "Anubhav Jain", email = "[email protected]" }
]
requires-python = ">=3.9"
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Operating System :: OS Independent",
"Topic :: Other/Nonlisted Topic",
"Topic :: Scientific/Engineering",
]
dependencies = [
"numpy>=1.23",
"requests~=2.31",
"pandas>=1.5, <3",
"tqdm~=4.66",
"pymongo~=4.5",
"scikit-learn~=1.3",
"sympy~=1.11",
"monty>=2023",
"pymatgen>=2023",
]

[project.urls]
"Homepage" = "https://github.com/hackingmaterials/matminer"


[project.optional-dependencies]
mpds = ["ujson", "jmespath", "httplib2", "ase", "jsonschema"]
dscribe = ["dscribe~=2.1"]
mdfforge = ["mdf-forge"]
aflow = ["aflow"]
citrine = ["citrination-client"]
dev = [
"pytest",
"pytest-cov",
"pytest-timeout",
"coverage",
"coveralls",
"flake8",
"black",
"pylint",
"sphinx"
]
tests = ["matminer[mpds,describe,mdfforge,aflow,citrine,dev]"]

[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"

[tool.setuptools.packages.find]
where = ["matminer"]

[tool.pytest.ini_options]
testpaths = ["matminer"]

[tool.black]
line-length = 120
Expand Down
84 changes: 0 additions & 84 deletions setup.py

This file was deleted.

Loading