Skip to content

Commit

Permalink
Switch to pyproject.toml (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward authored Nov 6, 2024
1 parent b9574fb commit 87862e1
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 45 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-{{ checksum "setup.py" }}
- v2-dependencies-{{ checksum "pyproject.toml" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-

Expand All @@ -45,7 +45,7 @@ jobs:
- save_cache:
paths:
- ./venv
key: v2-dependencies-{{ checksum "setup.py" }}
key: v2-dependencies-{{ checksum "pyproject.toml" }}

- restore_cache:
keys:
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-{{ checksum "setup.py" }}
- v2-dependencies-{{ checksum "pyproject.toml" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-

Expand All @@ -112,7 +112,7 @@ jobs:
- save_cache:
paths:
- ./venv
key: v2-dependencies-{{ checksum "setup.py" }}
key: v2-dependencies-{{ checksum "pyproject.toml" }}

- run:
name: Run tests
Expand Down
49 changes: 49 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "pyadjoint-ad"
version = "2023.0.0"
dependencies = [
"checkpoint_schedules",
"scipy>=1.0",
]
authors = [
{name = "Jørgen S. Dokken", email = "[email protected]"},
]
description = "High-level automatic differentiation library"
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python",
]

[project.urls]
Repository = "https://github.com/dolfin-adjoint/pyadjoint.git"

[project.optional-dependencies]
all = [
"coverage",
"flake8",
"meshio",
"moola>=0.1.6",
"networkx",
"protobuf",
"pygmsh",
"pygraphviz",
"pytest>=3.10",
"sphinx",
"sphinx-autobuild",
"sphinxcontrib-bibtex",
"tensorflow",
]
doc = ["sphinx", "sphinx-autobuild", "sphinxcontrib-bibtex"]
meshing = ["pygmsh", "meshio"]
moola = ["moola>=0.1.6"]
test = ["pytest>=3.10", "flake8", "coverage"]
visualisation = ["tensorflow", "protobuf", "networkx", "pygraphviz"]


[tool.setuptools]
packages = ["firedrake_adjoint", "numpy_adjoint", "pyadjoint"]
13 changes: 1 addition & 12 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
[metadata]
name = dolfin-adjoint
description=High-level automatic differentiation library,
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/dolfin-adjoint/pyadjoint
author= Jørgen S. Dokken,
author_email= [email protected],
license = LGPL-3.0
license_files = LICENSE

[flake8]
exclude = .git,__pycache__,docs/,examples/,tests/,scripts/
max-line-length = 119
ignore=E731,W503,F405
ignore=E731,W503,F405
29 changes: 0 additions & 29 deletions setup.py

This file was deleted.

0 comments on commit 87862e1

Please sign in to comment.