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

Release 1.0.0 #117

Merged
merged 75 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
641b192
add GitHub actions workflow for Python testing
ben9809 Apr 15, 2024
6c30652
change name to workflow file
ben9809 Apr 15, 2024
4fd6028
change target branch to 'develop' for GitHub workflow configuration
ben9809 Apr 15, 2024
222aaa4
Merge pull request #101 from ben9809/feature/test_workflow
Jackal08 Apr 16, 2024
a8a14f5
Linter: rm redundant __init__
Jackal08 Apr 16, 2024
0c4deaf
Github Actions: split linter, coverage, doctest
Jackal08 Apr 16, 2024
0c95d7b
Github Actions: split linter, coverage, doctest
Jackal08 Apr 16, 2024
949f5f6
Github Actions: split linter, coverage, doctest
Jackal08 Apr 16, 2024
aaa8279
Trying to fix bug
Jackal08 Apr 16, 2024
24e11a9
update yfinance version to fix issues related with the data_importe.p…
ben9809 Apr 16, 2024
30bf08b
Merge pull request #103 from ben9809/fix/data_importer
Jackal08 Apr 17, 2024
e33a45b
setting-up poetry, modify workflow, upgrade some packages to ensure c…
ben9809 Apr 18, 2024
d6935bf
add dependency
ben9809 Apr 18, 2024
3df6384
fix pylint run and remove env activation
ben9809 Apr 18, 2024
751d7a1
fix folder doctest
ben9809 Apr 18, 2024
f16ab75
remove report creation for pylint
ben9809 Apr 18, 2024
c54fab5
fix version and separate dependencies
ben9809 Apr 18, 2024
fa5230a
fix version dependencies and comply with pylint new version
ben9809 Apr 18, 2024
1c61cb5
fix pylint
ben9809 Apr 18, 2024
7efcba0
fix pylint
ben9809 Apr 18, 2024
7367acb
fix warning
ben9809 Apr 18, 2024
b4b6da0
fix unused variable warning
ben9809 Apr 18, 2024
692abbb
update changelog
ben9809 Apr 19, 2024
988e373
fix changelog
ben9809 Apr 19, 2024
8523d44
remove circleCI workflow, remove setuptools, add poetry support for p…
ben9809 Apr 21, 2024
c0ea13e
add new versions in python-tests.yaml
ben9809 Apr 21, 2024
53274f3
check version 3.8, 3.9
ben9809 Apr 21, 2024
0343912
check version 3.8, 3.9, 3.10
ben9809 Apr 21, 2024
b0bda46
fix python 3.10 workflow execution
ben9809 Apr 21, 2024
9f63bdb
add 3.11, 3.12 python versions in test workflow
ben9809 Apr 21, 2024
bda18ee
reintroducing session setting in tensorflow
ben9809 Apr 21, 2024
f3640e6
suppress warnings
ben9809 Apr 21, 2024
f4cb322
reinstate db_scan test and instantiate TSNE with parameter 'init="ran…
ben9809 Apr 21, 2024
4454610
Merge pull request #107 from ben9809/feature/poetry-setup
Jackal08 Apr 22, 2024
5b4f6ec
import mode changed
ben9809 Apr 24, 2024
c0b4e4d
update readthedocs.yml
ben9809 Apr 24, 2024
95bc456
fix configuration docs path
ben9809 Apr 24, 2024
873dde5
add releases to docs dependencies
ben9809 Apr 24, 2024
d30c384
add six to docs dependencies
ben9809 Apr 24, 2024
c255851
remove requirements in txt form and bumpversion.cfg file
ben9809 Apr 25, 2024
6d6230d
reinstate bumpversion.cfg file for poetry configuration
ben9809 Apr 25, 2024
016e15d
Bump version: 0.9.1 → 0.9.2
ben9809 Apr 25, 2024
f9f7ba7
reinstate bumpversion.cfg file for poetry configuration
ben9809 Apr 25, 2024
7307955
fix version
ben9809 Apr 25, 2024
4292bfb
git revert tag
ben9809 Apr 25, 2024
e50dde5
Merge remote-tracking branch 'origin/feature/poetry-setup' into featu…
ben9809 Apr 25, 2024
497ebb7
git revert tag
ben9809 Apr 25, 2024
f7f5dd3
git revert tag
ben9809 Apr 25, 2024
760be1a
disable auto commit and tag bumpversion
ben9809 Apr 25, 2024
f261166
redefine dependencies to install fewer packages and speed up CI/CD
ben9809 Apr 25, 2024
4f6d241
fix workflow dependency installation
ben9809 Apr 25, 2024
8a2e18b
Merge branch 'develop' into feature/poetry-setup
ben9809 Apr 25, 2024
fc90dc4
Merge remote-tracking branch 'refs/remotes/origin/develop' into featu…
ben9809 Apr 25, 2024
23ee3a7
Merge remote-tracking branch 'origin/feature/poetry-setup' into featu…
ben9809 Apr 25, 2024
782c3de
upload workflow to publish distribution on TestPypi before merging in…
ben9809 Apr 26, 2024
1b5d3e1
fix branch to publish final distribution
ben9809 Apr 26, 2024
cfab545
fix workflow dependencies installation
ben9809 Apr 26, 2024
ca4dbbf
resolve warning node js
ben9809 Apr 26, 2024
023d4c7
refactor readthedocs.yml
ben9809 Apr 26, 2024
3c7b55e
Merge pull request #110 from ben9809/feature/poetry-setup
Jackal08 May 2, 2024
dca5f1e
code style optimization and upgrade action setups
ben9809 May 3, 2024
912439a
fix coverage workflow
ben9809 May 3, 2024
a034713
remove comments
ben9809 May 3, 2024
72e2341
change docs build (trial)
ben9809 May 4, 2024
674527f
reinstate previous doc building
ben9809 May 4, 2024
6351d81
remove unnecessary dependency package
ben9809 May 8, 2024
4eaebc2
Merge pull request #111 from hudson-and-thames/feature/code-optimization
Jackal08 May 10, 2024
5b2f498
modify workflow and update changelog.rst
ben9809 May 10, 2024
05e7b88
fix workflow branch
ben9809 May 10, 2024
d80de6f
Merge pull request #113 from hudson-and-thames/feature/workflow-upgrade
Jackal08 May 10, 2024
1ea9939
Bumpversion 0.9.1 -> 1.0.0
ben9809 May 10, 2024
e3f03cb
Merge pull request #114 from hudson-and-thames/release/1.0.0
Jackal08 May 11, 2024
31669a9
fix workflow execution
ben9809 May 11, 2024
e55303b
Merge pull request #115 from hudson-and-thames/fix/workflow-publish-dist
Jackal08 May 11, 2024
9df60a8
Merge branch 'master' into develop
Jackal08 May 12, 2024
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
8 changes: 6 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[bumpversion]
current_version = 0.9.1
current_version = 1.0.0
commit = False
tag = False
tag_name = {new_version}

