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 guidelines for contributing and split requirements files. #37

Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirement.txt
python -m pip install -r tests/test-requirement.txt
python -m pip install -r requirements.txt
python -m pip install -r tests/requirements.txt
- name: Runnning tests with pytest.
run: |
set -o pipefail
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/typing_checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
**/requirement.txt
**/test-requirement.txt
**/requirements.txt
**/typing-requirements.txt
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirement.txt
python -m pip install -r tests/test-requirement.txt
python -m pip install -r requirements.txt
python -m pip install -r typing-requirements.txt
- name: Running static types checker.
run: |
mypy
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM base as builder
RUN apk add build-base
RUN mkdir /install
WORKDIR /install
COPY requirement.txt /requirement.txt
RUN pip install --prefix=/install -r /requirement.txt
COPY requirements.txt /requirements.txt
RUN pip install --prefix=/install -r /requirements.txt
FROM base
COPY --from=builder /install /usr/local
RUN mkdir -p /app/agent
Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OXO Template Agent

This repo is a template for building an [Ostorlab](https://github.com/ostorlab/ostorlab) agent in Python. It ships with good best practices like:
This repo is a template for building an [OXO](https://github.com/ostorlab/ostorlab) agent in Python. It ships with
good best practices like:
3asm marked this conversation as resolved.
Show resolved Hide resolved
3asm marked this conversation as resolved.
Show resolved Hide resolved

* Github actions workflow
* Linting checks with Ruff
Expand All @@ -16,6 +17,36 @@ Here are links to good resources to get started:
* [Debugging and Testing Agents](https://oxo.ostorlab.co/tutorials/debugging_agents)
* [Understand OXO Internals](https://oxo.ostorlab.co/tutorials/life_of_a_scan)

## Contributing
3asm marked this conversation as resolved.
Show resolved Hide resolved

To contribute to this project, follow these steps:
1. Fork this repository.
2. Clone your forked repository: `git clone <your_fork_url>`
3. Navigate into your repository's directory: `cd <repository_directory>`
4. Create a new branch: `git checkout -b <branch_name>`.
3asm marked this conversation as resolved.
Show resolved Hide resolved
5. Install the dependencies: `pip install -r requirements.txt`.
6. Make your changes.
7. Ensure the tests pass:
```sh
pip install -r tests/requirements.txt
pytest .
```
8. Ensure the linter passes:
```sh
pip install -r linting-requirements.txt
ruff format .
ruff check .
```
9. Ensure the static type checks pass:
```sh
pip install -r typing-requirements.txt
mypy
```
10. Commit your changes: `git commit -m '<commit_message>'`.
11. Push to the remote branch: `git push origin <branch_name>`.
12. Create a pull request from the forked repository.


## Ideas for Agents to build

Implementation of popular tools like:
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions typing-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mypy
ruff
typing-extensions
Loading