From 6fb306ae7d41317892411ec4bd5fd7050eb8b974 Mon Sep 17 00:00:00 2001 From: Felix Nicolae Bucsa Date: Wed, 19 Jun 2024 09:38:23 +0100 Subject: [PATCH 1/3] feat(docs): add developing resource in github repo --- DEVELOPING.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 DEVELOPING.md diff --git a/DEVELOPING.md b/DEVELOPING.md new file mode 100644 index 00000000..de2b0023 --- /dev/null +++ b/DEVELOPING.md @@ -0,0 +1,62 @@ +# Development Guidelines + +- [Getting the Source](#get) +- [Setting up a New Development Environment](#setup) +- [Development](#dev) +- [Testing](#test) +- [Contributing](#contributing) + +## Getting the Source + + +1. Fork the [repository](https://github.com/fetchai/fetchd.git). +2. Clone your fork of the repository: + + + ``` shell + git clone https://github.com/fetchai/fetchd.git + ``` + +3. Define an `upstream` remote pointing back to the main FetchD repository: + + ``` shell + git remote add upstream https://github.com/fetchai/fetchd.git + ``` + +## Setting up a New Development Environment + +The easiest way to get set up for development is to install Python (`3.9` to `3.12`) and [poetry](https://pypi.org/project/poetry/), and then run the following from the top-level project directory: + +```bash + cd python + poetry install + poetry shell + pre-commit install +``` + +## Development + +When developing for `fetchd` make sure to have the poetry shell active. This ensures that linting and formatting will automatically be checked during `git commit`. + +We are using [Ruff](https://github.com/astral-sh/ruff) with added rules for formatting and linting. +Please consider adding `ruff` to your IDE to speed up the development process and ensure you only commit clean code. + +Alternately you can invoke ruff by typing the following from within the `./python` folder + +```bash + ruff check --fix && ruff format +``` + +## Testing + +To run tests use the following command: + +```bash + pytest +``` + +## Contributing + + +For instructions on how to contribute to the project (e.g. creating Pull Requests, commit message convention, etc), see the [contributing guide](CONTRIBUTING.md). + From bbb3465c196fd78459e49ab9ea4acde596b22e1a Mon Sep 17 00:00:00 2001 From: Felix Nicolae Bucsa Date: Thu, 27 Jun 2024 12:01:12 +0100 Subject: [PATCH 2/3] edits: addressed comment and integrated contributing in developing --- DEVELOPING.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index de2b0023..f956c6f7 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -57,6 +57,34 @@ To run tests use the following command: ## Contributing - -For instructions on how to contribute to the project (e.g. creating Pull Requests, commit message convention, etc), see the [contributing guide](CONTRIBUTING.md). - +# Documentation Setup + +## Prerequisites + +Make sure that you have pipenv installed on your system: + + pip3 install pipenv + +Once installed navigate to this folder in the project + + cd fetchd/docs + +Make sure all the dependencies are installed + + pipenv install -d + +## Updating the docs + +Once the dependencies are setup you must activate the environment with the following commands + + pipenv shell + +This step should update your terminal prompt and you will be able to see that the command `mkdocs` is installed in your path + + which mkdocs + +Finally, to start the development server run the following command + + mkdocs serve + +This will listen for changes on the filesystem and automatically update the documentation. From 711746ae463f61a0267dfd2fecda39f1b719912e Mon Sep 17 00:00:00 2001 From: Felix Nicolae Bucsa Date: Thu, 27 Jun 2024 13:22:12 +0100 Subject: [PATCH 3/3] edits: changes --- DEVELOPING.md | 44 ++++++++------------------------------------ docs/CONTRIBUTING.md | 31 ------------------------------- 2 files changed, 8 insertions(+), 67 deletions(-) delete mode 100644 docs/CONTRIBUTING.md diff --git a/DEVELOPING.md b/DEVELOPING.md index f956c6f7..380317ca 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -9,18 +9,18 @@ ## Getting the Source -1. Fork the [repository](https://github.com/fetchai/fetchd.git). +1. Fork the [repository](https://github.com/fetchai/uAgents.git). 2. Clone your fork of the repository: ``` shell - git clone https://github.com/fetchai/fetchd.git + git clone https://github.com/fetchai/uAgents.git ``` -3. Define an `upstream` remote pointing back to the main FetchD repository: +3. Define an `upstream` remote pointing back to the main uAgents repository: ``` shell - git remote add upstream https://github.com/fetchai/fetchd.git + git remote add upstream https://github.com/fetchai/uAgents.git ``` ## Setting up a New Development Environment @@ -36,7 +36,7 @@ The easiest way to get set up for development is to install Python (`3.9` to `3. ## Development -When developing for `fetchd` make sure to have the poetry shell active. This ensures that linting and formatting will automatically be checked during `git commit`. +When developing for `uAgents` make sure to have the poetry shell active. This ensures that linting and formatting will automatically be checked during `git commit`. We are using [Ruff](https://github.com/astral-sh/ruff) with added rules for formatting and linting. Please consider adding `ruff` to your IDE to speed up the development process and ensure you only commit clean code. @@ -57,34 +57,6 @@ To run tests use the following command: ## Contributing -# Documentation Setup - -## Prerequisites - -Make sure that you have pipenv installed on your system: - - pip3 install pipenv - -Once installed navigate to this folder in the project - - cd fetchd/docs - -Make sure all the dependencies are installed - - pipenv install -d - -## Updating the docs - -Once the dependencies are setup you must activate the environment with the following commands - - pipenv shell - -This step should update your terminal prompt and you will be able to see that the command `mkdocs` is installed in your path - - which mkdocs - -Finally, to start the development server run the following command - - mkdocs serve - -This will listen for changes on the filesystem and automatically update the documentation. + +For instructions on how to contribute to the project (e.g. creating Pull Requests, commit message convention, etc), see the [contributing guide](CONTRIBUTING.md). + diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 100644 index 8b296c25..00000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1,31 +0,0 @@ -# Documentation Setup - -## Prerequisites - -Make sure that you have pipenv installed on your system: - - pip3 install pipenv - -Once installed navigate to this folder in the project - - cd fetchd/docs - -Make sure all the dependencies are installed - - pipenv install -d - -## Updating the docs - -Once the dependencies are setup you must activate the environment with the following commands - - pipenv shell - -This step should update your terminal prompt and you will be able to see that the command `mkdocs` is installed in your path - - which mkdocs - -Finally, to start the development server run the following command - - mkdocs serve - -This will listen for changes on the filesystem and automatically update the documentation.