Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add developer page #41

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

# Development

## Set up

```shell
python3 -m venv --clear venv
source venv/bin/activate
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
pre-commit install
```

## Testing


To run tests fast:
```shell
pytest -n auto tests
```

To Get coverage:
```shell
coverage run --branch --include "./beavers/*" -m pytest tests
coverage report --show-missing
```

## Generating the change log

We use [git-change-log](https://pawamoy.github.io/git-changelog/usage/) to generate our CHANGELOG.md

Please follow the [basic convention](https://pawamoy.github.io/git-changelog/usage/#basic-convention) for commit message.

To update the change log, run:
```shell
git-changelog -io CHANGELOG.md
```

## New Release

For new release, first prepare the change log, push and merge it.
```shell
git-changelog -bio CHANGELOG.md``
```

Then tag and push:
```shell
git tag vX.X.X
git push origin vX.X.X
```

Lastly on github, go to tags and create a release.
The CI will deploy to pypi automatically from then.

## Testing the documentation

```shell
mkdocs serve --livereload --watch=./
```

## Updating dependencies

- For the repo `poetry lock`
- For the doc: `(cd docs/; pip-compile ./requirements.in > ./requirements.txt)`

## Resources

The repo set up is inspired by this [guide](https://mathspp.com/blog/how-to-create-a-python-package-in-2022)
16 changes: 16 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,19 @@ markdown_extensions:
- md_in_html
extra:
project_name: "beavers"


nav:
- Home:
- index.md
- Concepts:
- concepts/1_dag.md
- concepts/2_advanced.md
- concepts/3_replay.md
- concepts/4_kafka.md
- API Reference:
- reference/engine.md
- reference/kafka.md
- reference/replay.md
- install.md
- development.md
13 changes: 5 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,20 @@ black = "^22.10.0"
coverage = ">=6.5.0"
flake8 = ">=5.0.4"
isort = ">=5.10.1"
mkdocs = ">=1.5.3"
pip-tools = "^6.12.1"
pre-commit = ">=2.20.0"
pylint = ">=2.15.0"
pytest = ">=7.2.0"
click = ">=8.1.7"
mkdocs-material = ">=9.3.2"
mkdocstrings = { version = ">=0.21.2", extras = ['python'] }
mock = "*"
git-changelog = "^2.2.0"
git-changelog = ">=2.2.0"

[tool.poetry.group.docs.dependencies]
markdown-include = "*"
mkdocs = "*"
mkdocs-material = "*"
mkdocs = ">=1.5.3"
mkdocs-material-extensions = "*"
mkdocstrings = {version = "*", extras = ['python']}
mkdocs-material = ">=9.3.2"
mkdocstrings = { version = ">=0.21.2", extras = ["python"] }
pymdown-extensions = "*"


Expand All @@ -56,7 +53,7 @@ requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.black]
target-version = ['py310']
target-version = ["py310"]
exclude = "venv/|tox/"

[tool.isort]
Expand Down