Skip to content

Commit b003319

Browse files
committed
Update installations and workflows
* Update pyproject.toml * Create a Workflow file to test formatting in PR
1 parent 68bfb8e commit b003319

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

.github/workflows/black-formatter.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,23 @@ jobs:
2828
uses the [psf/black](https://github.com/psf/black) formatter to fix these issues.
2929
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch
3030
branch: actions/black
31+
32+
name: Black Formatter (PR Check)
33+
34+
on:
35+
pull_request:
36+
branches:
37+
- "**" # Run on pull requests for all branches
38+
39+
jobs:
40+
linter:
41+
name: runner / black
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
46+
- name: Run Black formatter (check mode)
47+
uses: psf/black@stable
48+
with:
49+
options: "--check -l 80"
50+
src: "./pina"

pyproject.toml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["setuptools", "wheel"]
3-
build-backend = "setuptools.build_meta"
4-
51
[project]
62
name = "pina-mathlab"
73
version = "0.2.0"
@@ -18,21 +14,44 @@ keywords = [
1814
"neural-operators", "equation-learning", "lightining"
1915
]
2016
dependencies = [
21-
"torch", "lightning", "torch_geometric", "matplotlib",
17+
"torch",
18+
"lightning",
19+
"torch_geometric",
20+
"matplotlib",
2221
]
2322
requires-python = ">=3.8"
2423

2524
[project.optional-dependencies]
2625
docs = [
27-
"sphinx>5.0", "sphinx_rtd_theme", "sphinx_copybutton", "sphinx_design", "pydata_sphinx_theme"
26+
"sphinx>5.0",
27+
"sphinx_rtd_theme",
28+
"sphinx_copybutton",
29+
"sphinx_design",
30+
"pydata_sphinx_theme"
2831
]
2932
test = [
30-
"pytest", "pytest-cov", "scipy"
33+
"pytest",
34+
"pytest-cov",
35+
"scipy"
3136
]
3237

3338
[project.urls]
3439
Homepage = "https://mathlab.github.io/PINA/"
3540
Repository = "https://github.com/mathLab/PINA"
3641

37-
[tool.setuptools.packages]
38-
find = {}
42+
[build-system]
43+
requires = [ "setuptools>=41", "wheel", "setuptools-git-versioning>=2.0,<3", ]
44+
build-backend = "setuptools.build_meta"
45+
46+
[tool.setuptools-git-versioning]
47+
enabled = true
48+
template = "{tag}"
49+
50+
[tool.setuptools.packages.find]
51+
include = ["pina*"]
52+
53+
[tool.black]
54+
line-length = 80
55+
56+
[tool.isort]
57+
profile = "black"

0 commit comments

Comments
 (0)