From da84ce8cb3cd894e2065cf05f61a39a408cc6783 Mon Sep 17 00:00:00 2001 From: Piper Merriam Date: Wed, 13 Apr 2016 09:06:23 -0600 Subject: [PATCH 1/2] Fixes #80 - missing libraries directory --- populus/cli/init_cmd.py | 6 ++++++ populus/observers.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/populus/cli/init_cmd.py b/populus/cli/init_cmd.py index 55a170e9..fec7ef8d 100644 --- a/populus/cli/init_cmd.py +++ b/populus/cli/init_cmd.py @@ -5,6 +5,7 @@ from populus import utils from populus.compilation import ( get_contracts_dir, + get_project_libraries_dir, ) from .main import main @@ -19,10 +20,15 @@ def init(): Generate project layout with an example contract. """ project_dir = os.getcwd() + contracts_dir = get_contracts_dir(project_dir) if utils.ensure_path_exists(contracts_dir): click.echo("Created Directory: ./{0}".format(os.path.relpath(contracts_dir))) + libraries_dir = get_project_libraries_dir(project_dir) + if utils.ensure_path_exists(libraries_dir): + click.echo("Created Directory: ./{0}".format(os.path.relpath(libraries_dir))) + example_contract_path = os.path.join(contracts_dir, 'Example.sol') if not os.path.exists(example_contract_path): with open(example_contract_path, 'w') as example_contract_file: diff --git a/populus/observers.py b/populus/observers.py index b732169d..9f60409e 100644 --- a/populus/observers.py +++ b/populus/observers.py @@ -72,7 +72,8 @@ def get_contracts_observer(project_dir, contract_filters=None, compiler_kwargs=N ) observer = PollingObserver() observer.schedule(event_handler, contracts_dir, recursive=True) - observer.schedule(event_handler, libraries_dir, recursive=True) + if os.path.exists(libraries_dir): + observer.schedule(event_handler, libraries_dir, recursive=True) return observer From 5bc17b4832c938baad959daa1858daefe2681a1d Mon Sep 17 00:00:00 2001 From: Piper Merriam Date: Wed, 13 Apr 2016 09:09:24 -0600 Subject: [PATCH 2/2] reorganize PR and Issue templates --- .github/ISSUE_TEMPLATE.md | 15 +++++++++++++++ .../PULL_REQUEST_TEMPLATE.md | 0 2 files changed, 15 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md rename ISSUE_TEMPLATE.md => .github/PULL_REQUEST_TEMPLATE.md (100%) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..df3a756e --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,15 @@ +* Populus Version: x.x.x +* OS: osx/linux/win + + +### What was wrong? + +Please include information like: + +* full output of the error you received +* what command you ran +* the code that caused the failure + +#### Cute Animal Picture + +> put a cute animal picture here. diff --git a/ISSUE_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md