From cc35ecdb963e9fb845709d42bea722561db80d2c Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 09:40:44 +0000 Subject: [PATCH 01/12] new manual github action test for dependency checks on each platform --- .github/workflows/os-test.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/os-test.yml diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml new file mode 100644 index 0000000000..75b666e4a0 --- /dev/null +++ b/.github/workflows/os-test.yml @@ -0,0 +1,32 @@ +name: OS test + +on: + workflow_dispatch: + +jobs: + build: + + runs-on: + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 + - windows-2019 + - windows-2022 + - macos-13 + - macos-14 + + steps: + + - uses: actions/checkout@v4 + with: + ref: "develop" + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.10.13 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + pip install -r requirements.txt From c1df85ec508f8dce76cc8841d1af8fb1a7a14859 Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 09:54:43 +0000 Subject: [PATCH 02/12] adding push event --- .github/workflows/os-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index 75b666e4a0..986fadd273 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -2,6 +2,7 @@ name: OS test on: workflow_dispatch: + push: jobs: build: From 1b1d20690d5c328e82d5d5b8120f5f7808658e34 Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 10:02:32 +0000 Subject: [PATCH 03/12] use os matrix --- .github/workflows/os-test.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index 986fadd273..b89b16a5b8 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -6,15 +6,21 @@ on: jobs: build: + runs-on: ${{ matrix.os }} - runs-on: - - ubuntu-20.04 - - ubuntu-22.04 - - ubuntu-24.04 - - windows-2019 - - windows-2022 - - macos-13 - - macos-14 + strategy: + matrix: + os: [ ubuntu-latest, windows-2022, macos-14 ] + python-version: [ 3.10.13 ] + +# runs-on: +# - ubuntu-20.04 +# - ubuntu-22.04 +# - ubuntu-24.04 +# - windows-2019 +# - windows-2022 +# - macos-13 +# - macos-14 steps: @@ -25,7 +31,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.10.13 + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | From c65020008eb303a994e61f24a8b0593f8a884253 Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 10:10:34 +0000 Subject: [PATCH 04/12] python 3.11 --- .github/workflows/os-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index b89b16a5b8..0c3f00c13f 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-2022, macos-14 ] - python-version: [ 3.10.13 ] + python-version: [ 3.11.9 ] # runs-on: # - ubuntu-20.04 From 8767862ccf5f35389ead57ffbf184b4f00de3c4f Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 11:29:09 +0000 Subject: [PATCH 05/12] add Intel macOS, remove Windows for now --- .github/workflows/os-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index 0c3f00c13f..53206da114 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -10,7 +10,8 @@ jobs: strategy: matrix: - os: [ ubuntu-latest, windows-2022, macos-14 ] + #os: [ ubuntu-latest, macos-13, macos-14, windows-2022 ] + os: [ ubuntu-latest, macos-13, macos-14 ] python-version: [ 3.11.9 ] # runs-on: From b4983b8d2230208e938f95a38559d40b03e7185a Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 12:21:32 +0000 Subject: [PATCH 06/12] psutil 5.6.6 -> 5.6.7 --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index bf277a1bb0..44f76b9c94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ numpy>=1.24.0 scipy>=1.0.0 pymongo==3.11.3 ib-insync==0.9.86 -psutil==5.6.6 +psutil==5.6.7 pytest>6.2 Flask>=2.0.1 Werkzeug>=2.0.1 diff --git a/setup.py b/setup.py index b259312316..10513dfd57 100755 --- a/setup.py +++ b/setup.py @@ -91,7 +91,7 @@ def dir_this_file(): "numpy>=1.24.0", "scipy>=1.0.0", "pymongo==3.11.3", - "psutil==5.6.6", + "psutil==5.6.7", "pytest>6.2", "Flask>=2.0.1", "Werkzeug>=2.0.1", From f872b4a43356a8edb5ae13defa9160d765eb670c Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 12:21:44 +0000 Subject: [PATCH 07/12] include windows --- .github/workflows/os-test.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index 53206da114..bf9e031e67 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -10,19 +10,10 @@ jobs: strategy: matrix: - #os: [ ubuntu-latest, macos-13, macos-14, windows-2022 ] - os: [ ubuntu-latest, macos-13, macos-14 ] + os: [ ubuntu-latest, macos-13, macos-14, windows-2022 ] + # os: [ ubuntu-latest, macos-13, macos-14 ] python-version: [ 3.11.9 ] -# runs-on: -# - ubuntu-20.04 -# - ubuntu-22.04 -# - ubuntu-24.04 -# - windows-2019 -# - windows-2022 -# - macos-13 -# - macos-14 - steps: - uses: actions/checkout@v4 From 0fe8c8c95ee02a9c1a96265b70dd08e22d2ab2f0 Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Tue, 29 Oct 2024 12:25:11 +0000 Subject: [PATCH 08/12] checkout feature branch --- .github/workflows/os-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index bf9e031e67..0847c642f4 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 with: - ref: "develop" + ref: "alt_os_tests" - name: Set up Python uses: actions/setup-python@v5 From b51f998df564067b162ccc64562f7202515beeba Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Wed, 30 Oct 2024 14:53:11 +0000 Subject: [PATCH 09/12] develop branch --- .github/workflows/os-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index 0847c642f4..5d857a207c 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -11,14 +11,13 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-13, macos-14, windows-2022 ] - # os: [ ubuntu-latest, macos-13, macos-14 ] python-version: [ 3.11.9 ] steps: - uses: actions/checkout@v4 with: - ref: "alt_os_tests" + ref: "develop" - name: Set up Python uses: actions/setup-python@v5 From fb8a8fef38aaa01d1a82a59905840f8a04be8173 Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Mon, 11 Nov 2024 16:32:38 +0000 Subject: [PATCH 10/12] no longer any need for two slow test configs --- .github/workflows/slow-test-master.yml | 37 ------------------- .../{slow-test-develop.yml => slow-test.yml} | 4 +- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 .github/workflows/slow-test-master.yml rename .github/workflows/{slow-test-develop.yml => slow-test.yml} (91%) diff --git a/.github/workflows/slow-test-master.yml b/.github/workflows/slow-test-master.yml deleted file mode 100644 index 32ba27e130..0000000000 --- a/.github/workflows/slow-test-master.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Slow test (master) - -on: - schedule: - - cron: '0 1 * * 0' - - workflow_dispatch: - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - - uses: actions/checkout@v4 - with: - ref: "master" - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.8' - - - name: Install dependencies - run: | - python -m pip install pip setuptools wheel - pip install pytest - pip install -r requirements.txt - - - name: Test with pytest - run: | - pytest --runslow --disable-warnings - - #- name: Coverage report - # run: | - # coverage html diff --git a/.github/workflows/slow-test-develop.yml b/.github/workflows/slow-test.yml similarity index 91% rename from .github/workflows/slow-test-develop.yml rename to .github/workflows/slow-test.yml index efafde9725..3b08c8225f 100644 --- a/.github/workflows/slow-test-develop.yml +++ b/.github/workflows/slow-test.yml @@ -1,4 +1,4 @@ -name: Slow test (develop) +name: Slow test on: schedule: @@ -17,8 +17,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: "develop" - name: Set up Python uses: actions/setup-python@v5 From 4c12f356f33ce3188432602d6ccf3385d9597865 Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Mon, 11 Nov 2024 16:33:05 +0000 Subject: [PATCH 11/12] a few more tests marked as 'slow' --- tests/test_examples.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_examples.py b/tests/test_examples.py index cef949fb9b..ea76a37cfa 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -236,6 +236,7 @@ def test_simple_system_portfolio_estimated( print(my_system.portfolio.get_instrument_weights().tail(5)) print(my_system.portfolio.get_instrument_diversification_multiplier().tail(5)) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_portfolio_fixed( self, data, raw_data, my_rules, my_config, fcs, combiner, possizer, portfolio ): @@ -253,6 +254,7 @@ def test_simple_system_portfolio_fixed( print(my_system.portfolio.get_notional_position("SOFR").tail(5)) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_costs( self, data, @@ -280,6 +282,7 @@ def test_simple_system_costs( print(profits.gross.percent.stats()) print(profits.net.percent.stats()) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_config_object(self, data, ewmac_8, ewmac_32): my_config = Config( dict( @@ -357,6 +360,7 @@ def test_simple_system_risk_overlay(self, data, ewmac_8, ewmac_32): ) print(my_system.portfolio.get_notional_position("SOFR").tail(5)) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_config_import(self, data): my_config = Config("systems.provided.example.simplesystemconfig.yaml") my_config.exclude_instrument_lists = dict( From ac00d714190efdfa46736d20022d4ce451a7fb76 Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Mon, 11 Nov 2024 16:33:59 +0000 Subject: [PATCH 12/12] branch spec removed --- .github/workflows/os-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml index 5d857a207c..bac60ee5fe 100644 --- a/.github/workflows/os-test.yml +++ b/.github/workflows/os-test.yml @@ -16,8 +16,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: "develop" - name: Set up Python uses: actions/setup-python@v5