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

Attempt to fix slow tests in the master branch #1329

Merged
merged 3 commits into from
Feb 8, 2024
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
15 changes: 6 additions & 9 deletions .github/workflows/slow-test-develop.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
name: Slow test
name: Slow test (develop)

on:
schedule:
- cron: '0 1 * * *'
- cron: '0 2 * * *'

workflow_dispatch:

jobs:
build:

runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ 3.8, 3.7 ]
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "develop"

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

- name: Install dependencies
run: |
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/slow-test-master.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
name: Slow test
name: Slow test (master)

on:
schedule:
- cron: '30 1 * * 0'
- cron: '0 1 * * 0'

workflow_dispatch:

jobs:
build:

runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ 3.8, 3.7 ]
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "master"

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

- name: Install dependencies
run: |
Expand Down
11 changes: 7 additions & 4 deletions sysexecution/stack_handler/roll_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,17 @@ def get_strategy_name_with_largest_position_for_instrument(
)

try:
strategy_name = all_instrument_positions.strategy_name_with_largest_abs_position_for_instrument(
instrument_code
)
strategy_name = all_instrument_positions.strategy_name_with_largest_abs_position_for_instrument(
instrument_code
)
except:
## corner case where nets out to 0
strategies = diag_positions.get_list_of_strategies_with_positions()
strategy_name = strategies[0]
data.log.debug("No strategies have net positions in %s, using arbitrary strategy %s" % (instrument_code, strategy_name))
data.log.debug(
"No strategies have net positions in %s, using arbitrary strategy %s"
% (instrument_code, strategy_name)
)

return strategy_name

Expand Down