[bumpversion:file:setup.cfg]
[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:docs/source/conf.py]
search = release = "{current_version}"
replace = release = "{new_version}"
66 changes: 0 additions & 66 deletions .circleci/config.yml

This file was deleted.

1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ directory = build/coverage/html

[run]
branch = True
parallel = True
omit =
*__init__*
arbitragelab/network/imports.py
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/publish-final-dist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Distribution to PyPI

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]'

jobs:
build-and-publish-final-dist:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'

- name: Install Poetry
run: |
pip install poetry

- name: Install dependencies
run: |
poetry install --without docs,tests

- name: Build the package
run: |
poetry build

- name: Publish to TestPyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry publish
37 changes: 37 additions & 0 deletions .github/workflows/publish-test-dist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Distribution to TestPyPI

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+-dev'

jobs:
build-and-publish-test-dist:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install Poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry install --without docs,tests
- name: Build the package
run: |
poetry build
- name: Publish to TestPyPI
env:
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish -r testpypi
126 changes: 126 additions & 0 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Test code and documentation

on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
test-code-style:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
pip install --upgrade pip
pip install poetry


- name: Install dependencies
run: |
poetry install --without docs

- name: Run Pylint
run: |
poetry run pylint arbitragelab tests --rcfile=.pylintrc --output-format=text --output=pylint-report.txt

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: pylint-report-${{ matrix.python-version }}
path: pylint-report.txt


