From 4df523957b3680065bb50f6fa408e149a71e3dc1 Mon Sep 17 00:00:00 2001 From: Eric Beahan Date: Mon, 22 Nov 2021 12:28:32 -0600 Subject: [PATCH] Separate packages required for testing/linting (#1672) * note associated licenses with deps * split dev deps into their own file * include requirements-dev for dev env setup * fix typo * update minimum python version * include requirements-dev check * simplify dep install guidance * update dev tools --- CONTRIBUTING.md | 3 +-- Makefile | 4 ++-- USAGE.md | 22 ++++------------------ scripts/requirements-dev.txt | 6 ++++++ scripts/requirements.txt | 6 +++--- 5 files changed, 16 insertions(+), 25 deletions(-) create mode 100644 scripts/requirements-dev.txt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 68f40705f8..41c69a0218 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,8 +33,7 @@ There are two primary ways in which you can contribute to ECS. You need these tools to contribute to the ECS repo: * [Git](https://git-scm.com/) -* [Python 3.6+](https://www.python.org/) -* [Go 1.13](https://golang.org/) +* [Python 3.8+](https://www.python.org/) ### Submitting Changes diff --git a/Makefile b/Makefile index 19e8c6ca1f..3dbe1d545b 100644 --- a/Makefile +++ b/Makefile @@ -95,9 +95,9 @@ test: ve # Create a virtualenv to run Python. .PHONY: ve ve: build/ve/bin/activate -build/ve/bin/activate: scripts/requirements.txt +build/ve/bin/activate: scripts/requirements.txt scripts/requirements-dev.txt @test -d build/ve || python3 -mvenv build/ve - @build/ve/bin/pip install -Ur scripts/requirements.txt + @build/ve/bin/pip install -Ur scripts/requirements.txt -r scripts/requirements-dev.txt @touch build/ve/bin/activate # Check YAML syntax (currently not enforced). diff --git a/USAGE.md b/USAGE.md index 338cbb6c1f..79a15fab1e 100644 --- a/USAGE.md +++ b/USAGE.md @@ -20,8 +20,7 @@ relevant artifacts for their unique set of data sources. - [Setup and Install](#setup-and-install) * [Prerequisites](#prerequisites) + [Clone from GitHub](#clone-from-github) - + [Option 1: Install dependencies via make (recommended)](#option-1-install-dependencies-via-make-recommended) - + [Option 2: Install dependencies via pip](#option-2-install-dependencies-via-pip) + + [Install dependencies](#install-dependencies) - [Usage](#usage) * [Getting Started - Generating Artifacts](#getting-started---generating-artifacts) * [Generator Options](#generator-options) @@ -77,7 +76,7 @@ See [usage-example/](usage-example/) for a complete example with source files. ### Prerequisites -* [Python 3.6+](https://www.python.org/) +* [Python 3.8+](https://www.python.org/) * [make](https://www.gnu.org/software/make/) * [pip](https://pypi.org/project/pip/) * [git](https://git-scm.com/) @@ -99,22 +98,9 @@ Prior to installing dependencies or running the tools, it's recommended to check $ git checkout v1.5.0 ``` -#### Option 1: Install dependencies via make (recommended) +#### Install dependencies -Setting up a `virtualenv` (`venv`) can be accomplished by running `make ve` the top-level of the ECS repo: - -``` -$ make ve -``` - -All necessary Python dependencies will also be installed with `pip`. - -You can use the Python and dependencies from this isolated virtual environment -by using `build/ve/bin/python` instead of `python` in the examples shown here. - -#### Option 2: Install dependencies via pip - -Install dependencies using `pip` (An active `virutalenv` is recommended): +Install dependencies using `pip` (An active `virtualenv` is recommended): ``` $ pip install -r scripts/requirements.txt diff --git a/scripts/requirements-dev.txt b/scripts/requirements-dev.txt new file mode 100644 index 0000000000..71f107ce77 --- /dev/null +++ b/scripts/requirements-dev.txt @@ -0,0 +1,6 @@ +# License: MIT +autopep8==1.4.4 +# License: BSD +mock==4.0.2 +# License: GPLv3 +yamllint==1.19.0 diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 0e97888fb1..90d752342b 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -1,7 +1,7 @@ pip +# License: MIT PyYAML==5.4 -autopep8==1.4.4 -yamllint==1.19.0 -mock==4.0.2 +# License: BSD gitpython==3.1.2 +# License: BSD Jinja2==2.11.3