Skip to content

Handle case where publisher is a string rather than an entity #37

Handle case where publisher is a string rather than an entity

Handle case where publisher is a string rather than an entity #37

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Lint with black and flake8
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install poetry
run: |
sudo apt install -y pipx
pipx install poetry
- name: Install dependencies
run: |
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or names
poetry run flake8 ./src/rocrate_inveniordm --count --select=E9,F63,F7,F82 --show-source --statistics
# Black formats with a line length of 88 characters
poetry run flake8 ./src/rocrate_inveniordm --count --max-complexity=10 --max-line-length=88 --statistics
- name: Lint with black
run: |
poetry run black --check --diff .