Commit 881bd56b authored by Adrian Pino's avatar Adrian Pino Committed by GitHub
Browse files

Merge pull request #50 from OpenOperatorPlatform/docs/add-contribute-&-testing-info

Add Contribute & Testing files. Update readme
parents 6bdb1eca c20ad035
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -31,14 +31,14 @@ Each contribution should be made in the appropriate directory:
- **EdgeCloud Adapters**`src/edgecloud/clients/`
- **Network Adapters**`src/network/clients/`

## Unit Tests Requirement
To merge a feature branch into `main`, the adapter **must pass the unit tests** under the `/tests` directory. Please use `/tests/edgecloud` for edgecloud, and `/tests/network` for the 5G cores)
## Testing (Mandatory)
To merge a feature branch into `main`, the adapter **must pass the unit tests** under the `/tests` directory. Please use `/tests/edgecloud` for edgecloud, and `/tests/network` for the 5G cores). Instructions to do so available at [TESTING.md](docs/TESTING.MD)

## Steps to Contribute
1. **Fork the Repository** (if applicable).
## Contributing
1. **Check Guidelines at [CONTRIBUTING.md](docs/CONTRIBUTING.md).**
2. **Create a New Branch** following the naming convention.
3. **Develop Your Feature** inside the correct directory.
4. **Write Unit Tests** under `/tests`.
4. **Satisfy Unit Tests** located under `/tests`.
5. **Submit a Merge Request (MR)** to the `main` branch.
6. **Ensure All Tests Pass** before the merge.

docs/CONTRIBUTING.md

0 → 100644
+24 −0
Original line number Diff line number Diff line
# Contributing

To contribute with code, follow the instructions below to enforce automatic syntax formatting and linting.
Configuration is taken from https://www.pre-commit.com/#2-add-a-pre-commit-configuration and from git-hooks.

*Note*: apply commands from the root of the repository.

```bash
# Required: install the pre-commit hooks
pip3 install pre-commit
pre-commit install

# Required: install the commit-msg git hook
cp -p ./dev/hooks/commit-msg .git/hooks/

# Optional: manual trigger (to know how validation will be applied or to force it manually on files before/after commit)
pre-commit run --all-files

# Optional: to keep the pre-commit versions of validation up-to-date
pre-commit autoupdate

# Optional: to remove the pre-commit git-hook binding
pre-commit uninstall
```

docs/TESTING.md

0 → 100644
+14 −0
Original line number Diff line number Diff line
# Testing

*Note*: apply commands from the root of the repository.

To run tests for the Edge Cloud adapters:

```bash
pytest tests/edgecloud/
```

To run tests for the Network adapters (WIP):
```bash
pytest tests/network/
```