Skip to content

Commit

Permalink
feat: build release versions (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMcL authored Nov 21, 2022
1 parent 3dd08b0 commit 03176c1
Show file tree
Hide file tree
Showing 9 changed files with 794 additions and 656 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release new version

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*.*.*" # Push events to matching v*, i.e. v1.0, v20.15.10
- "!v*-snapshot"

jobs:
release:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Check out code
uses: actions/checkout@v3

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

- name: Deploy Package
uses: JRubics/[email protected]
with:
python_version: ${{ matrix.python-version }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release new version to test

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*-snapshot" # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
release:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Check out code
uses: actions/checkout@v3

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

- name: Deploy Package
uses: JRubics/[email protected]
with:
python_version: ${{ matrix.python-version }}
pypi_token: ${{ secrets.PYPI_TEST_TOKEN }}
repository_name: "testpypi"
repository_url: "https://test.pypi.org/legacy/"
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ To support the above mentioned parameter tests, and to allow for more complex ca

### Momentum Agent


One of the agents provided in the scenarios is momentum agent that can currently follow APO/ RSI/ STOCHRSI/ CMO/ MACD momentum strategies. A comprehensive scenario for momentum agent tests is in `vega_sim.scenario.comprehensive_market.scenario`, where mutileple momentum agents with different momentum strategies can be tested.

To run momentum agents, you must first install the TA-Lib libraries. The instructions [here](https://github.com/mrjbq7/ta-lib#dependencies) are likely a good start. Follow this by running `poetry install -E agents`. Then, run `python examples.agent_market.MomentumAgent.py`, and the performance of momentum agents are shown in the notebook `examples.notebooks.MomentumAgentPerformance`. The agents can be configured in `ComprehensiveMarket`. For example, to run 2 momentum agents with APO and MACD strategies:
Expand All @@ -132,3 +131,14 @@ ComprehensiveMarket(
],
)
```

## Release Process

Releases are aligned to Vega core [releases](https://github.com/vegaprotocol/vega/releases/), to provide a snapshot of working code for each release cutoff. To build and release a Vega Market Sim package, follow these steps:

- Check [releases](https://github.com/vegaprotocol/vega/releases/) for the release tag you wish to target
- Update `.env`'s `VEGA_SIM_VEGA_TAG` to reflect the last commit within that release
- Update the `version` parameter in `pyproject.toml` to match the tagged Vega Core release
- Run `make` followed by a full integration test run
- Create a branch containing these changes, then a pull request into `develop`
- Use the GitHub [New Release](https://github.com/vegaprotocol/vega-market-sim/releases/new) dialog to create a release. Tag it with the same specification as in `pyproject.toml` (e.g. `v0.62.5`) to trigger the deployment process.
Loading

0 comments on commit 03176c1

Please sign in to comment.