Skip to content

Commit

Permalink
Merge pull request #148 from martinholmer/renamed-repo
Browse files Browse the repository at this point in the history
Revise code comments and documentation to reflect new repository name
  • Loading branch information
martinholmer authored Jun 2, 2019
2 parents 030cc3c + 28afd17 commit 2e9393f
Show file tree
Hide file tree
Showing 28 changed files with 101 additions and 1,606 deletions.
39 changes: 4 additions & 35 deletions CODING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Coding Style
============

This description of pitaxcalc-demo coding style is written for a
person who wants to contribute changes to pitaxcalc-demo source code.
This description of TPRU-India taxcalc coding style is written for a
person who wants to contribute changes to taxcalc source code.
It assumes that you have read the [USA Tax-Calculator Contributor
Guide](https://github.com/PSLmodels/Tax-Calculator/blob/master/CONTRIBUTING.md#tax-calculator-contributor-guide),
have cloned the [central GitHub pitaxcalc-demo
repository](https://github.com/TPRU-demo/pitaxcalc-demo)
have cloned the [central GitHub taxcalc
repository](https://github.com/TPRU-India/taxcalc)
to your GitHub account and to your local computer, and are familiar
with how to prepare a pull request for consideration by the core
development team. This document describes the coding style you should
Expand Down Expand Up @@ -80,34 +80,3 @@ or
```
pycodestyle taxcalc
```

pylint
------

The other of these tools, `pylint`, warns about deviations from a
broader set coding styles than does `pycodestyle`. The use of `pylint`,
while being the number one recommendation in the [Google Python Style
Guide](https://google.github.io/styleguide/pyguide.html), is
strictly-speaking optional for pitaxcalc-demo work. But several
important files in the repository are maintained in a way that their
coding style does not generate any `pylint` warnings. You can
determine which files these are by looking for the comment near the
top of the file that begins `# CODING-STYLE CHECKS:`. It is
recommended that, if you are proposing changes in one these files, you
check your work by running the `pylint` command listed in that file's
coding-style comment.

Make sure you have an up-to-date version of `pylint` installed on your
computer by entering at the operating system command line:
```
pylint --version
```
If you get a no-such-command error, install `pylint` as follows:
```
conda install pylint
```
If you do have `pylint` installed, but the version is before 1.8.4,
then get a more recent version as follows:
```
conda update pylint
```
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Codecov](https://codecov.io/gh/TPRU-demo/pitaxcalc-demo/branch/master/graph/badge.svg)](https://codecov.io/gh/TPRU-demo/pitaxcalc-demo)
[![Python 3.6+](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Codecov](https://codecov.io/gh/TPRU-India/taxcalc/branch/master/graph/badge.svg)](https://codecov.io/gh/TPRU-India/taxcalc)


Demonstration repository for Personal Income Tax (PIT) microsimulation model
============================================================================
Tax Microsimulation Model for India
===================================

This repository will be used in the World-Bank-sponsored training
sessions beginning on 2018-09-24 in New Delhi at the Ministry of
Finance.
This repository was established for the World-Bank-sponsored training
sessions that began during September 2018 in New Delhi at the Tax
Policy Research Unit (TPRU) in the Ministry of Finance. The training
sessions extended through June 2019. This repository, which is called
`taxdata` and is owned by the GitHub organizaton called `TPRU-India`,
is now managed by TPRU.

Getting Started
---------------

If you want to **propose code changes**, follow the directions in the
[USA Tax-Calculator Contributor
Guide](https://github.com/PSLmodels/Tax-Calculator/blob/master/CONTRIBUTING.md#tax-calculator-contributor-guide)
on how to clone the pitaxcalc-demo git repository. Before developing
on how to clone the TPRU-India taxcalc git repository. Before developing
any code changes be sure to read completely the Contributor Guide and
then read about our [coding
style](https://github.com/TPRU-demo/pitaxcalc-demo/blob/master/CODING.md#coding-style)
style](https://github.com/TPRU-India/taxcalc/blob/master/CODING.md#coding-style)
and [testing
procedures](https://github.com/TPRU-demo/pitaxcalc-demo/blob/master/TESTING.md#testing-procedures).
procedures](https://github.com/TPRU-India/taxcalc/blob/master/TESTING.md#testing-procedures).
You may find this [git cheat
sheet](https://github.com/TPRU-demo/pitaxcalc-demo/blob/master/SIMPLE_GIT_USAGE.md#simple-git-usage)
sheet](https://github.com/TPRU-India/taxcalc/blob/master/SIMPLE_GIT_USAGE.md#simple-git-usage)
useful in preparing a GitHub pull request that contains your proposed
code changes. The step-by-step workflow used to create and modify a
new pull request has been documented for the USA Tax-Calculator in this
[workflow document](https://github.com/open-source-economics/Tax-Calculator/blob/master/WORKFLOW.md#tax-calculator-pull-request-workflow).
[workflow document](https://github.com/PSLmodels/Tax-Calculator/blob/master/WORKFLOW.md#tax-calculator-pull-request-workflow).

The pitaxcalc-demo [release
history](https://github.com/TPRU-demo/pitaxcalc-demo/blob/master/RELEASES.md#pitaxcalc-demo-release-history)
provides a summary of past development work.
The taxcalc [release
history](https://github.com/TPRU-India/taxcalc/blob/master/RELEASES.md#taxcalc-release-history)
provides a high-level summary of past development work.
35 changes: 13 additions & 22 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
pitaxcalc-demo RELEASE HISTORY
==============================
Go [here](https://github.com/TPRU-demo/pitaxcalc-demo/pulls?q=is%3Apr+is%3Aclosed) for a complete commit history.
taxcalc RELEASE HISTORY
=======================
Go [here](https://github.com/TPRU-India/taxcalc/pulls?q=is%3Apr+is%3Aclosed) for a complete commit history.

Release numbering attempts to comply with [semantic
versioning](https://semver.org/).


2018-09-19 Release 1.0.0
2019-06-02 Release 2.0.0
------------------------
(last merged pull request is
[#14](https://github.com/TPRU-demo/pitaxcalc-demo/pull/14))
[#148](https://github.com/TPRU-India/taxcalc/pull/148))

**Initial version with data and tax logic for USA**
**Initial version with data and code for simulating the India personal
income tax, corporate income tax, and goods and services tax (GST)**


See
[app_usa.py](https://github.com/TPRU-demo/pitaxcalc-demo/blob/master/app_usa.py)
for an example of how to use release 1.0.0 to analyze the effects of a
tax reform.
2018-09-19 Release 1.0.0
------------------------
(last merged pull request is
[#14](https://github.com/TPRU-India/taxcalc/pull/14))

Note that you can always open a branch on you local computer that contains
release 1.0.0 by executing this command:
```
git checkout -b b100 1.0.0
```
That command will leave you on the b100 branch. When you're finished
using 1.0.0, be sure to checkout the master branch and then delete the
b100 branch:
```
git checkout master
git branch -d b100
```
**Obsolete demonstration version with data and tax logic for USA**
8 changes: 4 additions & 4 deletions SIMPLE_GIT_USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Simple Git Usage
This list of elementary git commands assumes that you (1) have read
the [USA Tax-Calculator Contributor
Guide](https://github.com/PSLmodels/Tax-Calculator/blob/master/CONTRIBUTING.md#tax-calculator-contributor-guide),
(2) have forked the [central GitHub pitaxcalc-demo
repository](https://github.com/TPRU-demo/pitaxcalc-demo) to your
(2) have forked the [central GitHub TPRU-India taxcalc
repository](https://github.com/TPRU-India/taxcalc) to your
GitHub account, and (3) have cloned your forked repository to your
local computer. After doing these three things: the central GitHub
repository is known as `upstream` and your personal forked GitHub
Expand Down Expand Up @@ -90,8 +90,8 @@ git push origin [existing-branch-name]
**Submit pushed branch as pull request**
```
do this interactively in your browser at the
[central GitHub pitaxcalc-demo
repository](https://github.com/TPRU-demo/pitaxcalc-demo)
[central GitHub TPRU-India taxcalc
repository](https://github.com/TPRU-India/taxcalc)
```

**Delete an old branch from local repo**
Expand Down
18 changes: 8 additions & 10 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
Testing Procedures
==================

This description of pitaxcalc-demo testing procedure is written for a
person who wants to contribute changes to pitaxcalc-demo source code.
This description of taxcalc testing procedure is written for a
person who wants to contribute changes to taxcalc source code.
It assumes that you have read the [USA Tax-Calculator Contributor
Guide](https://github.com/PSLmodels/Tax-Calculator/blob/master/CONTRIBUTING.md#tax-calculator-contributor-guide)
and have cloned the [central GitHub pitaxcalc-demo
repository](https://github.com/TPRU-demo/pitaxcalc-demo)
and have cloned the [central GitHub TPRU-India taxcalc
repository](https://github.com/TPRU-India/taxcalc)
to your GitHub account and to your local computer, and are familiar
with how to prepare a pull request for consideration by the core
development team. This document describes the testing procedure you
should follow on your local computer before submitting a development
branch as a pull request to the central pitaxcalc-demo repository at
GitHub.
branch as a pull request to the central taxcalc repository at GitHub.

Currently there are two phases of testing.

Expand All @@ -39,8 +38,7 @@ Testing with pytest
--------------------

Run the second-phase of testing as follows at the command prompt in
the pitaxcalc-demo directory at the top of the repository directory
tree:
the taxcalc directory at the top of the repository directory tree:

```
cd taxcalc
Expand All @@ -58,14 +56,14 @@ Interpreting the Test Results
-----------------------------

If you are adding an enhancement that expands the capabilities of
pitaxcalc-demo, then all the tests you can run should pass before you
taxcalc, then all the tests you can run should pass before you
submit a pull request containing the enhancement. In addition, it
would be highly desirable to add a test to the pytest suite, which is
located in the ```taxcalc/tests``` directory, that somehow checks that
your enhancement is working as you expect it to work.

On the other hand, if you think you have found a bug in the
pitaxcalc-demo source code, the first thing to do is add a test to the
taxcalc source code, the first thing to do is add a test to the
pytest suite that demonstrates how the source code produces an
incorrect result (that is, the test fails because the result is
incorrect). Then change the source code to fix the bug and
Expand Down
2 changes: 1 addition & 1 deletion app0.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
app0.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
app0.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app0.py > app0.res
CHECK: Use your favorite Windows diff utility to confirm that app0.res is
the same as the app0.out file that is in the repository.
Expand Down
8 changes: 4 additions & 4 deletions app00.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
app00.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app0.py > app0.res
CHECK: Use your favorite Windows diff utility to confirm that app0.res is
the same as the app0.out file that is in the repository.
app00.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app00.py > app00.res
CHECK: Use your favorite Windows diff utility to confirm that app00.res is
the same as the app00.out file that is in the repository.
"""
import pandas as pd
from taxcalc import *
Expand Down
8 changes: 4 additions & 4 deletions app000.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
app0.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app0.py > app0.res
CHECK: Use your favorite Windows diff utility to confirm that app0.res is
the same as the app0.out file that is in the repository.
app000.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app000.py > app000.res
CHECK: Use your favorite Windows diff utility to confirm that app000.res is
the same as the app000.out file that is in the repository.
"""
from taxcalc import *

Expand Down
8 changes: 4 additions & 4 deletions app001.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
app1.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app1.py > app1.res
CHECK: Use your favorite Windows diff utility to confirm that app1.res is
the same as the app1.out file that is in the repository.
app1.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app001.py > app001.res
CHECK: Use your favorite Windows diff utility to confirm that app001.res is
the same as the app001.out file that is in the repository.
"""
from taxcalc import *

Expand Down
4 changes: 2 additions & 2 deletions app002-1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
app1.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app2.py
app002-1.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app002-1.py
"""
from babel.numbers import format_currency
from taxcalc import *
Expand Down
6 changes: 3 additions & 3 deletions app002.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
app1.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app2.py
app002.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app002.py
"""
from babel.numbers import format_currency
from taxcalc import *
Expand Down Expand Up @@ -80,4 +80,4 @@ def ind_currency(curr):
print(f'Total Number of Households in - {year}: {ind_currency(total_weight2)[1:]}')




8 changes: 4 additions & 4 deletions app01.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
app01.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app0.py > app0.res
CHECK: Use your favorite Windows diff utility to confirm that app0.res is
the same as the app0.out file that is in the repository.
app01.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app01.py > app01.res
CHECK: Use your favorite Windows diff utility to confirm that app01.res is
the same as the app01.out file that is in the repository.
"""
import pandas as pd
from taxcalc import *
Expand Down
8 changes: 4 additions & 4 deletions app02.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
app01.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app0.py > app0.res
CHECK: Use your favorite Windows diff utility to confirm that app0.res is
the same as the app0.out file that is in the repository.
app02.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app02.py > app02.res
CHECK: Use your favorite Windows diff utility to confirm that app02.res is
the same as the app02.out file that is in the repository.
"""
import pandas as pd
from taxcalc import *
Expand Down
2 changes: 1 addition & 1 deletion app1.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
app1.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
app1.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app1.py > app1.res
CHECK: Use your favorite Windows diff utility to confirm that app1.res is
the same as the app1.out file that is in the repository.
Expand Down
4 changes: 2 additions & 2 deletions app14.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
app1.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app2.py
app14.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app14.py
"""
import locale
from taxcalc import *
Expand Down
6 changes: 2 additions & 4 deletions app1_keshav.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
app1_keshav.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app0.py > app0.res
CHECK: Use your favorite Windows diff utility to confirm that app0.res is
the same as the app1_keshav.out file that is in the repository.
app1_keshav.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app1_keshav.py
"""
from taxcalc import *

Expand Down
8 changes: 1 addition & 7 deletions app2.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
"""
app1.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
<<<<<<< HEAD
USAGE: python app1.py > app1.res
CHECK: Use your favorite Windows diff utility to confirm that app1.res is
the same as the app1.out file that is in the repository.
=======
app2.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app2.py
>>>>>>> upstream/master
"""
from taxcalc import *

Expand Down
4 changes: 2 additions & 2 deletions app3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
app1.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app2.py
app3.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app3.py
"""
from taxcalc import *

Expand Down
6 changes: 2 additions & 4 deletions appPIT.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
appKA.py illustrates use of pitaxcalc-demo release 2.0.0 (India version).
USAGE: python app0.py > app0.res
CHECK: Use your favorite Windows diff utility to confirm that app0.res is
the same as the app0.out file that is in the repository.
appPIT.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python appPIT.py
"""
import locale
from taxcalc import *
Expand Down
7 changes: 3 additions & 4 deletions app_dist_tables00.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""
app_dist_Tables00.py illustrates use of pitaxcalc-demo release 2.0.0
(India version).
USAGE: python app_dist_Tables00.py
app_dist_tables00.py illustrates use of TPRU-India taxcalc release 2.0.0
USAGE: python app_dist_tables00.py
"""
import locale
from taxcalc import *
Expand Down Expand Up @@ -156,4 +155,4 @@
with open('dist-table-part-clp-avg'+str(year)+'.txt', 'w') as dfile:
dt1.to_string(dfile, columns=to_include)
with open('dist-table-part-ref-avg'+str(year)+'.txt', 'w') as dfile:
dt2.to_string(dfile, columns=to_include)
dt2.to_string(dfile, columns=to_include)
Loading

0 comments on commit 2e9393f

Please sign in to comment.