Skip to content

Commit 1355b7b

Browse files
authored
Merge pull request #11 from python-project-templates/tkp/rename
rename project
2 parents db4d6eb + 04579a3 commit 1355b7b

File tree

13 files changed

+80
-80
lines changed

13 files changed

+80
-80
lines changed

.copier-answers.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 33cc159
2+
_commit: 65b6f3e
33
_src_path: https://github.com/python-project-templates/base.git
44
add_extension: rust
55
66
github: python-project-templates
77
project_description: A Rust-Python project template
8-
project_name: rust template
8+
project_name: python template rust
99
python_version_primary: '3.9'
1010
team: Python Project Template Authors

Cargo.lock

+34-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[package]
2-
name = "rust_template_py"
2+
name = "python_template_rust_py"
33
version = "0.1.0"
44
edition = "2021"
55
publish = false
66

77
[lib]
8-
name = "rust_template"
8+
name = "python_template_rust"
99
path = "src/lib.rs"
1010
crate-type = ["cdylib"]
1111

1212
[dependencies]
13-
rust_template = { path = "./rust", version = "*" }
13+
python_template_rust = { path = "./rust", version = "*" }
1414
pyo3 = { version = "0.22", features = ["abi3-py39", "extension-module", "multiple-pymethods"] }
1515
strum = "0.24.1"
1616

Makefile

+9-9
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ install: ## install python library
2828

2929
UNAME := $(shell uname)
3030
ifeq ($(UNAME), Darwin)
31-
_CP_COMMAND := cp target/debug/librust_template.dylib rust_template/rust_template.abi3.so
31+
_CP_COMMAND := cp target/debug/libpython_template_rust.dylib python_template_rust/python_template_rust.abi3.so
3232
else
33-
_CP_COMMAND := cp target/debug/librust_template.so rust_template/rust_template.abi3.so
33+
_CP_COMMAND := cp target/debug/libpython_template_rust.so python_template_rust/python_template_rust.abi3.so
3434
endif
3535

3636
#########
3737
# LINTS #
3838
#########
3939
.PHONY: lint-py lint-rust lint lints
4040
lint-py: ## run python linter with ruff
41-
python -m ruff check rust_template
42-
python -m ruff format --check rust_template
41+
python -m ruff check python_template_rust
42+
python -m ruff format --check python_template_rust
4343

4444
lint-rust: ## run rust linter
4545
make -C rust lint
@@ -51,8 +51,8 @@ lints: lint
5151

5252
.PHONY: fix-py fix-rust fix format
5353
fix-py: ## fix python formatting with ruff
54-
python -m ruff check --fix rust_template
55-
python -m ruff format rust_template
54+
python -m ruff check --fix python_template_rust
55+
python -m ruff format python_template_rust
5656

5757
fix-rust: ## fix rust formatting
5858
make -C rust fix
@@ -76,20 +76,20 @@ checks: check-manifest
7676
check: checks
7777

7878
annotate: ## run python type annotation checks with mypy
79-
python -m mypy ./rust_template
79+
python -m mypy ./python_template_rust
8080

8181
#########
8282
# TESTS #
8383
#########
8484
.PHONY: test-py tests-py coverage-py
8585
test-py: ## run python tests
86-
python -m pytest -v rust_template/tests
86+
python -m pytest -v python_template_rust/tests
8787

8888
# alias
8989
tests-py: test-py
9090

9191
coverage-py: ## run python tests and collect test coverage
92-
python -m pytest -v rust_template/tests --cov=rust_template --cov-report term-missing --cov-report xml
92+
python -m pytest -v python_template_rust/tests --cov=python_template_rust --cov-report term-missing --cov-report xml
9393

9494
.PHONY: test-rust tests-rust coverage-rust
9595
test-rust: ## run rust tests

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# rust template
1+
# python template rust
22

33
A Rust-Python project template
44

