-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update setup and docs #84
Conversation
Note: You can test builds now! |
@@ -5,42 +5,28 @@ Installation | |||
System Requirements | |||
******************* | |||
|
|||
ThreatResponse now requires python >= 3.4. It may still work(ish) with Python 2.7 but is not recommended due | |||
to security problems with cryptography libraries in Python 2.7. | |||
ThreatResponse requires python >= 3.4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Should we add the corresponding code to raise an error for this condition on run pointing to a doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will throw an error because the shebang in bin/cli is set to python3 now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there another way?
docs/installing.rst
Outdated
|
||
Installing from PyPi | ||
******************** | ||
|
||
.. code-block:: bash | ||
|
||
$ virtualenv env -p python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be consistent and align this virtualenv instruction with the above? python3 -m virtualenv env
docs/installing.rst
Outdated
|
||
|
||
Installing From Github | ||
********************** | ||
|
||
.. code-block:: bash | ||
|
||
$ virtualenv env -p python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be consistent and align this virtualenv instruction with the above? python3 -m virtualenv env
docs/installing.rst
Outdated
$ python setup.py | ||
$ pip install dist/aws_ir-*.tar.gz | ||
$ margaritashotgun -h | ||
$ virtualenv env -p python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be consistent and align this virtualenv instruction with the above? python3 -m virtualenv env
docs/installing.rst
Outdated
@@ -62,6 +49,62 @@ In the previous two example dependencies are automatically resolved, if you simp | |||
|
|||
$ git clone https://github.com/ThreatResponse/aws_ir.git | |||
$ cd aws_ir | |||
$ virtualenv env -p python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be consistent and align this virtualenv instruction with the above? python3 -m virtualenv env
@@ -26,37 +24,18 @@ Ensure aws credentials are configured under the user running aws_ir as documente | |||
Setup Roles with Cloudformation | |||
************************************* | |||
|
|||
A cloudformation stack has been provided to setup a group and a responder role. *Note that this roles has a constraint | |||
that all your responders use MFA.* | |||
A cloudformation stack has been provided to setup a group and a responder role. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self resolved. I see it below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah - I just moved the doc stuff around. Trying to get "quickstart" leaner
@@ -1,17 +1,28 @@ | |||
jinja2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We should freeze the rest of these reqs agains their version numbers that are known to work. Instead of pinning some to latest. Warehouse is moving people toward pipenv. Should not block merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requirements.txt is only used for local build development purposes - setup.py is the cannonical source of requirements. I don't really like that they have to be maintained in separate places.
Still - pinning to versions is not a bad idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer pipenv for this https://github.com/pypa/pipenv
[metadata] | ||
description-file = README.rst | ||
|
||
[flake8] | ||
ignore=E402,H238 | ||
max-line-length=99 | ||
|
||
[tool:pytest] | ||
[pytest-watch] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this replace nosewatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not replace but I couldn't get nosewatch working correctly
tests/test_case_lib.py
Outdated
|
||
self.e = mock_ec2() | ||
self.e.start() | ||
print(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print statement in code. Remove or replace with logger. Maybe this was for test?
Nit: Align Dockerfile FROM: to match .travis.yml or build and have travis use container artifact. |
65b9e18
to
e4464fb
Compare
This PR is a lot of miscellany. I went through all of the setup/install documentation and updated it cleaning up setup.py and various issues I ran into along the way.
I did a cleanup of test_case_lib in order to get familiar with development workflows, streamline and document them.
I bumped the version and made sure that we don't use aws_ir_plugins 0.0.2.