test-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
pip install --upgrade pip
pip install poetry

- name: Install dependencies
run: |
poetry install --without docs

- name: Run tests with coverage
run: |
poetry run pytest tests/ --cov=arbitragelab --cov-report=term --cov-branch --cov-config=.coveragerc

- name: Generate coverage HTML report
run: poetry run coverage html

- name: Upload Coverage HTML Report as Artifact
uses: actions/upload-artifact@v4
with:
name: coverage-html-${{ matrix.python-version }}
path: build/coverage/html/index.html

- name: Check coverage
run: poetry run coverage report --fail-under=100

test-docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
pip install poetry

- name: Install requirements
run: |
poetry install --without tests

- name: Build documentation
run: |
cd docs
poetry run make html

- name: Run doctests
run: |
cd docs
poetry run make doctest

- name: Upload doctest results as an artifact
uses: actions/upload-artifact@v4
with:
name: doctest-results
path: docs/build/doctest/output.txt

12 changes: 6 additions & 6 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ load-plugins=
# Reference: http://pylint-messages.wikidot.com/all-codes
disable=I,
maybe-no-member,
star-args,
abstract-class-not-used,
# star-args,
# abstract-class-not-used,
duplicate-code,
superfluous-parens,
abstract-class-little-used,
# abstract-class-little-used,
too-few-public-methods,
RP0401,
RP0801,
Expand All @@ -70,7 +70,7 @@ output-format=text
# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no
#files-output=no

# Tells whether to display a full report or only the messages
reports=yes
Expand All @@ -91,7 +91,7 @@ msg-template={C}:{line:3d},{column:2d}: [{obj}] {msg} ({msg_id} - {symbol})
[BASIC]

# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter,apply,input
#bad-functions=map,filter,apply,input

# Regular expression which should only match correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
Expand Down Expand Up @@ -275,4 +275,4 @@ int-import-graph=

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
22 changes: 9 additions & 13 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
os: "ubuntu-22.04"
tools:
python: "3.8"
jobs:
post_create_environment:
# Install poetry
- pip install poetry
post_install:
# Install dependencies
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --only docs

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF
formats: []

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/source/requirements.txt
configuration: docs/source/conf.py

1 change: 1 addition & 0 deletions arbitragelab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ArbitrageLab helps portfolio managers and traders who want to leverage the power of Statistical Arbitrage by providing
reproducible, interpretable, and easy to use tools.
"""
# pylint: disable=consider-using-from-import

import arbitragelab.codependence as codependence
import arbitragelab.cointegration_approach as cointegration_approach
Expand Down
2 changes: 1 addition & 1 deletion arbitragelab/codependence/codependence_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from arbitragelab.codependence.optimal_transport import optimal_transport_dependence


# pylint: disable=invalid-name
# pylint: disable=invalid-name, unnecessary-lambda-assignment
def get_dependence_matrix(df: pd.DataFrame, dependence_method: str, theta: float = 0.5,
n_bins: int = None, normalize: bool = True,
estimator: str = 'standard', target_dependence: str = 'comonotonicity',
Expand Down
1 change: 1 addition & 0 deletions arbitragelab/codependence/optimal_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Implementations of Optimal Copula Transport dependence measure proposed by Marti et al.: https://arxiv.org/abs/1610.09659
And implemented in the blog post by Marti: https://gmarti.gitlab.io/qfin/2020/06/25/copula-optimal-transport-dependence.html
"""
# pylint: disable=broad-exception-raised

import warnings
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions arbitragelab/cointegration_approach/coint_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""
This module allows simulation of cointegrated time series pairs.
"""
# pylint: disable=consider-using-f-string

from typing import Tuple, Optional

Expand Down
Loading