Skip to content

Commit

Permalink
Merge pull request #21 from awhipp/feature/reorganize_window_service
Browse files Browse the repository at this point in the history
feat: ♻️ Refactoring Pydantic models and adding tests for window service
  • Loading branch information
awhipp authored May 2, 2024
2 parents 851134c + ec7ae08 commit fb699a6
Show file tree
Hide file tree
Showing 26 changed files with 1,314 additions and 495 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:

- name: Run tests
env:
# These are largely development default values
OANDA_ACCOUNT_ID: ${{secrets.OANDA_ACCOUNT_ID}}
OANDA_TOKEN: ${{secrets.OANDA_TOKEN}}
APP_RANDOM_WALK: "True"
Expand All @@ -44,6 +45,9 @@ jobs:
TIMESCALE_USER: postgres
TIMESCALE_PASSWORD: postgres
AWS_ENDPOINT_URL: http://localhost:4566
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_REGION: us-east-1
run: python -m poetry run python -m pytest --disable-warnings -xv --cov=. --cov-report=xml

- name: Pytest coverage comment
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.env
**.pyc
.coverage
__pycache__
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: name-tests-test

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
Expand Down
Loading

1 comment on commit fb699a6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Coverage

Code Coverage
FileStmtsMissCoverMissing
foresight
   __init__.py00100% 
foresight/indicator_services
   __init__.py00100% 
   indicator.py64640%3–5, 7–10, 12, 15, 18, 21–24, 26, 33–38, 44, 46–50, 52, 54, 57, 63, 65, 67–69, 73, 77–78, 82–84, 88, 90, 92, 94, 96, 108, 110–111, 117, 119, 122, 125, 128, 130, 132, 134–136, 138–139, 141, 143, 145
   moving_average_indicator.py18180%3, 5–6, 9, 12, 20–21, 28, 30, 33–34, 36–37, 40, 42, 45–46, 51
foresight/interface_service
   __init__.py00100% 
   app.py31310%3–4, 6–9, 11–12, 15, 18, 20, 23, 25, 33–34, 36, 39–40, 42, 45–46, 48–51, 53–54, 56, 59–61
foresight/stream_service
   __init__.py00100% 
   app.py711381%82, 110, 131, 133–134, 139, 142–148
foresight/stream_service/models
   __init__.py00100% 
   #.py40100% 
   stream.py180100% 
foresight/utils
   __init__.py00100% 
   aws.py12558%14, 33, 35–36, 43
   database.py551180%52–53, 70–71, 76, 91–92, 94, 98–100
   logger.py90100% 
foresight/utils/models
   __init__.py00100% 
   forex_data.py61296%164–165
   subscription_feed.py25292%90–91
foresight/window_service
   __init__.py00100% 
   app.py351071%20, 25–27, 70–71, 75, 77–78, 80
tests
   conftest.py240100% 
tests/stream_service
   conftest.py19952%21–22, 30, 33, 37–41
   stream_service_test.py410100% 
tests/utils/models
   forex_data_test.py610100% 
   subscription_feeds_test.py360100% 
tests/window_service
   window_service_test.py370100% 
TOTAL62116573% 

Please # to comment.