5-
[![Build Status](https://github.com/python-project-templates/rust-template/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/python-project-templates/rust-template/actions/workflows/build.yml)
6-
[![codecov](https://codecov.io/gh/python-project-templates/rust-template/branch/main/graph/badge.svg)](https://codecov.io/gh/python-project-templates/rust-template)
7-
[![License](https://img.shields.io/github/license/python-project-templates/rust-template)](https://github.com/python-project-templates/rust-template)
8-
[![PyPI](https://img.shields.io/pypi/v/rust-template.svg)](https://pypi.python.org/pypi/rust-template)
9-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-project-templates/rust-template/main?urlpath=lab)
5+
[![Build Status](https://github.com/python-project-templates/python-template-rust/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/python-project-templates/python-template-rust/actions/workflows/build.yml)
6+
[![codecov](https://codecov.io/gh/python-project-templates/python-template-rust/branch/main/graph/badge.svg)](https://codecov.io/gh/python-project-templates/python-template-rust)
7+
[![License](https://img.shields.io/github/license/python-project-templates/python-template-rust)](https://github.com/python-project-templates/python-template-rust)
8+
[![PyPI](https://img.shields.io/pypi/v/python-template-rust.svg)](https://pypi.python.org/pypi/python-template-rust)
9+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-project-templates/python-template-rust/main?urlpath=lab)
1010

1111
## Overview
1212

pyproject.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["maturin>=1,<2"]
33
build-backend = "maturin"
44

55
[project]
6-
name = "rust-template"
6+
name = "python-template-rust"
77
authors = [{name = "Python Project Template Authors", email = "[email protected]"}]
88
description="A Rust-Python project template"
99
readme = "README.md"
@@ -28,8 +28,8 @@ classifiers = [
2828
dependencies = []
2929

3030
[project.urls]
31-
Repository = "https://github.com/python-project-templates/rust-template"
32-
Homepage = "https://github.com/python-project-templates/rust-template"
31+
Repository = "https://github.com/python-project-templates/python-template-rust"
32+
Homepage = "https://github.com/python-project-templates/python-template-rust"
3333

3434
[project.optional-dependencies]
3535
develop = [
@@ -53,7 +53,7 @@ commit = true
5353
tag = true
5454

5555
[[tool.bumpversion.files]]
56-
filename = "rust_template/__init__.py"
56+
filename = "python_template_rust/__init__.py"
5757
search = '__version__ = "{current_version}"'
5858
replace = '__version__ = "{new_version}"'
5959

@@ -85,7 +85,7 @@ ignore = [
8585
before-build = "rustup show"
8686
build = "cp39-*"
8787
skip = "*musllinux*"
88-
test-command = "pytest -vvv {project}/rust_template/tests"
88+
test-command = "pytest -vvv {project}/python_template_rust/tests"
8989
test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"]
9090

9191
[tool.cibuildwheel.linux]
@@ -103,7 +103,7 @@ archs = "AMD64 x86"
103103
[tool.coverage.run]
104104
branch = true
105105
omit = [
106-
"rust_template/tests/integration/",
106+
"python_template_rust/tests/integration/",
107107
]
108108
[tool.coverage.report]
109109
exclude_also = [
@@ -117,7 +117,7 @@ fail_under = 50
117117
[tool.pytest.ini_options]
118118
addopts = ["-vvv", "--junitxml=junit.xml"]
119119
asyncio_mode = "strict"
120-
testpaths = "rust_template/tests"
120+
testpaths = "python_template_rust/tests"
121121

122122
[tool.ruff]
123123
line-length = 150
@@ -128,7 +128,7 @@ extend-select = ["I"]
128128
[tool.ruff.lint.isort]
129129
combine-as-imports = true
130130
default-section = "third-party"
131-
known-first-party = ["rust_template"]
131+
known-first-party = ["python_template_rust"]
132132
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
133133

134134
[tool.ruff.lint.per-file-ignores]
File renamed without changes.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from python_template_rust import * # noqa
2+
3+
4+
def test_all():
5+
assert True

rust/Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
2-
name = "rust_template"
2+
name = "python_template_rust"
33
version = "0.1.0"
44
authors = ["Python Project Template Authors <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"
77
readme = "../README.md"
8-
repository = "https://github.com/python-project-templates/rust template"
8+
repository = "https://github.com/python-project-templates/python template rust"
99
description = ""
1010

1111
[lib]
12-
name = "rust_template"
12+
name = "python_template_rust"
1313
path = "src/lib.rs"
1414
crate-type = ["rlib"]
1515

0 commit comments

Comments
 (0)