From 20361e81eeba256c757c7c5ad57a4766998b0bfc Mon Sep 17 00:00:00 2001 From: wunder957 Date: Tue, 19 Sep 2023 09:53:12 +0800 Subject: [PATCH] Maintain contribute guidelines and CI (#72) --- .github/workflows/python-package.yml | 4 ---- CONTRIBUTING.md | 19 +++++++------------ pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3b879cc..b645c08 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ff7504..1152891 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/pyproject.toml b/pyproject.toml index c41f0cd..18ed336 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]