Skip to content

Commit

Permalink
feat: add hadd (#5)
Browse files Browse the repository at this point in the history
* adding hadd file and more name changes

* tidied tests

* added pyroot histogram adding to tests

* Update conf.py

* Working on cmd-line, and extra error handling

* changes for command-line

* fixing dependencies in .toml

* Update __init__.py

Appeasing the linter, specifying what functions are imported.

* Update __init__.py

* adding noqa to keep the linter from deleting __init__ imports

* more formatting issues

* more formatting issues

* test file isn't recognized by CI jobs

* tests still breaking linter

* adding importerskip
  • Loading branch information
zbilodea authored Oct 19, 2023
1 parent c9f7cb6 commit df45547
Show file tree
Hide file tree
Showing 14 changed files with 1,066 additions and 74 deletions.
121 changes: 56 additions & 65 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,77 +2,68 @@ ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"

repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.7.0"
hooks:
- id: black-jupyter

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude_types: [svg]
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: name-tests-test
args: ["--pytest-test-first"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.4.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers, --max-py-version=3.11]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
args: [--prose-wrap=always]
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
additional_dependencies: [pyyaml]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.287"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.5.1"
hooks:
- id: mypy
files: src|tests
args: []
additional_dependencies:
- pytest
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
args: ["-L", "ue,subjet,parms,fo,numer,thre,gaus"]

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.5"
hooks:
- id: codespell
- repo: local
hooks:
- id: disallow-caps
name: disallow improper capitalization
language: pygrep
entry: PyBind|Cmake|CCache|Github|PyTest
exclude: .pre-commit-config.yaml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.9.0.5"
hooks:
- id: shellcheck
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.9.0.5"
hooks:
- id: shellcheck

- repo: local
hooks:
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
exclude: .pre-commit-config.yaml
- repo: https://github.com/asottile/pyupgrade
rev: v3.13.0
hooks:
- id: pyupgrade
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Odapt
# odapt

[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import importlib.metadata

project = "Odapt"
project = "odapt"
copyright = "2023, Zoë Bilodeau"
author = "Zoë Bilodeau"
version = release = importlib.metadata.version("odapt")
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Odapt
# odapt

```{toctree}
:maxdepth: 2
Expand Down
13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = []
dependencies = ["numpy>=1.18.0", "uproot>=5.0.0"]

[project.optional-dependencies]
test = [
Expand All @@ -49,10 +49,10 @@ docs = [
]

[project.urls]
Homepage = "https://github.com/zbilodea/Odapt"
"Bug Tracker" = "https://github.com/zbilodea/Odapt/issues"
Discussions = "https://github.com/zbilodea/Odapt/discussions"
Changelog = "https://github.com/zbilodea/Odapt/releases"
Homepage = "https://github.com/zbilodea/odapt"
"Bug Tracker" = "https://github.com/zbilodea/odapt/issues"
Discussions = "https://github.com/zbilodea/odapt/discussions"
Changelog = "https://github.com/zbilodea/odapt/releases"


[tool.hatch]
Expand Down Expand Up @@ -160,3 +160,6 @@ messages_control.disable = [
"missing-module-docstring",
"wrong-import-position",
]

[project.scripts]
odapt = "odapt.src.operations.hadd:main"
3 changes: 2 additions & 1 deletion src/odapt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"""
Copyright (c) 2023 Zoë Bilodeau. All rights reserved.
Odapt: File conversion package.
odapt: File conversion package.
"""
from __future__ import annotations

from odapt._version import version as __version__
from odapt.operations import hadd # noqa: F401

__all__ = ["__version__"]
3 changes: 3 additions & 0 deletions src/odapt/operations/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from __future__ import annotations

from odapt.operations.hadd import hadd, main # noqa: F401
Loading

0 comments on commit df45547

Please sign in to comment.