Skip to content

Commit

Permalink
black github action
Browse files Browse the repository at this point in the history
  • Loading branch information
remrama committed Jun 3, 2024
1 parent f1fa417 commit a9a2ee8
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Format
uses: psf/black@stable
with:
options: "--check --diff"
src: "./src"
use_pyproject: true
16 changes: 8 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
# Action artifacts...
name: Build and Deploy Sphinx Docs to GitHub Pages


on:
workflow_dispatch:
pull_request:
release:
types:
- published
push:
branches:
- main
- dev
release:
types:
- published
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment

concurrency:
group: "pages"
cancel-in-progress: true


jobs:
deploy:
environment:
Expand Down
12 changes: 10 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
=====

.. image:: https://badge.fury.io/py/krank.svg
:target: https://badge.fury.io/py/krank

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

----


Krank
=====


Fetch psychology datasets from remote sources.

.. important::
Expand Down
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
.. image:: https://badge.fury.io/py/krank.svg
:target: https://badge.fury.io/py/krank

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

----


Krank
=====

Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ Homepage = "https://github.com/remrama/krank"

[project.optional-dependencies]
dev = [
"sphinx",
"black",
"pydata-sphinx-theme", # Needs to be in requirements.txt also (for docs.yml).
"sphinx",
]

[tool.setuptools.dynamic]
Expand All @@ -59,3 +60,8 @@ krank = [
"krank/data/lexicons.json",
"krank/data/tables.json",
]

[tool.black]
line-length = 88
target-version = ["py312"]
include = '\.pyi?$'

0 comments on commit a9a2ee8

Please sign in to comment.