Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
debpal committed Dec 7, 2024
1 parent ff397b7 commit d3c166b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 64 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,64 +65,6 @@ jobs:
export PYTHONPATH=$(pwd)
pytest --cov=BharatFinTrack --cov-report=xml # Run tests and generate coverage report in XML format
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }} # This secret token should be added in your repository settings

test-python-3-11:
name: Test with Python 3.11
runs-on: ubuntu-latest
needs: test-python-3-12 # Runs only after the Python 3.11 tests complete

steps:
- name: Checkout repository
uses: actions/checkout@v4 # This checks out your code to the runner

- name: Set up Python 3.11
uses: actions/setup-python@v3 # Sets up the specified Python version
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-gh-action.txt # Install dependencies
- name: Run tests with pytest
run: |
export PYTHONPATH=$(pwd)
pytest --cov=BharatFinTrack --cov-report=xml # Run tests and generate coverage report in XML format
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }} # This secret token should be added in your repository settings

test-python-3-10:
name: Test with Python 3.10
runs-on: ubuntu-latest
needs: test-python-3-11 # Runs only after the Python 3.11 tests complete

steps:
- name: Checkout repository
uses: actions/checkout@v4 # This checks out your code to the runner

- name: Set up Python 3.10
uses: actions/setup-python@v3 # Sets up the specified Python version
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-gh-action.txt # Install dependencies
- name: Run tests with pytest
run: |
export PYTHONPATH=$(pwd)
pytest --cov=BharatFinTrack --cov-report=xml # Run tests and generate coverage report in XML format
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion BharatFinTrack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
]


__version__ = '0.1.9'
__version__ = '0.1.10'
2 changes: 1 addition & 1 deletion BharatFinTrack/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _download_nse_tri(
url=self.url_nse_index_tri_data,
headers=headers,
data=payload,
timeout=15
timeout=10
)
response_data = response.json()
records = json.loads(response_data['d'])
Expand Down
2 changes: 1 addition & 1 deletion BharatFinTrack/nse_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def download_daily_summary_report(
response = requests.get(
url=csv_url,
headers=headers,
timeout=30
timeout=10
)
soup = bs4.BeautifulSoup(
markup=response.content,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Using `BharatFinTrack`, you can quickly gain insights into the performance of NS

In the above graph, the `NIFTY MIDCAP150 MOMENTUM 50` emerges as one of the best-performing NSE equity `TRI` indices in terms of long-term CAGR. The next graph illustrates a comparison of year-wise investments and returns for a monthly SIP of 1,000 Rupees between a government bond and a passive fund tracking the `TRI` data of `NIFTY MIDCAP150 MOMENTUM 50`.

![Year-wise SIP comparison between Government Bond and NIFTY_MIDCAP150_MOMENTUM_50](https://github.com/debpal/BharatFinTrack/raw/master/docs/_static/sip_yearwise_NIFTY_MIDCAP150_MOMENTUM_50.png)
![Year-wise SIP comparison between Government Bond and NIFTY_MIDCAP150_MOMENTUM_50](https://github.com/debpal/BharatFinTrack/raw/master/docs/_static/sip_gsec_vs_NIFTY_MIDCAP150_MOMENTUM_50.png)

Additionally, the following plot compares the growth multiples (X) of a monthly SIP investment across `TRI` indices, including the popular index `NIFTY 50` and other top-performing NSE equity indices over the years.

Expand Down
4 changes: 2 additions & 2 deletions tests/test_bharatfintrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,5 +736,5 @@ def test_github_action(
):

assert core._github_action(
integer=2
) == '2'
integer=3
) == '3'

0 comments on commit d3c166b

Please sign in to comment.