-
Notifications
You must be signed in to change notification settings - Fork 32
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
Gui input processing #641
Merged
brittainhard
merged 32 commits into
ospc-org:master
from
hdoupe:gui_input_processing_619
Sep 18, 2017
Merged
Gui input processing #641
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
c29c3af
Prototype new GUI processing
8b1856f
Move new parameter processing to process_model and add comments
ffd0326
Update to taxcalc 0.10.0 and add local env setup script
5f5227a
Remove function closure
c9a8fb2
Update comments in to_json_reform function
aaad478
Remove setup_local_envs.sh
fb2eda3
Remove package_up_mods condition and use user_mods instead of mods
85183a8
Refactor process_model, file_input, personal_results
35a67d8
Add comments, change function name to submit_reform
bc783d9
Add error handling logic
7194532
Upgrade to taxcalc 0.10.1 and improve error handling logic
174834d
Revert from local taxcalc (version 0.10.2+) to 0.10.1
8e065fc
Save parsed json style reform
06aab4c
Bug in saving assumptions_dict
902a0f1
Fix behavioral response bugs
2aa97eb
Fix get_reform_from_gui and param parsing bugs
5b4b39b
Remove unnecessary casting
0536e20
Fix typo on comment
5aec330
Remove second nesting of assumptions dict
2ada5d2
Update test_behavioral.py
56038d0
Remove extra zero from test value
b87fc39
Use new parameter processing logic for dynamic params
ace8ca8
Work on no input case and taxbrain test_views.test_taxbrain_rt_to_pas…
56a3bb2
Update for boolean switch to 1's and 0's
439b924
Raise 400 in response to extra input
e0aaa06
Utilize warning/error message fix in taxcalc 0.10.2
1d9ff85
Pin taxcalc to version 0.10.2
6167537
Add xfail for growth param test
31f32d6
Clean up error handling logic
fa551d0
Remove versioneer.py
8d4c3aa
Add docstring to new or edited functions
650bcb1
Switches are 0/1 instead of True/False
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
nomkl | ||
taxcalc==0.9.0 | ||
taxcalc==0.10.0 | ||
btax==0.1.8 | ||
numba==0.33.0 | ||
pandas | ||
|
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,12 @@ | ||
#!/bin/bash | ||
conda uninstall taxcalc | ||
cd ~/Documents/Tax-Calculator | ||
python setup.py develop | ||
|
||
cd ~/Documents/OG-USA | ||
python setup.py develop | ||
|
||
cd ~/Documents/B-Tax | ||
python setup.py develop | ||
|
||
echo "Swap back to default aei_dropq env by running ./install_taxbrain_server.sh" |
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 |
---|---|---|
|
@@ -36,8 +36,8 @@ class DropqCompute(object): | |
num_budget_years = NUM_BUDGET_YEARS | ||
|
||
# Override if needed, e.g. btax | ||
def package_up_vars(self, *args, **kwargs): | ||
return _package_up_vars(*args, **kwargs) | ||
# def package_up_vars(self, *args, **kwargs): | ||
# return _package_up_vars(*args, **kwargs) | ||
|
||
def remote_submit_job(self, theurl, data, timeout=TIMEOUT_IN_SECONDS): | ||
response = requests.post(theurl, data=data, timeout=timeout) | ||
|
@@ -96,14 +96,14 @@ def submit_calculation(self, mods, first_budget_year, url_template, | |
pack_up_user_mods=True, | ||
additional_data={}): | ||
data = {} | ||
if pack_up_user_mods: | ||
user_mods = self.package_up_vars(mods, first_budget_year) | ||
if not bool(user_mods): | ||
return False | ||
user_mods = {first_budget_year:user_mods} | ||
else: | ||
user_mods = mods | ||
|
||
# if pack_up_user_mods: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Feel free to go ahead and delete this code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, will do. Thanks |
||
# user_mods = self.package_up_vars(mods, first_budget_year) | ||
# if not bool(user_mods): | ||
# return False | ||
# user_mods = {first_budget_year:user_mods} | ||
# else: | ||
# user_mods = mods | ||
user_mods = mods | ||
years = self._get_years(start_budget_year, num_years, first_budget_year) | ||
if use_wnc_offset: | ||
wnc, created = WorkerNodesCounter.objects.get_or_create(singleton_enforce=1) | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This file seems specialized to your development environment -- makes assumptions on paths. Also, not everyone who is working on webapp is also going to be working on ogusa / taxcalc / btax. I think it would be best to leave this out.
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.
Ok that's fine with me. I found it to be useful while I was debugging, but I see your point.