Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

fix: coverage error #28

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/actions/python_test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ runs:
steps:
- name: run pytest and generate code coverage report
run: |
pdm run coverage run -m pytest
pdm run coverage xml -o ./coverage_report.xml
pdm run pytest tests -v --cache-clear --junitxml=./coverage_report.xml
shell: bash
# using: https://github.com/dorny/test-reporter
- name: test coverage report
Expand All @@ -16,4 +15,4 @@ runs:
with:
name: Python Tests # Name of the check run which will be created
path: ./coverage_report.xml # Path to test results
reporter: jest-junit
reporter: java-junit
5 changes: 5 additions & 0 deletions .github/workflows/python_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
release:
types: [published, prereleased]

permissions:
checks: write
contents: write
pull-requests: write

jobs:
test-python-project:
uses: ./.github/workflows/python_test.yaml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/python_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
paths:
- '**.py'
- '**.yaml'

permissions:
checks: write
contents: write
pull-requests: write

# reference: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
jobs:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ There are five main components in the project.
2. Data Preprocessor: A preprocessor attempts to refine the retrieved data from a data acquisition component.

3. RL Algorithmic Model: A reinforcement learning algorithm must be implemented to integrate with the system. That is, you need to define
- class
- state
- a collection of actions
- reward

Expand Down
52 changes: 1 addition & 51 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ classifiers = [
"Operating System :: POSIX :: Linux",
]

dependencies = ["yfinance>=0.2.27", "numpy>=1.25.2", "pandas>=2.0.3"]
dependencies = [
"yfinance>=0.2.27",
"numpy>=1.25.2",
"pandas>=2.0.3",
]

[project.urls]
"Github Repository" = "https://github.com/uponTheSky/earningtrader"
Expand All @@ -22,14 +26,12 @@ requires = ["pdm-backend"]
build-backend = "pdm.backend"

[tool.pdm.dev-dependencies]
test = ["pytest>=7.4.0", "coverage>=7.3.0"]
test = [
"pytest>=7.4.0",
]
lint = ["ruff>=0.0.282"]
format = ["black>=23.7.0"]
jupyter = [
"notebook>=7.0.2",
"jupyter>=1.0.0",
"matplotlib>=3.7.2",
]
jupyter = ["notebook>=7.0.2", "jupyter>=1.0.0", "matplotlib>=3.7.2"]

[tool.pdm.scripts]
test = "pytest tests"