Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into v2_create_basic_structure_#671
Browse files Browse the repository at this point in the history
  • Loading branch information
miyunari committed Jul 25, 2023
2 parents 6088c9f + a7a3a75 commit ce70d85
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.278"
rev: "v0.0.280"
hooks:
- id: ruff

Expand Down
45 changes: 17 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,44 +25,33 @@ Finally the S3 bucket gets synchronized with the CDN provider in a reasonable in

## Development guide

[Poetry] is used for dependency management and centralized configuration for testing and
linting tools. Start by [installing poetry] and then clone the repository.
We use a helpful `Makefile` based on the one from [cookiecutter-poetry](https://fpgmaas.github.io/cookiecutter-poetry/) for setting up the environment, running linters, and running tests.

After cloning, run the following:
After cloning, set up your local development environment by running:

```console
poetry install
```shell
make install
```

Pre-commit hooks are used to ensure that code passes the linter checks before you push.
Prepare the pre-commit hooks on your computer by running some commands:
Pre-commit hooks are run during the commit process, but you can test your code and run linters at any time with these commands:

```console
poetry run pre-commit install
poetry run pre-commit run --all-files
```
```shell
# Run tests only
make test

# Run linters only
make check

You can quickly run tests with `poetry run pytest` or run the full pre-commit suite with
`poetry run pre-commit run --all-files`. Or, simply start a commit (such as `git commit -m "Fixed the bug"`) and the pre-commit checks run automatically.
# Run tests and then run linters
make test check
```

If you need to add more Python packages to poetry, run the following:

```console
```shell
# For packages that this project requires in production
poetry add foo

# For packages that are only needed for linting, testing, or development work
poetry add --group dev bar
```

## Running tests

Use poetry to run pytest:

```commandline
# Run all tests, including end-to-end tests that call out to cloud APIs:
poetry run pytest
```

[Poetry]: https://python-poetry.org/
[installing poetry]: https://python-poetry.org/docs/#installation
poetry add --group=dev bar
```
96 changes: 48 additions & 48 deletions poetry.lock

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

0 comments on commit ce70d85

Please sign in to comment.