Skip to content

Commit

Permalink
chore: update project structure to b25684a2
Browse files Browse the repository at this point in the history
  • Loading branch information
adnaniazi committed Jul 10, 2024
1 parent f32190c commit c911586
Show file tree
Hide file tree
Showing 16 changed files with 219 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/woltapp/wolt-python-package-cookiecutter",
"commit": "4eecc9c4d27e3c9321438bc1fdaf717bec5eadf6",
"commit": "b25684a2c63387153b83a1cc03ea332be8c8279a",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
16 changes: 16 additions & 0 deletions .github/actions/python-poetry-env/action.yml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff a/.github/actions/python-poetry-env/action.yml b/.github/actions/python-poetry-env/action.yml (rejected hunks)
@@ -5,12 +5,12 @@ inputs:
python-version:
required: false
description: 'Python version'
- default: '3.10'
+ default: '3.12'
outputs: {}
runs:
using: 'composite'
steps:
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: ${{inputs.python-version}}
- name: Install poetry
6 changes: 3 additions & 3 deletions .github/workflows/cookiecutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
auto-update-project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.12"

- name: Install dependencies
run: python -m pip install cruft poetry jello tabulate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
auto-update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/actions/python-poetry-env

- name: Install tabulate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
draft-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/actions/python-poetry-env
- name: Update version
id: updated_version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/actions/python-poetry-env
- name: Publish to pypi
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.21
shell: bash
Expand All @@ -22,14 +22,14 @@ jobs:
name: Check if automatic project update was successful
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Fail if .rej files exist as structure update was not successful
run: test -z "$(find . -iname '*.rej')"

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/actions/python-poetry-env
- run: poetry run pre-commit run --all-files

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/test.yml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff a/.github/workflows/test.yml b/.github/workflows/test.yml (rejected hunks)
@@ -38,10 +38,17 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.7", "3.8", "3.9", "3.10"]
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- uses: ./.github/actions/python-poetry-env
with:
python-version: ${{ matrix.python-version }}
- run: poetry run pytest
+
+ docs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/python-poetry-env
+ - run: poetry run mkdocs build
33 changes: 11 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,31 @@ repos:
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: 'CHANGELOG.md'
- id: trailing-whitespace
- id: mixed-line-ending
- repo: local
hooks:
- id: autoflake
name: autoflake
entry: poetry run autoflake -r -i --remove-all-unused-imports --remove-unused-variables
- id: ruff-format
name: ruff-format
entry: poetry run ruff format
require_serial: true
language: system
types: [ python ]
- id: isort
name: isort
entry: poetry run isort
language: system
types: [python]
- id: black
name: black
entry: poetry run black
language: system
types: [python]
- id: pyupgrade
name: pyupgrade
entry: poetry run pyupgrade --py37-plus
- id: ruff
name: ruff
# Add --fix, in case you want it to autofix when this hook runs
entry: poetry run ruff check --force-exclude
require_serial: true
language: system
types: [python]
types: [ python ]
- id: mypy
name: mypy
entry: poetry run mypy .
require_serial: true
language: system
types: [python]
pass_filenames: false
- id: flake8
name: flake8
entry: poetry run flake8
language: system
types: [python]
- id: kacl-verify
name: kacl-verify
entry: poetry run kacl-cli verify
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions LICENSE.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff a/LICENSE b/LICENSE (rejected hunks)
@@ -1,6 +1,6 @@
The MIT License (MIT)

-Copyright (c) 2021 Adnan M. Niazi <adnaniazi@gmail.com>
+Copyright (c) 2024 Adnan M. Niazi <adnaniazi@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ pytest

### Documentation

The documentation is automatically generated from the content of the [docs directory](./docs) and from the docstrings
of the public signatures of the source code. The documentation is updated and published as a [Github project page
](https://pages.github.com/) automatically as part each release.
The documentation is automatically generated from the content of the [docs directory](https://github.com/adnaniazi/capfinder/tree/master/docs) and from the docstrings
of the public signatures of the source code. The documentation is updated and published as a [Github Pages page](https://pages.github.com/) automatically as part each release.

### Releasing

Expand All @@ -93,7 +92,7 @@ Find the draft release from the

### Pre-commit

Pre-commit hooks run all the auto-formatters (e.g. `black`, `isort`), linters (e.g. `mypy`, `flake8`), and other quality
Pre-commit hooks run all the auto-formatting (`ruff format`), linters (e.g. `ruff` and `mypy`), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.

You can install the hooks with (runs for each commit):
Expand Down
10 changes: 10 additions & 0 deletions README.md.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff a/README.md b/README.md (rejected hunks)
@@ -29,7 +29,7 @@ pip install capfinder
* Clone this repository
* Requirements:
* [Poetry](https://python-poetry.org/)
- * Python 3.7+
+ * Python 3.8+
* Create a virtual environment and install the dependencies

```sh
4 changes: 1 addition & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ plugins:
default_handler: python
handlers:
python:
rendering:
options:
show_signature_annotations: true
show_source: true
show_submodules: true
watch:
- src/capfinder
15 changes: 14 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c911586

Please sign in to comment.