diff --git a/.github/workflows/black-formatter-test.yml b/.github/workflows/black-formatter-test.yml new file mode 100644 index 0000000..51bdd05 --- /dev/null +++ b/.github/workflows/black-formatter-test.yml @@ -0,0 +1,19 @@ +name: Black Formatter (PR Check) + +on: + pull_request: + branches: + - "**" # Run on pull requests for all branches + +jobs: + linter: + name: runner / black + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Run Black formatter (check mode) + uses: psf/black@stable + with: + options: "--check -l 80" + src: "./pina" \ No newline at end of file diff --git a/.github/workflows/black-formatter.yml b/.github/workflows/black-formatter.yml index ed0933c..89d408f 100644 --- a/.github/workflows/black-formatter.yml +++ b/.github/workflows/black-formatter.yml @@ -27,4 +27,4 @@ jobs: There appear to be some python formatting errors in ${{ github.sha }}. This pull request uses the [psf/black](https://github.com/psf/black) formatter to fix these issues. base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch - branch: actions/black + branch: actions/black \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 07967c2..782691d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,3 @@ -[build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta" - [project] name = "pina-mathlab" version = "0.2.0" @@ -18,21 +14,44 @@ keywords = [ "neural-operators", "equation-learning", "lightining" ] dependencies = [ - "torch", "lightning", "torch_geometric", "matplotlib", + "torch", + "lightning", + "torch_geometric", + "matplotlib", ] requires-python = ">=3.8" [project.optional-dependencies] docs = [ - "sphinx>5.0", "sphinx_rtd_theme", "sphinx_copybutton", "sphinx_design", "pydata_sphinx_theme" + "sphinx>5.0", + "sphinx_rtd_theme", + "sphinx_copybutton", + "sphinx_design", + "pydata_sphinx_theme" ] test = [ - "pytest", "pytest-cov", "scipy" + "pytest", + "pytest-cov", + "scipy" ] [project.urls] Homepage = "https://mathlab.github.io/PINA/" Repository = "https://github.com/mathLab/PINA" -[tool.setuptools.packages] -find = {} \ No newline at end of file +[build-system] +requires = [ "setuptools>=41", "wheel", "setuptools-git-versioning>=2.0,<3", ] +build-backend = "setuptools.build_meta" + +[tool.setuptools-git-versioning] +enabled = true +template = "{tag}" + +[tool.setuptools.packages.find] +include = ["pina*"] + +[tool.black] +line-length = 80 + +[tool.isort] +profile = "black" \ No newline at end of file