Skip to content

Commit

Permalink
examples: remove requirements-dev.txt files
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Oct 25, 2023
1 parent de6162f commit 7ceb552
Show file tree
Hide file tree
Showing 26 changed files with 56 additions and 54 deletions.
3 changes: 3 additions & 0 deletions examples/decorator/.template/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"

[project.optional-dependencies]
dev = ["pytest"]
7 changes: 3 additions & 4 deletions examples/decorator/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@


@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def python(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.run(".[dev]", "-vv")
session.run("pytest")
3 changes: 3 additions & 0 deletions examples/decorator/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]

[project.optional-dependencies]
dev = ["pytest"]
3 changes: 0 additions & 3 deletions examples/decorator/requirements-dev.txt

This file was deleted.

3 changes: 3 additions & 0 deletions examples/getitem/.template/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"

[project.optional-dependencies]
dev = ["pytest"]
7 changes: 3 additions & 4 deletions examples/getitem/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@


@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def python(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")
3 changes: 3 additions & 0 deletions examples/getitem/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]

[project.optional-dependencies]
dev = ["pytest"]
3 changes: 0 additions & 3 deletions examples/getitem/requirements-dev.txt

This file was deleted.

3 changes: 3 additions & 0 deletions examples/maturin-starter/.template/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"

[project.optional-dependencies]
dev = ["pytest"]
5 changes: 2 additions & 3 deletions examples/maturin-starter/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")
3 changes: 3 additions & 0 deletions examples/maturin-starter/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]

[project.optional-dependencies]
dev = ["pytest"]
3 changes: 0 additions & 3 deletions examples/maturin-starter/requirements-dev.txt

This file was deleted.

5 changes: 2 additions & 3 deletions examples/plugin/plugin_api/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop", "--features", "extension-module")
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")
3 changes: 3 additions & 0 deletions examples/plugin/plugin_api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]

[project.optional-dependencies]
dev = ["pytest"]
3 changes: 0 additions & 3 deletions examples/plugin/plugin_api/requirements-dev.txt

This file was deleted.

2 changes: 1 addition & 1 deletion examples/setuptools-rust-starter/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


@nox.session
def python(session):
def python(session: nox.Session):
session.install("-rrequirements-dev.txt")
session.run_always(
"pip", "install", "-e", ".", "--no-build-isolation", env={"BUILD_DEBUG": "1"}
Expand Down
3 changes: 3 additions & 0 deletions examples/string-sum/.template/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"

[project.optional-dependencies]
dev = ["pytest"]
7 changes: 3 additions & 4 deletions examples/string-sum/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@


@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def python(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")
5 changes: 4 additions & 1 deletion examples/string-sum/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["maturin>=1,<2"]
build-backend = "maturin"

[project]
name = "string sum"
name = "string_sum"
version = "0.1.0"
classifiers = [
"License :: OSI Approved :: MIT License",
Expand All @@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]

[project.optional-dependencies]
dev = ["pytest"]
3 changes: 0 additions & 3 deletions examples/string-sum/requirements-dev.txt

This file was deleted.

1 change: 1 addition & 0 deletions examples/word-count/.template/pre-script.rhai
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
variable::set("PYO3_VERSION", "0.20.0");
file::rename(".template/Cargo.toml", "Cargo.toml");
file::rename(".template/pyproject.toml", "pyproject.toml");
file::delete(".template");
6 changes: 5 additions & 1 deletion examples/word-count/.template/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[build-system]
requires = ["setuptools>=41.0.0", "wheel", "setuptools_rust>=1.0.0"]
requires = ["maturin>=1,<2"]
build-backend = "maturin"

[project]
name = "{{project-name}}"
version = "0.1.0"

[project.optional-dependencies]
dev = ["pytest"]

[tool.pytest.ini_options]
addopts = "--benchmark-disable"
9 changes: 0 additions & 9 deletions examples/word-count/.template/setup.cfg

This file was deleted.

13 changes: 6 additions & 7 deletions examples/word-count/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@


@nox.session
def test(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def test(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")


@nox.session
def bench(session):
session.install("-rrequirements-dev.txt")
session.install(".")
def bench(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest", "--benchmark-enable")
2 changes: 2 additions & 0 deletions examples/word-count/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ classifiers = [
"Operating System :: MacOS :: MacOS X",
]

[project.optional-dependencies]
dev = ["pytest", "pytest-benchmark"]

[tool.pytest.ini_options]
addopts = "--benchmark-disable"
2 changes: 0 additions & 2 deletions examples/word-count/requirements-dev.txt

This file was deleted.

0 comments on commit 7ceb552

Please sign in to comment.