Skip to content

Commit

Permalink
Maintain contribute guidelines and CI (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wh1isper authored Sep 19, 2023
1 parent 28accc1 commit 20361e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
- name: Test with pytype
continue-on-error: true
run: |
pytype ./duetector
- name: Test with pytest
run: |
pytest -vv --cov=duetector
Expand Down
19 changes: 7 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,13 @@ cd ./dev-tools && ./start-docs-host.sh

Access `http://localhost:8080` for docs.

## Typing

(Optional, python<=3.10) Use [pytype](https://github.com/google/pytype) to check typed
## Contributing a new tracer/filter/collector/analyzer

```
pytype ./duetector
```


## Contributing a new tracer/filter/collector
1. Create a new file in `duetector/tracer`, `duetector/filter`, `duetector/collector` or `duetector/analyzer` directory, with the name `{name}.py`
2. Implement the new tracer/filter/collector/analyzer
3. Add the new tracer/filter/collector to `registers` list in `duetector/tracer/register.py`, `duetector/filter/register.py`, `duetector/collector/register.py` or `duetector/analyzer/register.py`
4. Test the new tracer/filter/collector/analyzer
5. Generate new static config file with `python duetector/tools/config_generator.py`

1. Create a new file in `duetector/tracer`, `duetector/filter` or `duetector/collector` directory, with the name `{name}.py`
2. Implement the new tracer/filter/collector
3. Add the new tracer/filter/collector to `registers` list in `duetector/tracer/register.py`, `duetector/filter/register.py` or `duetector/collector/register.py`
4. Test the new tracer/filter/collector
Another way to add a new tracer/filter/collector/analyzer is to use our extension mechanism, see [Extension](./examples/extension). This is not required a change to the duetector codebase and you will mantain the extension by yourself.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ classifiers = [
'Programming Language :: Python :: 3.11',
]
[project.optional-dependencies]
test = ["pytest", "pytest-cov", "pytype", "httpx"]
test = ["pytest", "pytest-cov", "httpx"]
docs = ["Sphinx<=7.2.4", "sphinx-rtd-theme", "sphinx-click", "autodoc_pydantic"]

[project.scripts]
Expand Down

0 comments on commit 20361e8

Please sign in to comment.