-
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
Need to move read_egg_csv logic from Tax-Calculator to TaxBrain #501
Comments
No concerns have been expressed over the past week with regards to the request in #501 to move egg-reading-logic from Tax-Calculator code to TaxBrain code. Plus #501 has been added to the milestones in the webapp-public repo. So, I'm going to remove the egg logic from Tax-Calculator code in the next few days. |
@martinholmer, it makes more sense to me to wait until the logic is in webapp-public before removing it from Tax-Calculator so that we don't have a period of brokenness. |
@MattHJensen said:
How long will that wait be? #501 has such a low priority that it seems to me that is unlikely to be dealt with over the next half year. |
@martinholmer, did you mean to close this issue? Perhaps I don't understand why #501 is higher priority than the urgent issues in b2 and b3. Could you explain why #501 is urgent? Is it blocking other work? |
Reopening #501 after mistaken closing of issue. It is not so much that I think #501 is more urgent than the issues/bugs in the b2 and b3 milestone lists, but rather that it is a trivial thing to move the few lines of egg code from Tax-Calculator to TaxBrain. Tasks that can be helpful to progress in other repositories and that take little time should be handled quickly, in my view. If the future is anything like the recent past, as the weeks go on new items will be added to b2 and b3 and so items in b4 (like #501) will run the risk never getting addressed. |
Hi, Egg files don't have anything to do with Tax Brain. Egg files are a format from (one part of) the long history of Python packaging. Here is a reasonable summary from a couple of the top five links in a google search: http://stackoverflow.com/questions/2051192/what-is-a-python-egg It is correct that the act of reading a data file from an installed package is not tax-policy related logic. The Removing the
The benefit of this action seems to be "remove code that doesn't encapsulate tax logic from a Python package about tax logic." The disadvantages seem worse than the benefit as far as I can tell. |
@talumbau, Thanks for your informative response to TaxBrain issue #501 on the best location for egg logic. Given what you say, I've got a few questions. (1) So, the egg is inside (that is, part of) the taxcalc package, right or wrong? (2) Why are we using the obsolete egg technology instead of the PEP427 wheel technology? (3) Given that the |
No, that is not correct. One way to say it is that the egg file is the physical manifestation of the package on the filesystem of the computer. The egg file format is the specification of how this file is laid out on disk. The data files that are distributed with the Tax-Calculator package are inside this file, in a way governed by the egg file format (which is essentially a zip file).
The wheel format has seen less adoption than the egg format, although the official recommendation is wheel. The wheel format was meant to solve many of the shortcomings of egg (including issues of binary dependencies) but the problem is that it didn't actually solve all of the issues. There's much that could be said here, and many people are working hard to make wheels better. The momentum behind wheels is not as great anymore because many people choose to solve the problem by using conda packages. Some good reading is this blog post that discusses how conda fits in to this whole picture. As I said in my original post, the history of Python packaging is long.
I thought all of this was hashed out in PSLmodels/Tax-Calculator#1119 on Tax-Calculator (and follow-on issues). @PeterDSteinberg knows the details. One salient point: some clients of Tax-Calculator don't need the PUF. For example, the front end for Tax Brain needs to install Tax-Calculator as a dependency but it does not need the PUF. The reason is because it needs to call certain functions like Policy.default_data to populate the initial TaxBrain page with defaults for the given year. Obviously, the compute nodes need the PUF to do the actual calculations.
I don't know what this means. Are you asking why everything works right now? The package works right now because, for every file in the MANIFEST.in, we use a standard practice for distributing data files with the package and for reading data files from that package. For example, when calling
This is solved via the My main question would be the following: what is the benefit of the removal of this capability from the Tax-Calculator? This issue is already fairly long (and could become even longer) but there doesn't appear to be a clear stated benefit for this proposed change. I have seen several PRs recently on Tax-Calculator mention that some of the few remaining lines that are not under test coverage involve these lines of code. Is that the driver here? Surely the better path is to pursue a script to run under Travis CI that exercises this code, rather than remove the ability to use Tax-Calculator as a package that one can have as a dependency in some other code. |
@talumbau, Thanks for your extremely helpful answers to my questions in issue #501. I'm in total agreement with your final thought:
The problem is that I've asked how to construct such tests but didn't get an answer. I'm closing issue #501 now. Thanks again for the tutorial on Python eggs and Conda packages. |
Since this TaxBrain issue #501 is being read again in July, 2017, let me clarify that the
|
Currently the Tax-Calculator repo contains TaxBrain logic, which logically should be part of TaxBrain.
There is a
read_egg_csv
function intaxcalc/utils.py
and it is called from therecords.py
file and from thegrowfactors.py
file.Can this utility function and its calls be moved to TaxBrain? Tax-Calculator knows nothing about eggs. Isn't that a TaxBrain concept?
@MattHJensen @PeterDSteinberg @brittainhard
The text was updated successfully, but these errors were encountered: