b-k / py1040 Goto Github PK
View Code? Open in Web Editor NEWA U.S. personal income tax calculator
License: GNU General Public License v2.0
A U.S. personal income tax calculator
License: GNU General Public License v2.0
great code;
I tried comparing e.g. single W2 of $30,000 and got $1945 vs. $1942 for Federal taxes from smartasset
but missing FICA and state (I tried California and got 4% marginal on 30k income) I think..
Using brew-installed python 3.5.1 on OSX, at step "3. Run python3 taxes.py
again. It will generate inform.py
", we get:
$ python3 taxes.py
python3 taxes.py
Traceback (most recent call last):
File "taxes.py", line 102, in <module>
exec(open("taxforms.py").read())
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 29918: ordinal not in range(128)
because of the non-ascii hyphen at line 327 (and line 329):
f1040_sched_a_employee_expenses = cell("Unreimbursed employee expenses—job travel, union dues, job education, etc.", 21, "", flag="u itemizing", name="f1040_sched_a_employee_expenses", form="f1040_sched_a"),
Declaring UTF8 encoding at the top of the tax forms.py didn't help:
# -*- coding: utf-8 -*-
Replacing them with ascii hyphens fixed it.
Please change any reference to 1040
to 1040 (2015)
. This will help the code grow next year.
The following block of code begins on line 98 of taxes.py:
if status=="single" and kids+dependents > 0:
print("Changing Single with dependents to Head of Household.")
status="head of household"
I believe this can lead to an incorrect change of the filing status specified in interview.py if one is trying to specify "Married filing separately" under some circumstances.
Information on filing status is available from the IRS at: https://www.irs.gov/publications/p501. My understanding is that having a child dependent is not sufficient to allow filing as "head of household".
The IRS provides this questionnaire to determine filing status: https://www.irs.gov/help/ita/what-is-my-filing-status. Answering the questions as e.g.:
tax year: 2021
marital status: married
intend to file a return with your spouse: no
lived together: yes
Produces the result: "Your filing status is married filing separately." I.e. not "head of household."
Fix: remove the block of code quoted above from taxes.py?
PS - thanks for creating and maintaining this tool!
gsed is the GNU sed, sed is the one comes with OS X.
$ sed '$$a)'
sed: 1: "$$a)": invalid command code $
$ gsed '$$a)'
gsed: -e expression #1, char 2: unknown command: `$'
taxes.py need to read taxforms.py but doesn't exist in the repo.
I ran py1040 with test data and see this:
66.5 | Earned income credit (EIC) | 91.8
74 | Total payments | 91.8
75 | Refund! | 91.8
78 | Tax owed | 0
It makes it look like I have an EIC equal to my tax owed and yet also have a refund.
This is not very clear. Shouldn't "Total payments" be indicated as negative?
The Readme quick start instructions don't seem to work.
After filling out interview.py and running taxes.py again I get the following error:
Traceback (most recent call last): File "taxes.py", line 98, in <module> exec(open("taxforms.py").read()) FileNotFoundError: [Errno 2] No such file or directory: 'taxforms.py'
I ran the make file then ran taxes.py again to see if it would fix the error, but then I got a new error:
Traceback (most recent call last): File "taxes.py", line 110, in <module> setup_inform(print_out=True) File "taxes.py", line 19, in setup_inform for i in cell_list.items(): NameError: name 'cell_list' is not defined
This is the first time I submit an issue...hopefully i did it somewhat correctly.
The calculated taxable income does not match the 2019 tax table. Is this perhaps using a tax table from a previous year?
Error when running 'make' command and python version is 2.7.6
:
$ make
git clone https://github.com/b-k/1040.js
Cloning into '1040.js'...
remote: Counting objects: 205, done.
remote: Total 205 (delta 0), reused 0 (delta 0), pack-reused 205
Receiving objects: 100% (205/205), 561.19 KiB | 523.00 KiB/s, done.
Resolving deltas: 100% (123/123), done.
Checking connectivity... done.
echo "###AUTOGENERATED via m4. Please edit the sources." > taxforms.py
m4 -P macros/pull_fns.m4 1040.js/forms/f*.m4 1040.js/forms/s*.m4 >> taxforms.py
m4 -P macros/pull_deps.m4 1040.js/forms/f*.m4 1040.js/forms/s*.m4 | sed '$a)' >> taxforms.py
m4 -P macros/pull_nodes.m4 1040.js/forms/f*.m4 1040.js/forms/s*.m4 | sed '$a)' >> taxforms.py
python taxes.py
File "taxes.py", line 54
SyntaxError: Non-ASCII character '\xe2' in file taxes.py on line 54, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
make: *** [run] Error 1
I am facing this issue while running the app.
image
The concept of this project is strong on its own but what immediately sold me on it was seeing this tweet:
https://twitter.com/konklone/status/711227705996550145
It should hook just about anyone who loves stdout, and more importantly, it gives some clue to the scope (and limitations) of the scripts without the user having to get their tax info out to test it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.