Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
123 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ dist/ | |
*.pyc | ||
*.ipynb | ||
*.egg-info | ||
cli_tests/outputs | ||
.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"clean_dir": [ | ||
"$data_dir", | ||
"clean" | ||
], | ||
"raw_dir": [ | ||
"$data_dir", | ||
"raw" | ||
], | ||
"latest_data": [ | ||
"$raw_dir", | ||
"$$VERSION", | ||
"data.csv" | ||
], | ||
"test_dir": [ | ||
"$data_dir", | ||
"tests" | ||
], | ||
"__ENV": { | ||
"VERSION": "1.0.0" | ||
}, | ||
"data_dir": [ | ||
"data" | ||
], | ||
"codebook_dir": [ | ||
"$clean_dir", | ||
"codebooks" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
No `.paths.json` file found! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export clean_dir="data/clean" | ||
export raw_dir="data/raw" | ||
export latest_data="data/raw/1.0.0/data.csv" | ||
export test_dir="data/tests" | ||
export data_dir="data" | ||
export codebook_dir="data/clean/codebooks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
clean_dir?=data/clean | ||
raw_dir?=data/raw | ||
latest_data?=data/raw/1.0.0/data.csv | ||
test_dir?=data/tests | ||
data_dir?=data | ||
codebook_dir?=data/clean/codebooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
############################################################################### | ||
# setUp | ||
############################################################################### | ||
|
||
set -ev # Fail on first non-zero return value. | ||
rm -rf cli_tests/outputs && mkdir cli_tests/outputs | ||
|
||
############################################################################### | ||
# Test that automagic importing works. | ||
############################################################################### | ||
|
||
PWD=tests/examples/twitter python -c "from pathsjson.automagic import PATHS;" | ||
|
||
############################################################################### | ||
# 1. Test without any ancestral .paths.json | ||
############################################################################### | ||
|
||
(coverage run --source=pathsjson --append -m pathsjson.cli --shell-exports \ | ||
> cli_tests/outputs/test_1.txt) || true | ||
|
||
cmp -b cli_tests/outputs/test_1.txt cli_tests/test_1.expected.txt | ||
|
||
############################################################################### | ||
# 2. Test --shell-exports | ||
############################################################################### | ||
|
||
(PWD=cli_tests/full_env | ||
coverage run --source=pathsjson --append -m pathsjson.cli --shell-exports \ | ||
> cli_tests/outputs/test_2.txt) || true | ||
|
||
diff cli_tests/outputs/test_2.txt cli_tests/test_2.expected.txt | ||
|
||
############################################################################### | ||
# 3. Test --make-exports | ||
############################################################################### | ||
|
||
(PWD=cli_tests/full_env \ | ||
coverage run --source=pathsjson --append -m pathsjson.cli --make-exports \ | ||
> cli_tests/outputs/test_3.txt) || true | ||
diff cli_tests/outputs/test_3.txt cli_tests/test_3.expected.txt | ||
|
||
############################################################################### | ||
# tearDown | ||
############################################################################### | ||
rm -rf cli_tests/outputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"__ENV": { "VERSION": "1.0.0" }, | ||
"special": ["root", "$$VERSION", "$$user_name"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters