Skip to content

Commit

Permalink
Merge pull request #7 from cgahr/dev
Browse files Browse the repository at this point in the history
Improve dev setup
  • Loading branch information
cgahr authored Apr 29, 2023
2 parents 31e760f + efd7de1 commit 23b2b14
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 40 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ on:
branches:
- main
jobs:
lint:
name: lint codebase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install ".[linters]"
- name: Black code formatter
run: black src --check
- name: Ruff code checker
run: ruff src
- name: Mypy code formatter
run: mypy src
test:
name: pytest
runs-on: ubuntu-latest
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Build and Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand Down
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ci:
skip: [pytest]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -20,13 +22,12 @@ repos:
rev: 23.3.0
hooks:
- id: black
args: [--line-length=88]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.261'
rev: 'v0.0.263'
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.1.1'
rev: 'v1.2.0'
hooks:
- id: mypy
exclude: tests
Expand Down
9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ readme = "README.md"
requires-python = ">=3.7.1"

[project.optional-dependencies]
linters = [
"black",
"mypy",
"ruff",
"types-appdirs"
]
tests = [
"coverage",
"pytest",
Expand All @@ -51,6 +45,9 @@ tests = [
Homepage = "https://github.com/cgahr/latexplotlib"
Issues = "https://github.com/cgahr/latexplotlib/issues"

[tool.black]
line_length = 88

[tool.coverage.run]
source = ["src"]

Expand Down

0 comments on commit 23b2b14

Please sign in to comment.