From eefcb8ccbe1dafe0f0392e5642d7aed9612f300f Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 14 Jan 2021 05:59:00 +0000 Subject: [PATCH 1/5] added basic dev guide --- docs/dev/setup.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/dev/setup.md b/docs/dev/setup.md index e1706b72..d0794e75 100644 --- a/docs/dev/setup.md +++ b/docs/dev/setup.md @@ -6,6 +6,8 @@ The Onionr development environment is simple. All one really needs is a supporte There are additional requirements specified in requirements-dev.txt +Developers agree to the CoC and to contribute new code under GPLv3 or later. Developers should stick to PEP8 in most cases, and write unittests or integration tests where possible. + ## Developer Scripts run-onionr-node.py can be used to start a node with specific parameters From e950f3242e7f8548aa84e8d94520818ce8728d83 Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 15 Jan 2021 01:55:28 +0200 Subject: [PATCH 2/5] Remove i2p and add cpu to issue template for now --- ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 874b405d..cd19e18f 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -9,4 +9,4 @@ Onionr: OS: Python: Tor: -I2P: +CPU: From b42dc8fbc6f588f3a8b9baac5108b5e8f568714e Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 15 Jan 2021 02:10:30 +0200 Subject: [PATCH 3/5] Use list for version infos in issue template --- ISSUE_TEMPLATE.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index cd19e18f..019fdb8c 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -5,8 +5,9 @@ # Steps to Reproduce # Version Information -Onionr: -OS: -Python: -Tor: -CPU: + +* Onionr: +* OS: +* Python: +* Tor: +* CPU: From 8797bce4faedade7b46ee01e0bace800e1efd159 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 15 Jan 2021 01:11:52 +0000 Subject: [PATCH 4/5] don't use hard coded python version number in .env file --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index c9574952..2ec1b610 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -PYTHONPATH=./venv/bin/python3.8 \ No newline at end of file +PYTHONPATH=./venv/bin/python \ No newline at end of file From 54f6e3bdc61c68e4a25c1ce7d47d28a35f242e68 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 15 Jan 2021 01:53:31 +0000 Subject: [PATCH 5/5] Added instructions for generating requirements.txt --- docs/dev/generating-requirements.txt.md | 19 +++++++++++++++++++ docs/dev/setup.md | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 docs/dev/generating-requirements.txt.md diff --git a/docs/dev/generating-requirements.txt.md b/docs/dev/generating-requirements.txt.md new file mode 100644 index 00000000..75f880b4 --- /dev/null +++ b/docs/dev/generating-requirements.txt.md @@ -0,0 +1,19 @@ +# Generating requirements.txt + +To generate a requirements.txt file, install pip-tools from pip + +Onionr requirements files should have hashes to prevent backdooring by the pypi server. + +Put your package versions in requirements.in like normal. Child dependencies are usually not necessary: + +``` +requests==0.1.1 +flask==0.1.1 +``` + +Then generate the requirements.txt: + +`$ pip-compile requirements.in --generate-hashes -o requirements.txt` + + +Your requirements.txt will have hash-pinned requirements of all dependencies and child dependencies. diff --git a/docs/dev/setup.md b/docs/dev/setup.md index d0794e75..39726f35 100644 --- a/docs/dev/setup.md +++ b/docs/dev/setup.md @@ -6,7 +6,7 @@ The Onionr development environment is simple. All one really needs is a supporte There are additional requirements specified in requirements-dev.txt -Developers agree to the CoC and to contribute new code under GPLv3 or later. Developers should stick to PEP8 in most cases, and write unittests or integration tests where possible. +**Developers agree to the [CoC](../../CODE_OF_CONDUCT.md) and to contribute new code under GPLv3 or later**. Developers should stick to PEP8 in most cases, and write unittests or integration tests where possible. ## Developer Scripts @@ -30,11 +30,11 @@ Onionr in it's current form is functional, albeit buggy. ## Current major components -Onionr runs via two main HTTP gevent servers serving Flask apps. +Onionr runs via two main HTTP gevent servers serving Flask apps. Dir: apiservers -* 1 Parent app hosts all public API endpoints for the Tor transport. +* 1 Parent app hosts all public API endpoints for the Tor transport. * 1 Parent app hosts all UI-related files and endpoints. Some commands and internal modules interact with this API as well * The HTTP servers have strict anti-dns-rebinding and CSRF countermeasures, so there is a script to craft requests to the UI-related API in scripts/ * Block storage is currently handled via metadata in sqlite (mostly defunct now), and block data storage in a different database. This is in blocks/ in running Onionr daemon data directory