Skip to content

Commit

Permalink
chore(poetry): move poethepoet to dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
borolepratik committed May 9, 2024
1 parent 3d4bd10 commit 59be0be
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ repos:
hooks:
- id: run-formatters
name: Run formatters
entry: poetry poe formatters
entry: poetry run poe formatters
language: system
pass_filenames: false
stages: [pre-commit, pre-push]
files: ^(app/|poetry.lock|run.py)
- id: run-linters
name: Run linters
entry: poetry poe linters
entry: poetry run poe linters
language: system
pass_filenames: false
stages: [pre-commit, pre-push]
files: ^(app/|poetry.lock|run.py)
- id: run-typings
name: Run typings
entry: poetry poe typings
entry: poetry run poe typings
language: system
pass_filenames: false
stages: [pre-commit, pre-push]
files: ^(app/|poetry.lock|run.py)
# - id: run-tests
# name: Run tests
# entry: poetry poe tests
# entry: poetry run poe tests
# language: system
# pass_filenames: false
# stages: [pre-push]
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Table of Contents:
- [Python virtual environment](#python-virtual-environment)
- [Installing dependencies](#installing-dependencies)
- [Virtual environment sanity check](#virtual-environment-sanity-check)
- [Poe the Poet poetry plugin](#poe-the-poet-poetry-plugin)
- [Poe the Poet](#poe-the-poet)
- [Installing git hooks](#installing-git-hooks)
- [New Relic integration](#new-relic-integration)
- [Running the project](#running-the-project)
Expand Down Expand Up @@ -61,29 +61,27 @@ poetry install --sync --no-root --with dev,lint,test
- Execute the `/Scripts/Activate` script from the virtual environment located [here](https://python-poetry.org/docs/configuration/#cache-directory).


#### Poe the Poet poetry plugin
#### Poe the Poet

```sh
poetry self add 'poethepoet[poetry_plugin]'
```
https://github.com/nat-n/poethepoet

1. Check available tasks:
```sh
poetry poe
poetry run poe
```
2. Execute a task:
```sh
poetry poe <task-name>
poetry run poe <task-name>
```
For example, running the project formatters:
```sh
poetry poe formatters
poetry run poe formatters
```

#### Installing git hooks

```sh
poetry poe git-hooks-setup
poetry run poe git-hooks-setup
```

### New Relic integration
Expand All @@ -100,7 +98,7 @@ poetry poe git-hooks-setup
### Running tests

```sh
poetry poe tests
poetry run poe tests
```

### Docker
Expand Down
44 changes: 42 additions & 2 deletions poetry.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ uvicorn = { extras = ["standard"], version = "^0.29.0" }
[tool.poetry.group.dev.dependencies]
commitizen = "*"
pre-commit = "*"
poethepoet = "*"

# Formatting dependencies
[tool.poetry.group.lint]
Expand Down

0 comments on commit 59be0be

Please sign in to comment.