Skip to content

Commit

Permalink
Miscellaneous fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gecrooks committed Mar 5, 2024
1 parent 6a0d785 commit 9b0ef1f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ name: Build

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]
schedule:
- cron: "0 13 * * *" # Every day at 1pm UTC (6am PST)
workflow_dispatch:


jobs:
build:
Expand Down Expand Up @@ -36,7 +38,7 @@ jobs:
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
cd example_python_project
python -m pip install .[dev] # install package + test dependencies
python -m pip install ".[dev]" # install package + test dependencies
- name: About
run: |
cd example_python_project
Expand All @@ -45,18 +47,13 @@ jobs:
run: |
cd example_python_project
python -m pytest --cov --cov-fail-under 100
- name: Lint with black and isort (run `make delint` to fix issues)
run: |
python -m black --check example_python_project hooks
python -m isort --check example_python_project hooks
- name: Lint with flake8
- name: Lint ruff
run: |
cd example_python_project
python -m flake8 .
python -m ruff check example_python_project hooks
- name: Typecheck with mypy
run: |
cd example_python_project
python -m mypy
python -m mypy example_python_project
- name: Build documentation with sphinx
run: |
cd example_python_project
Expand Down
1 change: 1 addition & 0 deletions example_python_project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dev = [
"mypy",
"sphinx",
"pre-commit",
"ruff",
]


Expand Down
2 changes: 1 addition & 1 deletion hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def git_init_and_tag():
subprocess.check_output("git init", shell=True, stderr=subprocess.STDOUT)
subprocess.check_output("git add -A .", shell=True, stderr=subprocess.STDOUT)
subprocess.check_output(
f"git commit -m 'Initialize from modern-python-template'",
"git commit -m 'Initialize from modern-python-template'",
shell=True,
stderr=subprocess.STDOUT,
)
Expand Down
1 change: 1 addition & 0 deletions {{cookiecutter.module_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dev = [
"mypy",
"sphinx",
"pre-commit",
"ruff",
]


Expand Down

0 comments on commit 9b0ef1f

Please sign in to comment.