Metadata-Version: 2.4
Name: hg_oap
Version: 0.3.3
Summary: A library to faciliate building order and pricing strategies
Project-URL: Homepage, https://github.com/hhenson/hg_oap
Project-URL: Documentation, https://hhenson.readthedocs.io
Project-URL: Repository, https://github.com/hhenson/hg_oap.git
Project-URL: Issues, https://github.com/hhenson/hg_oap/blob/main/ISSUES.md
Project-URL: Changelog, https://github.com/hhenson/hg_oap/blob/main/CHANGELOG.md
Author-email: Howard Henson <howard@henson.me.uk>, Alexander Balabin <balabin@me.com>, Simon Young <whepstead@gmail.com>, Tope Olukemi <tolukemi@gmail.com>
License: MIT
License-File: LICENSE
Keywords: forward propogating graph,fpg,functional reactive programming,graph,oms,order,pricing,reactive,time series
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.12
Requires-Dist: hgraph[web]>=0.5.41
Requires-Dist: holidays>=0.56
Requires-Dist: polars>=1.32
Provides-Extra: docs
Requires-Dist: pybtex-apa-style==1.3; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints>=2.3.0; extra == 'docs'
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == 'docs'
Requires-Dist: sphinx>=7.4; extra == 'docs'
Requires-Dist: sphinxcontrib-bibtex; extra == 'docs'
Requires-Dist: sphinxcontrib-plantuml>=0.30; extra == 'docs'
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'
Requires-Dist: mypy; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-xdist; extra == 'test'
Description-Content-Type: text/markdown

# HGraph Orders and Pricing Library

Provides a library, based on the hgraph functional reactive framework to
support creating order and pricing logic.

The core components of the library include:

* instruments
* positions
* portfolios
* orders
* pricing

This library is currently very green and is expected to have significant changes.


## Development

This project now uses the uv package manager for dependency management and running tasks.

- uv homepage and install instructions: https://docs.astral.sh/uv/

Once you have checked out the project, you can set up a local virtual environment and install dependencies as follows:

1) Create or reuse a virtual environment with Python 3.11 (recommended):

```bash
uv venv -p 3.11
```

2) Activate the virtual environment (example for bash/zsh):

```bash
source .venv/bin/activate
```

3) Install the project and all development dependencies (tests, docs, etc.):

```bash
uv sync --all-extras --all-groups
```

Notes:
- `uv sync` reads pyproject.toml and uv.lock and installs the project in editable mode along with dependencies.
- If you only want runtime dependencies, omit `--all-groups`.
- If you don't need optional extras, omit `--all-extras`.

To see where the Python interpreter lives for IDE configuration (e.g., PyCharm), after activating the venv you can run:

```bash
which python
```

PyCharm can be pointed at the `.venv` interpreter in the project root.

### Run Tests

```bash
# No Coverage
uv run pytest
```

```bash
# Generate Coverage Report
uv run pytest --cov=hg_oap --cov-report=xml
```