Skip to content
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ cython_debug/
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

Expand Down
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.12
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
hooks:
- id: mypy
additional_dependencies:
- types-requests>=2.32
- types-PyYAML>=6.0

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-ruff
additional_dependencies:
- "ruff>=0.12"
args: [--fix]
files: \.ipynb$
- id: nbqa-black
additional_dependencies:
- "black>=24"
args: [--nbqa-mutate]
files: \.ipynb$
- id: nbqa-mypy
additional_dependencies:
- "mypy>=1.10"
- "types-requests>=2.32"
- "types-PyYAML>=6.0"
files: \.ipynb$

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
exclude: \.ipynb$
- id: trailing-whitespace
exclude: \.ipynb$
9 changes: 9 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2025-present jakub.szulc <szulcak05@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
# AlphaPulse
# AlphaPulse

[![PyPI - Version](https://img.shields.io/pypi/v/alphapulse.svg)](https://pypi.org/project/alphapulse)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/alphapulse.svg)](https://pypi.org/project/alphapulse)

-----

## Table of Contents

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install alphapulse
```

## Local development setup

Requirements: Python 3.11+, Git, Hatch, uv.

```bash
# install Hatch and uv (once)
python -m pip install --user hatch uv

# create and enter the dev environment
hatch env create
hatch shell

# install Git hooks and run once across the repo
pre-commit install
pre-commit run --all-files
```

Common checks:

```bash
hatch run lint
hatch run format
hatch run types
hatch run all
```

## License

`alphapulse` is distributed under the terms of the MIT license.
151 changes: 151 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "alphapulse"
dynamic = ["version"]
description = ""
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
keywords = []
authors = [
{ name = "jakub.szulc", email = "szulcak05@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = []

[project.optional-dependencies]
dev = [
"pre-commit>=3.7.0",
"ruff>=0.12",
"black>=24",
"mypy>=1.10",
"types-requests>=2.32",
"types-PyYAML>=6.0",
"nbqa>=1.9.1",
]


[project.urls]
Documentation = "https://github.com/Palamabron/AlphaPulse/blob/main/README.md"
Issues = "https://github.com/Palamabron/AlphaPulse/issues"
Source = "https://github.com/Palamabron/AlphaPulse"

[tool.hatch.version]
path = "src/alphapulse/__about__.py"

[tool.hatch.envs.default]
installer = "uv"
features = ["dev"]

[tool.hatch.envs.default.scripts]
lint = [
"ruff check src tests",
"ruff format --check .",
]
format = [
"ruff check --select I --fix src tests",
"ruff format .",
]
types = "mypy --install-types --non-interactive src/alphapulse tests"
all = [
"ruff check src tests",
"ruff format --check .",
"mypy src/alphapulse tests",
]

[tool.hatch.envs.types]
extra-dependencies = []

[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/alphapulse tests}"

[tool.coverage.run]
source_pkgs = ["alphapulse", "tests"]
branch = true
parallel = true
omit = [
"src/alphapulse/__about__.py",
]

[tool.coverage.paths]
alphapulse = ["src/alphapulse", "*/alphapulse/src/alphapulse"]
tests = ["tests", "*/alphapulse/tests"]

[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

[tool.ruff]
line-length = 88
target-version = "py311"
extend-exclude = ["build", "dist", ".venv", ".eggs"]
src = ["src", "tests"]

[tool.ruff.lint]
select = [
"E", "F", "W",
"I",
"UP",
"B",
"ASYNC",
"S",
"C4",
"PIE",
"T20",
"PLE",
"PLW",
]
ignore = [
"S101",
]

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "T20"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
docstring-code-format = true

[tool.black]
line-length = 88
target-version = ["py311"]

[tool.mypy]
python_version = "3.11"
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
show_error_codes = true
pretty = true
exclude = [
'^build/.*',
'^dist/.*',
'^\.venv/.*',
]

[[tool.mypy.overrides]]
module = [
"requests.*",
"yaml.*",
]
ignore_missing_imports = true
4 changes: 4 additions & 0 deletions src/alphapulse/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2025-present jakub.szulc <szulcak05@gmail.com>
#
# SPDX-License-Identifier: MIT
__version__ = "0.0.1"
3 changes: 3 additions & 0 deletions src/alphapulse/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: 2025-present jakub.szulc <szulcak05@gmail.com>
#
# SPDX-License-Identifier: MIT
3 changes: 3 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: 2025-present jakub.szulc <szulcak05@gmail.com>
#
# SPDX-License-Identifier: MIT