-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae046db
commit 7543941
Showing
306 changed files
with
3,738 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[bumpversion] | ||
current_version = 0.1.0 | ||
commit = True | ||
tag = False | ||
|
||
[bumpversion:file:python/aat/aat/__init__.py] | ||
search = __version__ = "{current_version}" | ||
replace = __version__ = "{new_version}" | ||
|
||
[bumpversion:file:python/aat/setup.py] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" | ||
|
||
# [bumpversion:file:js/package.json] | ||
# search = "version": "{current_version}" | ||
# replace = "version": "{new_version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,14 @@ | ||
PYTHON=python | ||
CONFIG=./config/synthetic.cfg | ||
|
||
|
||
run: ## Clean and make target, run target | ||
$(PYTHON) -m aat --config $(CONFIG) | ||
|
||
runcpp: build ## Clean and make target, run target | ||
AAT_USE_CPP=1 $(PYTHON) -m aat --config $(CONFIG) | ||
|
||
rundebug: debug ## Clean and make debug target, run target | ||
$(PYTHON) -m aat --config $(CONFIG) | ||
|
||
stratres: ## View strategy results offline | ||
$(PYTHON) -m aat.strategy.calculations | ||
|
||
buildextf: ## build the package extensions | ||
$(PYTHON) setup.py build_ext -j8 --inplace -f | ||
|
||
buildext: ## build the package extensions | ||
$(PYTHON) setup.py build_ext -j8 --inplace | ||
|
||
build: buildext ## build the package | ||
$(PYTHON) setup.py build | ||
|
||
debug: ## build debug build of the package | ||
DEBUG=1 $(PYTHON) setup.py build | ||
|
||
install: ## install the package | ||
$(PYTHON) -m pip install . | ||
|
||
tests: build testpy ## Make unit tests | ||
|
||
testpy: ## Make unit tests | ||
$(PYTHON) -m pytest -vvv ./aat/tests --cov=aat --junitxml=python_junit.xml --cov-report=xml --cov-branch | ||
|
||
testpycpp: ## Make unit tests | ||
# AAT_USE_CPP=1 $(PYTHON) -m pytest -vvv ./aat/tests --cov=aat --junitxml=python_junit.xml --cov-report=xml --cov-branch --capture=no | ||
AAT_USE_CPP=1 $(PYTHON) -m pytest -vs ./aat/tests | ||
|
||
testruns: testrunscsv testrunsiex ## Run a few examples as a live end-to-end test | ||
|
||
testrunscsv: | ||
$(PYTHON) -m aat.strategy.sample.csv.readonly | ||
$(PYTHON) -m aat.strategy.sample.csv.readonly_periodic | ||
$(PYTHON) -m aat.strategy.sample.csv.received | ||
|
||
testrunsiex: | ||
$(PYTHON) -m aat.strategy.sample.iex.readonly | ||
TESTING=1 $(PYTHON) -m aat.strategy.sample.iex.buy_and_hold | ||
TESTING=1 $(PYTHON) -m aat.strategy.sample.iex.momentum | ||
TESTING=1 $(PYTHON) -m aat.strategy.sample.iex.golden_death | ||
|
||
lint: lintpy lintcpp ## run all linters | ||
|
||
lintpy: ## run python linter | ||
$(PYTHON) -m flake8 aat setup.py | ||
|
||
lintcpp: ## run cpp linter | ||
cpplint --linelength=120 --recursive aat/cpp/{src,include} | ||
|
||
fix: fixpy fixcpp ## run all fixers | ||
|
||
fixpy: ## run autopep8 fix | ||
$(PYTHON) -m black aat/ setup.py | ||
|
||
fixcpp: ## run clang-format | ||
clang-format -i -style=file `find ./aat/cpp/{src,include} -name "*.*pp"` | ||
|
||
annotate: ## MyPy type annotation check | ||
$(PYTHON) -m mypy aat | ||
|
||
type_ignore: ## Count type ignores | ||
grep -rin "type: ignore" ./aat | wc -l | ||
|
||
type_ignore_list: ## List all type ignores | ||
grep -rin "type: ignore" ./aat | ||
|
||
docs: ## Build the sphinx docs | ||
make -C docs html | ||
open ./docs/_build/html/index.html | ||
|
||
dist: ## create dists | ||
rm -rf dist build | ||
python setup.py sdist bdist_wheel | ||
python -m twine check dist/* | ||
.DEFAULT_GOAL := help | ||
.PHONY: develop build lint checks tests tests-ci-gha | ||
|
||
publish: dist ## dist to pypi and npm | ||
python -m twine upload dist/* --skip-existing | ||
develop: ## Setup project for development | ||
|
||
clean: ## clean the repository | ||
find . -name "__pycache__" | xargs rm -rf | ||
find . -name "*.pyc" | xargs rm -rf | ||
rm -rf .coverage coverage cover htmlcov logs build dist *.egg-info coverage.xml .mypy_cache | ||
find . -name "*.so" | xargs rm -rf | ||
make -C ./docs clean | ||
rm -rf _aat_BACKTEST_* | ||
build: ## Build the project | ||
|
||
# Thanks to Francoise at marmelab.com for this | ||
.DEFAULT_GOAL := help | ||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
lint: ## Run project linters | ||
|
||
print-%: | ||
@echo '$*=$($*)' | ||
checks: ## Run any other checks | ||
|
||
.PHONY: run buildext build install tests lint fix docs dist clean help fixcpp | ||
tests: ## Run the tests | ||
|
||
tests-ci-gha: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
aat/tests/strategy/_aat_BACKTEST_test/MomentumStrategy-0.portfolio.active_by_inst.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
aat/tests/strategy/_aat_BACKTEST_test/MomentumStrategy-0.portfolio.active_by_strat.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.