From 0b2aac397f129b1cfd08f6ea5c8fa6b70a798d48 Mon Sep 17 00:00:00 2001 From: ddevin96 Date: Thu, 5 Feb 2026 14:13:38 +0100 Subject: [PATCH 1/3] docs: update with news modules - update actions --- .github/mkdocs.yml | 1 + .github/workflows/chore.yaml | 12 +++-- .gitignore | 1 + CONTRIBUTING.md | 12 +++++ README.md | 65 ++++++---------------------- docs/api/reference.md | 41 +++++++++++++----- docs/contributing.md | 42 +++++++++++++++++- docs/getting-started/installation.md | 51 ++++++++++++++++++++++ docs/index.md | 4 ++ 9 files changed, 163 insertions(+), 66 deletions(-) diff --git a/.github/mkdocs.yml b/.github/mkdocs.yml index e9ebde9..d760d21 100644 --- a/.github/mkdocs.yml +++ b/.github/mkdocs.yml @@ -40,6 +40,7 @@ nav: - API Reference: - API: api/reference.md - Dev: ref.md + - Contributing: contributing.md markdown_extensions: - admonition diff --git a/.github/workflows/chore.yaml b/.github/workflows/chore.yaml index 7109ef4..ba51209 100644 --- a/.github/workflows/chore.yaml +++ b/.github/workflows/chore.yaml @@ -26,10 +26,16 @@ jobs: uv venv uv pip install -e . - - name: Run tests - run: uv run pytest --cov --cov-branch --cov-report=xml + - name: Test with pytest + run: | + uv run pytest --cov --junitxml=junit.xml - - name: Upload results to Codecov + - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index b613cc7..45ae82e 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ htmlcov/ .cache nosetests.xml coverage.xml +junit.xml *.cover *.py.cover .hypothesis/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f251894..b6f11d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,18 @@ The project main language is English. +## Pre-commit hooks + +Run the following command to install the pre-commit hook: + +```bash +make setup + +pre-commit install --config .github/hooks/.pre-commit-config.yaml --hook-type pre-commit --install-hooks --overwrite +``` + +This will ensure that your code adheres to the project's coding standards before each commit. + ## Commit message style Commit messages should follow the [conventional commit specification](https://www.conventionalcommits.org/en/v1.0.0/). diff --git a/README.md b/README.md index eb9da44..673d9c9 100644 --- a/README.md +++ b/README.md @@ -15,76 +15,38 @@ WIP ## Getting started +See the [Documentation][docs] for more details. + ### Prerequisites -WIP +- [uv](https://github.com/astral-sh/uv) ### Installation -WIP - -## Usage - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md) for details on contributing to the project. - -### Build - +## Build To build the project, run: - ```bash make ``` -### Linter and type checker - -Use [Ruff](https://github.com/charliermarsh/ruff) for linting and formatting: - -```bash -make lint -``` - -Use [Ty](https://docs.astral.sh/ty/) for type checking: - -```bash -make typecheck -``` - -Use the `check` target to run both linter and type checker: - -```bash -make check -``` - -### Tests - -Use [pytest](https://docs.pytest.org/en/latest/) to run the test suite: - -```bash -make test - -# Run tests with HTML report -uv run pytest --cov=hyperbench --cov-report=html -``` - -### Pre-commit hooks +## Usage -Run the following command to install the pre-commit hook: +WIP -```bash -make setup +## Contributing -pre-commit install --config .github/hooks/.pre-commit-config.yaml --hook-type pre-commit --install-hooks --overwrite -``` +See [CONTRIBUTING.md](CONTRIBUTING.md) for details on contributing to the project. ## License WIP -## Contact +## Discussion -WIP +Most development discussions take place on GitHub in this repo, via the [GitHub issue tracker][issues]. + + +![Alt](https://repobeats.axiom.co/api/embed/c168082ecb1f9f843c1b170dcfee93542b576f61.svg "Repobeats analytics image") [contributors-shield]: https://img.shields.io/github/contributors/hypernetwork-research-group/hyperbench.svg?style=for-the-badge @@ -98,3 +60,4 @@ WIP [license-shield]: https://img.shields.io/github/license/hypernetwork-research-group/hyperbench.svg?style=for-the-badge [license-url]: https://github.com/hypernetwork-research-group/hyperbench/blob/master/LICENSE.txt [docs]: https://hypernetwork-research-group.github.io/hyperbench/ +[issues]: https://github.com/hypernetwork-research-group/hyperbench/issues diff --git a/docs/api/reference.md b/docs/api/reference.md index d7131e2..4cc53bc 100644 --- a/docs/api/reference.md +++ b/docs/api/reference.md @@ -2,9 +2,7 @@ Complete API documentation for all Hyperbench modules. -## Core Modules - -### Data Module +## Data Module ::: hyperbench.data.dataset options: @@ -13,6 +11,29 @@ Complete API documentation for all Hyperbench modules. members_order: source show_submodules: true +::: hyperbench.data.loader + options: + show_root_heading: true + show_source: true + members_order: source + show_submodules: true + +## Train Module + +### Trainer + +::: hyperbench.train.trainer + options: + show_root_heading: true + show_source: true + +### Negative Sampler + +::: hyperbench.train.negative_sampler + options: + show_root_heading: true + show_source: true + ## Types Module ### HData @@ -29,6 +50,13 @@ Complete API documentation for all Hyperbench modules. show_root_heading: true show_source: true +### Model + +::: hyperbench.types.model + options: + show_root_heading: true + show_source: true + ## Utils Module ### Data Utils @@ -44,10 +72,3 @@ Complete API documentation for all Hyperbench modules. options: show_root_heading: true show_source: true - -## Data Loader - -::: hyperbench.data.loader - options: - show_root_heading: true - show_source: true diff --git a/docs/contributing.md b/docs/contributing.md index 73d56b1..b6f11d1 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,3 +1,41 @@ -# Contributing to Hyperbench +# How to contribute -Thank you for your interest in contributing to Hyperbench! +The project main language is English. + +## Pre-commit hooks + +Run the following command to install the pre-commit hook: + +```bash +make setup + +pre-commit install --config .github/hooks/.pre-commit-config.yaml --hook-type pre-commit --install-hooks --overwrite +``` + +This will ensure that your code adheres to the project's coding standards before each commit. + +## Commit message style + +Commit messages should follow the [conventional commit specification](https://www.conventionalcommits.org/en/v1.0.0/). + +The allowed structural elements are: +- `feat` for new features. +- `fix` for bug fixes. +- `chore` for changes to the build process or auxiliary tools and libraries such as documentation generation. +- `refactor` for code changes that neither fix a bug nor add a feature. +- `docs` for any documentation/README changes. + +Commit messages should be structured in a way that can be read as if they were completing the sentence *"If applied, this commit will..."*. For example: + +> feat: add new authentication method to API + +Reads as *"If applied, this commit will add new authentication method to API"*. + +## Branch naming + +Branch names should be descriptive and use hyphens to separate words. They should also follow the same structure as commit messages, using the allowed structural elements. For example: +- `feat/add-user-authentication` +- `fix/issue-with-database-connection` +- `chore/update-dependencies` +- `refactor/improve-code-structure` +- `docs/update-contributing-guidelines` diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index a37a120..815ea29 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -1,3 +1,54 @@ # Installation ## Prerequisites + +- [uv](https://github.com/astral-sh/uv) + +## Build +To build the project, run: +```bash +make +``` + +### Linter and type checker + +Use [Ruff](https://github.com/charliermarsh/ruff) for linting and formatting: + +```bash +make lint +``` + +Use [Ty](https://docs.astral.sh/ty/) for type checking: + +```bash +make typecheck +``` + +Use the `check` target to run both linter and type checker: + +```bash +make check +``` + +### Tests + +Use [pytest](https://docs.pytest.org/en/latest/) to run the test suite: + +```bash +make test + +# Run tests with HTML report +uv run pytest --cov=hyperbench --cov-report=html +``` + +### Pre-commit hooks + +Run the following command to install the pre-commit hook: + +```bash +make setup + +pre-commit install --config .github/hooks/.pre-commit-config.yaml --hook-type pre-commit --install-hooks --overwrite +``` + +This will ensure that your code adheres to the project's coding standards before each commit. diff --git a/docs/index.md b/docs/index.md index c2cbf3d..902ef39 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,3 +11,7 @@ Welcome to Hyperbench - A comprehensive benchmarking framework for hypergraph ne ## Overview Hyperbench provides tools for working with hypergraph data in machine learning contexts. It supports loading datasets in HIF format, transforming them into PyTorch tensors, and preparing them for training hypergraph neural networks. + +## Architecture + +![Architecture Diagram](design.png) From 347ad444e22d8483e42ea519749279135b0147d2 Mon Sep 17 00:00:00 2001 From: ddevin96 Date: Thu, 5 Feb 2026 14:25:34 +0100 Subject: [PATCH 2/3] docs: added make req --- docs/getting-started/installation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 815ea29..286b1be 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -3,6 +3,7 @@ ## Prerequisites - [uv](https://github.com/astral-sh/uv) +- [make](https://www.gnu.org/software/make/) ## Build To build the project, run: From 38ef9125520139cd751be2b953f5573499d6300b Mon Sep 17 00:00:00 2001 From: ddevin96 Date: Thu, 5 Feb 2026 14:26:55 +0100 Subject: [PATCH 3/3] docs: added make req --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 673d9c9..6d4748d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ See the [Documentation][docs] for more details. ### Prerequisites - [uv](https://github.com/astral-sh/uv) +- [make](https://www.gnu.org/software/make/) ### Installation