Skip to content

Commit

Permalink
docs: update all docs; adds screencast of make bootstrap-dev; add cha…
Browse files Browse the repository at this point in the history
…ngelog
  • Loading branch information
MultifokalHirn committed Dec 21, 2023
1 parent c93f2bd commit 5f907f1
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 43 deletions.
31 changes: 13 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@

### Feat

- add devcontainer.json, configure dependabot, minor fixes
- adds return type checker
- adds sketches for upcoming decorators
- add first ornament '@only_called_once' WIP

### Fix

- template shouldn't give access to itself
- correct type annotations for decorators
- return func value on warning still!
- type annotations were erroneous
- correct path signatures in tests
- only called once decorator is tested and added enforce

## 1.0.0 (2023-11-15)
### Refactor

### Feat

- adds pdm based dependencies

### Fix

- more trying to get makefile to work in github actions; ruff replaces flake8 and "autopep8"
- misc fixes, starting to work in tox.ini
- dont install pdm again after bootstrapping; fix import bug
- try to get tests to work for 3.8
- pdm cofniguration did not work on systems without a system wide pdm
- readme
- update vscode workspace settings to reflect deprecations
- getting app module to be callable
- import logic in submodules, fixed linting issues
- minor makefile improvements
- fix logo printing
- separate ornaments into helpers, invariants, limiters, markers and runtime_checks
- adds warnings and exception classes for our decorators
45 changes: 27 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,72 @@ Most of the setup is automated with `make`. Check the [`Makefile`](./Makefile) t
* Linux: visit [gnu.org](https://www.gnu.org/software/make)
* Windows: `choco install make` or check [chocolatey.org](https://chocolatey.org/install)


### Setup
## Setup

`make` will take care of setting a the virtual environment (it will be located in `.venv`). It will also install `pdm` and with it all dependencies.

Furthermore, it will install `pre-commit` hooks to run checks on staged changes before each commit and to enforce the commit message style.

``` bash
make bootstrap
make dev
make bootstrap-dev
```

### Setting up pre-commit hooks
### Screencast

[![asciicast](https://asciinema.org/a/628233.svg)](https://asciinema.org/a/628233)

<!-- ### Setting up pre-commit hooks
[`pre-commit`](https://github.com/pre-commit/pre-commit) should be used to run checks on staged changes before each commit and to enforce the commit message style.
Before you start development, please install the hooks like so:
``` bash
pre-commit install && pre-commit install --hook-type commit-msg
```
``` -->

## Development
>
<!-- >
> In order to have notifications in your terminal on macOS, you can install a package for that like so:
> `brew install terminal-notifier`
> `brew install terminal-notifier` -->

To run all of the checks below (formatting, testing, linting, typechecks) run:

``` bash
make ci
```

### Testing
### Static Analysis

To trigger `pytest` (TODO: and `coverage`):
`ornaments` uses `ruff` for formatting & linting and `mypy` for typechecks.

``` bash
make test
make format # ruff formatting and auto-fixes
make lint # ruff checks
make mypy # mypy
```

### Static Analysis
### Testing

By default this project is set up to lint with `flake8` and `mypy`, while `autopep8` and `isort` take care of autofixing. To run linters and static analyzers:
To trigger `pytest` and `coverage` run the following:

``` bash
make format # ruff fixes
make lint # ruff checks
make mypy # mypy
make test
```

This will also generate a coverage badge which is displayed in the README.

## Commit Message Style

A [uniform commit message style](https://commitizen-tools.github.io/commitizen/tutorials/writing_commits/)
and [here](https://www.conventionalcommits.org/en/v1.0.0/). for better readibilty shall be enforced to be able to generate a [changelog](./CHANGELOG.md).

Commit message should be prefixed with one of the following:
### Allowed Prefixes

`fix:` | `feat:` | `docs:` | `style:` | `refactor:` | `perf:` | `test:` | `build:` | `ci:` | `chore:` | `revert:`.
``` txt
fix: feat: docs: style: refactor: perf:
test: build: ci: chore: revert:
```

### Example

Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It aims to do so through meaningful `@decorator` functions that help other devel
- [Scope](#scope)
- [Usage](#usage)
- [But what if I want to use the same function in different contexts? 🤔](#but-what-if-i-want-to-use-the-same-function-in-different-contexts-)
- [Structure](#structure)
- [Development](#development)
- [Addendum](#addendum)

</details>
Expand Down Expand Up @@ -112,7 +112,7 @@ only_once_callable_function()
<!-- <img width="1421" alt="Screenshot 2023-12-21 at 01 48 35" src="https://github.com/MultifokalHirn/ornaments/assets/7870758/8fce40d2-65e4-4c1f-8077-d5eb40641bc5"> -->
🚀

## Structure
<!-- ## Structure
``` txt
.
Expand Down Expand Up @@ -152,18 +152,22 @@ only_once_callable_function()
::-+**=++-:=--.*%%%==--.:::.
:--:==-:--:--:-:::::
. . : : ...
```
``` -->

## Addendum
## Development
>
> See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for information on how to setup and contribute to this project.
[![asciicast](https://asciinema.org/a/628233.svg)](https://asciinema.org/a/628233)

## Addendum

![License](https://img.shields.io/github/license/MultifokalHirn/ornaments)

<div>
<img align="center" src="./docs/img/o1.png" width="100" height="100" />
<img align="center" src="./docs/img/o2.png" width="100" height="100" />
<img align="center" src="./docs/img/oran.png" width="100" height="100" />
<img align="center" src="./docs/img/o1.png" width="100" height="100" />
<img align="center" src="./docs/img/o2.png" width="100" height="100" />
<img align="center" src="./docs/img/oran.png" width="100" height="100" />
</div>
<br />
<br />
Expand Down

0 comments on commit 5f907f1

Please sign in to comment.