Skip to content

Commit 4295738

Browse files
dario-cosciaFilippoOlivo
authored andcommitted
Update installations and workflows
* Update pyproject.toml * Create a Workflow file to test formatting in PR
1 parent ad7aad5 commit 4295738

File tree

3 files changed

+48
-10
lines changed

3 files changed

+48
-10
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Black Formatter (PR Check)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "**" # Run on pull requests for all branches
7+
8+
jobs:
9+
linter:
10+
name: runner / black
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Run Black formatter (check mode)
16+
uses: psf/black@stable
17+
with:
18+
options: "--check -l 80"
19+
src: "./pina"

.github/workflows/black-formatter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
There appear to be some python formatting errors in ${{ github.sha }}. This pull request
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
30-
branch: actions/black
30+
branch: actions/black

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)