Skip to content

Commit b5a3b4b

Browse files
committed
Updated template.
1 parent f20e0c8 commit b5a3b4b

File tree

10 files changed

+1350
-93
lines changed

10 files changed

+1350
-93
lines changed

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install uv with python version.
16+
uses: astral-sh/setup-uv@v5
17+
with:
18+
enable-cache: true
19+
cache-dependency-glob: "uv.lock"
20+
- name: Install dependencies
21+
run: |
22+
uv sync --group lint
23+
24+
- name: ruff
25+
run: |
26+
uv run ruff --version
27+
uv run ruff check src
28+
uv run ruff format src --check
29+
30+
- name: mypy
31+
run: |
32+
uv run mypy --version
33+
uv run rm -rf .mypy_cache
34+
uv run mypy src

.github/workflows/linting.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
File renamed without changes.

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

pyproject.toml

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1-
[build-system]
2-
requires = [
3-
# pin NumPy version used in the build
4-
"oldest-supported-numpy",
5-
"setuptools>=65.0.0",
1+
[project]
2+
name = "python-template"
3+
version = "0.1.0"
4+
description = "Template for new Python code bases in Materials Virtual Lab."
5+
readme = "README.md"
6+
requires-python = ">=3.10"
7+
dependencies = []
8+
author = "Shyue Ping Ong"
9+
author_email = "[email protected]"
10+
maintainer = "Shyue Ping Ong"
11+
maintainer_email = "[email protected]"
12+
url = "https://materialsvirtuallab.org"
13+
classifiers = [
14+
"Development Status :: 4 - Beta",
15+
"Intended Audience :: Science/Research",
16+
"License :: OSI Approved :: MIT License",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3.8",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3",
23+
"Topic :: Scientific/Engineering :: Chemistry",
24+
"Topic :: Scientific/Engineering :: Information Analysis",
25+
"Topic :: Scientific/Engineering :: Physics",
26+
"Topic :: Software Development :: Libraries :: Python Modules",
627
]
7-
build-backend = "setuptools.build_meta"
828

9-
[tool.versioningit.vcs]
10-
method = "git"
11-
default-tag = "0.0.1"
29+
[tool.setuptools.packages.find]
30+
where = ["src"]
31+
include = ["package"]
1232

1333
[tool.black]
1434
line-length = 120
@@ -111,3 +131,23 @@ exclude_lines = [
111131
"if TYPE_CHECKING:",
112132
"except PackageNotFoundError:"
113133
]
134+
135+
[dependency-groups]
136+
dev = [
137+
"codecov-cli>=10.3.0",
138+
"coverage>=7.7.1",
139+
"coveralls>=4.0.1",
140+
"pre-commit>=4.2.0",
141+
"pytest>=8.3.5",
142+
"pytest-cov>=6.0.0",
143+
]
144+
lint = [
145+
"mypy>=1.15.0",
146+
"pyright>=1.1.398",
147+
"ruff>=0.11.2",
148+
]
149+
maintain = [
150+
"docutils>=0.21.2",
151+
"invoke>=2.2.0",
152+
"sphinx>=8.1.3",
153+
]

requirements-ci.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

requirements.txt

Whitespace-only changes.

setup.py

Lines changed: 0 additions & 41 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)