Skip to content

Commit 87862e1

Browse files
authored
Switch to pyproject.toml (#174)
1 parent b9574fb commit 87862e1

File tree

4 files changed

+54
-45
lines changed

4 files changed

+54
-45
lines changed

.circleci/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# Download and cache dependencies
2727
- restore_cache:
2828
keys:
29-
- v2-dependencies-{{ checksum "setup.py" }}
29+
- v2-dependencies-{{ checksum "pyproject.toml" }}
3030
# fallback to using the latest cache if no exact match is found
3131
- v2-dependencies-
3232

@@ -45,7 +45,7 @@ jobs:
4545
- save_cache:
4646
paths:
4747
- ./venv
48-
key: v2-dependencies-{{ checksum "setup.py" }}
48+
key: v2-dependencies-{{ checksum "pyproject.toml" }}
4949

5050
- restore_cache:
5151
keys:
@@ -99,7 +99,7 @@ jobs:
9999
# Download and cache dependencies
100100
- restore_cache:
101101
keys:
102-
- v2-dependencies-{{ checksum "setup.py" }}
102+
- v2-dependencies-{{ checksum "pyproject.toml" }}
103103
# fallback to using the latest cache if no exact match is found
104104
- v2-dependencies-
105105

@@ -112,7 +112,7 @@ jobs:
112112
- save_cache:
113113
paths:
114114
- ./venv
115-
key: v2-dependencies-{{ checksum "setup.py" }}
115+
key: v2-dependencies-{{ checksum "pyproject.toml" }}
116116

117117
- run:
118118
name: Run tests

pyproject.toml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pyadjoint-ad"
7+
version = "2023.0.0"
8+
dependencies = [
9+
"checkpoint_schedules",
10+
"scipy>=1.0",
11+
]
12+
authors = [
13+
{name = "Jørgen S. Dokken", email = "dokken@simula.no"},
14+
]
15+
description = "High-level automatic differentiation library"
16+
readme = "README.md"
17+
license = {file = "LICENSE"}
18+
classifiers = [
19+
"Programming Language :: Python",
20+
]
21+
22+
[project.urls]
23+
Repository = "https://github.com/dolfin-adjoint/pyadjoint.git"
24+
25+
[project.optional-dependencies]
26+
all = [
27+
"coverage",
28+
"flake8",
29+
"meshio",
30+
"moola>=0.1.6",
31+
"networkx",
32+
"protobuf",
33+
"pygmsh",
34+
"pygraphviz",
35+
"pytest>=3.10",
36+
"sphinx",
37+
"sphinx-autobuild",
38+
"sphinxcontrib-bibtex",
39+
"tensorflow",
40+
]
41+
doc = ["sphinx", "sphinx-autobuild", "sphinxcontrib-bibtex"]
42+
meshing = ["pygmsh", "meshio"]
43+
moola = ["moola>=0.1.6"]
44+
test = ["pytest>=3.10", "flake8", "coverage"]
45+
visualisation = ["tensorflow", "protobuf", "networkx", "pygraphviz"]
46+
47+
48+
[tool.setuptools]
49+
packages = ["firedrake_adjoint", "numpy_adjoint", "pyadjoint"]

setup.cfg

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
[metadata]
2-
name = dolfin-adjoint
3-
description=High-level automatic differentiation library,
4-
long_description = file: README.md
5-
long_description_content_type = text/markdown
6-
url = https://github.com/dolfin-adjoint/pyadjoint
7-
author= Jørgen S. Dokken,
8-
author_email= dokken@simula.no,
9-
license = LGPL-3.0
10-
license_files = LICENSE
11-
121
[flake8]
132
exclude = .git,__pycache__,docs/,examples/,tests/,scripts/
143
max-line-length = 119
15-
ignore=E731,W503,F405
4+
ignore=E731,W503,F405

setup.py

-29
This file was deleted.

0 commit comments

Comments
 (0)