Skip to content

Commit

Permalink
docs: documentation cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
5A11 authored Jan 17, 2023
1 parent 0356625 commit dcc4101
Show file tree
Hide file tree
Showing 300 changed files with 7,112 additions and 6,379 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _Put an `x` in the boxes that apply._
- [ ] I have added an item in `HISTORY.md` for this release.
- [ ] I bumped the version number in the `aea/__version__.py` file.
- [ ] I bumped the version number in every Docker image of the repo and published it. Also, I built and published them with tag `latest`
(check the READMEs of [`aea-develop`](https://github.com/fetchai/agents-aea/blob/master/develop-image/README.md#publish)
(check the READMEs of [`aea-develop`](https://github.com/fetchai/agents-aea/blob/master/develop-image/README.md#publish)
and [`aea-user`](https://github.com/fetchai/agents-aea/blob/master/develop-image/user-image/README.md#publish))
- [ ] I have pushed the latest packages to the registry.
- [ ] I have uploaded the latest `aea` to PyPI.
Expand Down
24 changes: 12 additions & 12 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ This is the official list of the AEA Framework authors:

### Lead

* Ali Hosseini <[email protected]> [5A11](https://github.com/5A11)
- Ali Hosseini <[email protected]> [5A11](https://github.com/5A11)

### Current and Past Contributors

* James Riehl [jrriehl](https://github.com/jrriehl)
* David Minarsch [DavidMinarsch](https://github.com/DavidMinarsch)
* Marco Favorito [MarcoFavorito](https://github.com/MarcoFavorito)
* Yuri Turchenkov [solarw](https://github.com/solarw)
* Oleg Panasevych [Panasevychol](https://github.com/panasevychol)
* Lokman Rahmani [lrahmani](https://github.com/lrahmani)
* Jiří Vestfál [MissingNO57](https://github.com/MissingNO57)
* Aristotelis Triantafyllidis [Totoual](https://github.com/Totoual)
* Diarmid Campbell [dishmop](https://github.com/dishmop)
* Kevin Chen [Kevin-Chen0](https://github.com/Kevin-Chen0)
* Ed Fitzgerald [ejfitzgerald](https://github.com/ejfitzgerald)
- James Riehl [jrriehl](https://github.com/jrriehl)
- David Minarsch [DavidMinarsch](https://github.com/DavidMinarsch)
- Marco Favorito [MarcoFavorito](https://github.com/MarcoFavorito)
- Yuri Turchenkov [solarw](https://github.com/solarw)
- Oleg Panasevych [Panasevychol](https://github.com/panasevychol)
- Lokman Rahmani [lrahmani](https://github.com/lrahmani)
- Jiří Vestfál [MissingNO57](https://github.com/MissingNO57)
- Aristotelis Triantafyllidis [Totoual](https://github.com/Totoual)
- Diarmid Campbell [dishmop](https://github.com/dishmop)
- Kevin Chen [Kevin-Chen0](https://github.com/Kevin-Chen0)
- Ed Fitzgerald [ejfitzgerald](https://github.com/ejfitzgerald)
26 changes: 14 additions & 12 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others’ private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Expand Down Expand Up @@ -70,9 +70,11 @@ Community leaders will follow these Community Impact Guidelines in determining t

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][https://www.contributor-covenant.org], version 2.1,
This Code of Conduct is adapted from the [Contributor Covenant][contributor covenant], version 2.1,
available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

Community Impact Guidelines were inspired by [Mozilla’s code of conduct enforcement ladder](https://github.com/mozilla/diversity).

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).

[contributor covenant]: https://www.contributor-covenant.org
38 changes: 20 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@ Please read and follow our [Code of Conduct][coc].

## <a name="question"></a> Question or Problem?

Please use [Github Discussions][ghdiscussion] for support related questions and general discussions. Do NOT open issues as they are for bug reports and feature requests. This is because:
Please use [GitHub Discussions][ghdiscussion] for support related questions and general discussions. Do NOT open issues as they are for bug reports and feature requests. This is because:

- Questions and answers stay available for public viewing so your question/answer might help someone else.
- Github Discussions voting system ensures the best answers are prominently visible.
- GitHub Discussions voting system ensures the best answers are prominently visible.

## <a name="issue"></a> Found a Bug?

If you find a bug in the source code [submit a bug report issue](#submit-issue).
Even better, you can [submit a Pull Request](#submit-pr) with a fix.

## <a name="feature"></a> Missing a Feature?

You can *request* a new feature by [submitting a feature request issue](#submit-issue).
If you would like to *implement* a new feature:

* For a **Major Feature**, first [open an issue](#submit-issue) and outline your proposal so that it can be discussed.
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
- For a **Major Feature**, first [open an issue](#submit-issue) and outline your proposal so that it can be discussed.
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).

## <a name="submit"></a> Submission Guidelines

Expand Down Expand Up @@ -74,7 +75,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
#### Reviewing a Pull Request

The AEA team reserves the right not to accept pull requests from community members who haven't been good citizens of the community. Such behavior includes not following our [code of conduct][coc] and applies within or outside of the managed channels.
The AEA team reserves the right not to accept pull requests from community members who haven't been good citizens of the community. Such behavior includes not following our [code of conduct][coc] and applies within or outside the managed channels.

When you contribute a new feature, the maintenance burden is transferred to the core team. This means that the benefit of the contribution must be compared against the cost of maintaining the feature.

Expand All @@ -93,25 +94,26 @@ If we ask for changes via code reviews then:
After your pull request is merged, you can safely delete your branch and pull the changes from the (upstream) repository.

## <a name="rules"></a> Coding Rules

To ensure consistency throughout the source code, keep these rules in mind as you are working:

* All code must pass our code quality checks (linters, formatters, etc). See the [development guide][developing] section for more detail.
* All features or bug fixes **must be tested** via unit-tests and if applicable integration-tests. These help to, a) prove that your code works correctly, and b) guard against future breaking changes and lower the maintenance cost.
* All public features **must be documented**.
* All files must include a license header.
- All code must pass our code quality checks (linters, formatters, etc). See the [development guide][developing] section for more detail.
- All features or bug fixes **must be tested** via unit-tests and if applicable integration-tests. These help to, a. prove that your code works correctly, and b. guard against future breaking changes and lower the maintenance cost.
- All public features **must be documented**.
- All files must include a license header.

## <a name="commit"></a> Commit Message Convention

Please follow the [Conventional Commits v1.0.0][convcommit]. The commit types must be one of the following:

* **build**: Changes that affect the build system or external dependencies
* **ci**: Changes to our CI configuration files and scripts
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **nfunc**: Code that improves some non-functional characteristic, such as performance, security, ...
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **test**: Adding missing tests or correcting existing tests
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our CI configuration files and scripts
- **docs**: Documentation only changes
- **feat**: A new feature
- **fix**: A bug fix
- **nfunc**: Code that improves some non-functional characteristic, such as performance, security, ...
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **test**: Adding missing tests or correcting existing tests

[coc]: https://github.com/fetchai/agents-aea/blob/main/CODE_OF_CONDUCT.md
[developing]: https://github.com/fetchai/agents-aea/blob/main/DEVELOPING.md
Expand All @@ -120,4 +122,4 @@ Please follow the [Conventional Commits v1.0.0][convcommit]. The commit types mu
[new-issue]: https://github.com/fetchai/agents-aea/issues/new/choose
[prs]: https://github.com/fetchai/agents-aea/pulls
[convcommit]: https://www.conventionalcommits.org/en/v1.0.0/
[github]: https://github.com/fetchai/agents-aea
[github]: https://github.com/fetchai/agents-aea
161 changes: 127 additions & 34 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,97 +15,190 @@

## <a name="get"></a> Getting the Source

1. Fork the [agents-aea repository][repo].
1. Fork the [agents-aea repository][repo].
2. Clone your fork of the agents-aea repository:
```shell

``` shell
git clone [email protected]:<github username>/agents-aea.git
```

3. Define an `upstream` remote pointing back to the main agents-aea repository:
```shell

``` shell
git remote add upstream https://github.com/fetchai/agents-aea.git
```

## <a name="setup"></a> Setting up a New Development Environment:
## <a name="setup"></a> Setting up a New Development Environment

1. Ensure you have Python (version `3.8`, `3.9` or `3.10`) and [`poetry`][poetry].

2. ``` shell
make new-env
```

This will create a new virtual environment using poetry with the project and all the development dependencies installed.

1. Ensure you have Python (version `3.8`, `3.9` or `3.10`) and [`poetry`][poetry].
2. make new-env
This will create a new virtual environment using poetry with the project and all the development dependencies installed.
3. poetry shell
To enter the virtual environment.
3. ``` shell
poetry shell
```

To enter the virtual environment.

Depending on what you want to do, you might need extra tools on your system:

- The project uses [Google Protocol Buffers][protobuf] compiler for message serialization. The compiler's version must match the `protobuf` library installed with the project (see `pyproject.toml`).
- The `fetchai/p2p_libp2p` package is partially developed in Go. To make changes, [install Golang][go].
- To update fingerprint hashes of packages, you will need the [IPFS daemon][ipfs].
- To update fingerprint hashes of packages, you will need the [IPFS daemon][ipfs].

## <a name="dev"></a>Development

### <a name="general"></a>General code quality checks

To run general code quality checkers, formatters and linters:
- make lint

- ``` shell
make lint
```

Automatically formats your code and sorts your imports, checks your code's quality and scans for any unused code.
- make mypy

- ``` shell
make mypy
```

Statically checks the correctness of the types.
- make pylint

- ``` shell
make pylint
```

Analyses the quality of your code.
- make security

- ``` shell
make security
```

Checks the code for known vulnerabilities and common security issues.
- make clean

- ``` shell
make clean
```

Cleans your development environment and deletes temporary files and directories.

- For the Go parts, we use [`golines`][golines] and [`golangci-lint`][golangci-lint] for linting.

### <a name="docs"></a>Updating documentation

We use [`mkdocs`][mkdocs] and [`material-for-mkdocs`][material] for static documentation pages. To make changes to the documentation:
- make docs-live
This starts a live-reloading docs server on localhost which you can access by going to http://127.0.0.1:8000/ in your browser. Making changes to the documentation automatically reloads this page, showing you the latest changes.

- ``` shell
make docs-live
```

This starts a live-reloading docs server on localhost which you can access by going to <http://127.0.0.1:8000/> in your browser. Making changes to the documentation automatically reloads this page, showing you the latest changes.

To create a new documentation page, add a markdown file under `/docs/` and add a reference to this page in `mkdocs.yml` under `nav`.

### <a name="api"></a>Updating API documentation

If you've made changes to the core `aea` package that affects the public API:
- make generate-api-docs

- ``` shell
make generate-api-docs
```

This regenerates the API docs. If pages are added/deleted, or there are changes in their structure, these need to be reflected manually in the `nav` section of `mkdocs.yaml`.

### <a name="deps"></a>Updating dependencies
We use [`poetry`][poetry] and `pyproject.toml` to manage the project's dependencies.

We use [`poetry`][poetry] and `pyproject.toml` to manage the project's dependencies.

If you've made any changes to the dependencies (e.g. added/removed dependencies, or updated package version requirements):
- poetry lock

- ``` shell
poetry lock
```

This re-locks the dependencies. Ensure that the `poetry.lock` file is pushed into the repository (by default it is).
- make liccheck

- ``` shell
make liccheck
```

Checks that the licence for the framework is correct, taking into account the licences for all dependencies, their dependencies and so forth.

### <a name="package"></a>Updating packages

If you've made changes to the packages included in the repository (e.g. skills, protocols, connections, contracts):
- make update-package-hashes

- ``` shell
make update-package-hashes
```

Updates the fingerprint hashes of every package in the repository.
- make package-checks
Checks, a) that the package hashes are correct, b) the documentation correctly references the latest packages, and c) runs other correctness checks on packages.

- ``` shell
make package-checks
```

Checks, a. that the package hashes are correct, b. the documentation correctly references the latest packages, and c) runs other correctness checks on packages.

### <a name="tests"></a>Tests

To test the Python part of the project, we use `pytest`. To run the tests:

- make test
- ``` shell
make test
```

Runs all the tests.
- make test-plugins

- ``` shell
make test-plugins
```

Runs all plugin tests.
- make dir={SUBMODULE} tdir={TESTMODULE} test-sub

- ``` shell
make dir={SUBMODULE} tdir={TESTMODULE} test-sub
```

Runs the tests for `aea.{SUBMODULE}`. For example, to run the tests for the CLI: `make dir=cli tdir=cli test-sub`

To test the Go parts of the project:
- go test -p 1 -timeout 0 -count 1 -v ./...
from the root directory of a Go package (e.g. `fetchai/p2p_libp2p`) to run the Golang tests.
To test the Go parts of the project:

- ``` shell
go test -p 1 -timeout 0 -count 1 -v ./...
```

from the root directory of a Go package (e.g. `fetchai/p2p_libp2p`) to run the Golang tests.
If you experience installation or build issues, run `go clean -modcache`.

### <a name="misc"></a>Miscellaneous checks
- copyright-check

- ``` shell
copyright-check
```

Checks that all files have the correct copyright header (where applicable).
- check-doc-links

- ``` shell
check-doc-links
```

Checks that the links in the documentations are valid and alive.
- make libp2p-diffs

- ``` shell
make libp2p-diffs
```

Checks the libp2p code under `libs` and in the connection packages aren't different.
- make plugin-diffs

- ``` shell
make plugin-diffs
```

Checks the plugin licenses and the codes under `cosmos` and `fetchai` ledger plugins aren't different.

## <a name="contributing"></a>Contributing
Expand Down
Loading

0 comments on commit dcc4101

Please sign in to comment.