Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine all the implementation code to higher quality for release #29

Merged
merged 6 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ jobs:
CHAT_AZURE_API_VERSION: ${{ secrets.CHAT_AZURE_API_VERSION }}
CHAT_MAX_TOKENS: ${{ secrets.CHAT_MAX_TOKENS }}
CHAT_MODEL: ${{ secrets.CHAT_MODEL }}
CHAT_OPENAI_API_KEY: ${{ secrets.CHAT_OPENAI_API_KEY }}
CHAT_TEMPERATURE: ${{ secrets.CHAT_TEMPERATURE }}
EMBEDDING_AZURE_API_BASE: ${{ secrets.CHAT_AZURE_API_BASE }}
EMBEDDING_AZURE_API_VERSION: ${{ secrets.CHAT_AZURE_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_OPENAI_API_KEY: ${{ secrets.CHAT_OPENAI_API_KEY }}
name: lint test docs and build
run: make lint test docs build
strategy:
Expand Down Expand Up @@ -84,4 +82,4 @@ on:
- synchronize
push:
branches:
- master
- main
2 changes: 1 addition & 1 deletion .github/workflows/readthedocs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: fincov2
project-slug: RDAgent
name: Read the Docs Pull Request Preview
on:
pull_request_target:
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CONSTRAINTS_FILE := constraints/$(PYTHON_VERSION).txt
PUBLIC_DIR := $(shell [ "$$READTHEDOCS" = "True" ] && echo "$$READTHEDOCS_OUTPUT/html" || echo "public")

# URL and Path of changelog source code.
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://peteryang1.github.io/fincov2}/_sources/changelog.md.txt)
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://microsoft.github.io/rdagent}/_sources/changelog.md.txt)
CHANGELOG_PATH := docs/changelog.md

########################################################################################
Expand Down Expand Up @@ -63,8 +63,8 @@ dev-%:
init-qlib-env:
# note: You may need to install torch manually
# todo: downgrade ruamel.yaml in pyqlib
conda create -n qlibFinCo python=3.8 -y
@source $$(conda info --base)/etc/profile.d/conda.sh && conda activate qlibFinCo && which pip && pip install pyqlib && pip install ruamel-yaml==0.17.21 && pip install torch==2.1.1 && pip install catboost==0.24.3 && conda deactivate
conda create -n qlibRDAgent python=3.8 -y
@source $$(conda info --base)/etc/profile.d/conda.sh && conda activate qlibRDAgent && which pip && pip install pyqlib && pip install ruamel-yaml==0.17.21 && pip install torch==2.1.1 && pip install catboost==0.24.3 && conda deactivate

dev:
$(PIPRUN) pip install -e .[docs,lint,package,test] -c $(CONSTRAINTS_FILE)
Expand All @@ -89,11 +89,11 @@ isort:

# Check lint with mypy.
mypy:
$(PIPRUN) python -m mypy . --exclude FinCo --exclude finco --exclude rdagent/scripts --exclude test/scripts --exclude git_ignore_folder
$(PIPRUN) python -m mypy . --exclude rdagent/scripts --exclude git_ignore_folder

# Check lint with ruff.
ruff:
$(PIPRUN) ruff check . --exclude FinCo,finco,rdagent/scripts,test/scripts,git_ignore_folder
$(PIPRUN) ruff check . --exclude rdagent/scripts,git_ignore_folder

# Check lint with toml-sort.
toml-sort:
Expand All @@ -113,7 +113,7 @@ pre-commit:
# Clean and run test with coverage.
test-run:
$(PIPRUN) python -m coverage erase
$(PIPRUN) python -m coverage run --concurrency=multiprocessing -m pytest --ignore FinCo --ignore test/finco --ignore test/scripts
$(PIPRUN) python -m coverage run --concurrency=multiprocessing -m pytest --ignore test/scripts
$(PIPRUN) python -m coverage combine

# Generate coverage report for terminal and xml.
Expand Down Expand Up @@ -162,7 +162,7 @@ docs-gen:

# Generate mypy reports.
docs-mypy: docs-gen
$(PIPRUN) python -m mypy rdagent test --exclude FinCo --exclude git_ignore_folder --exclude finco --exclude rdagent/scripts --exclude test/scripts --html-report $(PUBLIC_DIR)/reports/mypy
$(PIPRUN) python -m mypy rdagent test --exclude git_ignore_folder --exclude rdagent/scripts --html-report $(PUBLIC_DIR)/reports/mypy

# Generate html coverage reports with badge.
docs-coverage: test-run docs-gen
Expand Down
Loading
Loading