Skip to content
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

Why separate dropq_version when it's identical to taxcalc_version? #639

Closed
martinholmer opened this issue Aug 25, 2017 · 5 comments
Closed

Comments

@martinholmer
Copy link
Contributor

The code for TaxBrain is pretty complicated. Some of that complexity is required because TaxBrain is a complex web application. But some of it seems obsolete, and therefore, makes the code unnecessarily complex. An example of this, is the dropq_version variable, which (now that dropq is part of the taxcalc package) is identical to taxcalc_version. So, why not simplify the code by removing all references to dropq_version and, where necessary, replace it with taxcalc_verison?

@brittainhard @MattHJensen @hdoupe @GoFroggyRun

@MattHJensen
Copy link
Contributor

That seems like a wise suggestion to me.

@hdoupe
Copy link
Collaborator

hdoupe commented Aug 28, 2017

@martinholmer I agree. Since I've been working on #619, I've noticed that the webapp code be cleaned up significantly. I think this issue is just one example. There are a lot of unused imports and what appears to be overly complicated code.

@brittainhard
Copy link
Contributor

@martinholmer can you point out some code where you are seeing this?

@martinholmer
Copy link
Contributor Author

martinholmer commented Oct 3, 2017

@brittainhard asked in issue #639:

can you point out some code where you are seeing this [that is, use of dropq_version]?

This obsolete usage is littered all over the PolicBrain repository:

Grep started at Tue Oct  3 17:36:05

grep -nr --include="*py" "dropq_version" .
./deploy/taxbrain_server/celery_tasks.py:101:    results['dropq_version'] = vinfo['version']
./deploy/taxbrain_server/celery_tasks.py:143:    results['dropq_version'] = vinfo['version']
./deploy/taxbrain_server/celery_tasks.py:165:    results['dropq_version'] = vinfo['version']
./deploy/taxbrain_server/celery_tasks.py:191:    results['dropq_version'] = vinfo['version']
./deploy/taxbrain_server/celery_tasks.py:211:    results['dropq_version'] = vinfo['version']
./deploy/taxbrain_server/tests/test_celery_tasks.py:110:    assert 'dropq_version' in result
./webapp/apps/btax/compute.py:15:                                dropq_version)
./webapp/apps/dynamic/compute.py:14:dropq_version = dqversion_info['version']
./webapp/apps/dynamic/compute.py:174:            versions = [r.get('dropq_version', None) for r in ans]
./webapp/apps/dynamic/compute.py:175:            if not all([same_version(ver, dropq_version) for ver in versions]):
./webapp/apps/taxbrain/compute.py:14:dropq_version = dqversion_info['version']
./webapp/apps/taxbrain/compute.py:245:            versions = [r.get('dropq_version', None) for r in ans]
./webapp/apps/taxbrain/compute.py:246:            if not all([same_version(ver, dropq_version) for ver in versions]):
./webapp/apps/taxbrain/compute.py:289:            versions = [r.get('dropq_version', None) for r in ans]
./webapp/apps/taxbrain/compute.py:290:            if not all([same_version(ver, dropq_version) for ver in versions]):
./webapp/apps/taxbrain/compute.py:350:                '"dropq_version": "0.6.a96303", "taxcalc_version": '

Grep finished (matches found) at Tue Oct  3 17:36:05

There is no difference between dropq_version and taxcalc_version and there hasn't been a difference for a year or two.

Can we remove this obsolete code from the PolicyBrain repository?

@MattHJensen @hdoupe @GoFroggyRun

@martinholmer
Copy link
Contributor Author

This issue has been labeled "Priority" for almost a year, so I guess it is either fixed or it really isn't a priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants