Skip to content

Commit

Permalink
Revert bump changes (#44)
Browse files Browse the repository at this point in the history
* Revert bump workflow

* used fixed version in sphinx

* added newlines

* pre-commit autoupdate

* updated configurations
  • Loading branch information
yarnabrina authored Apr 14, 2024
1 parent c223ebe commit a077038
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 80 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/bump.yml

This file was deleted.

38 changes: 28 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand Down Expand Up @@ -41,7 +41,10 @@ repos:
hooks:
- id: autoflake
args:
- docs
- src
- tests
- noxfile.py
pass_filenames: false
stages:
- manual
Expand All @@ -50,18 +53,21 @@ repos:
hooks:
- id: isort
args:
- src
- .
pass_filenames: false
stages:
- manual
- repo: https://github.com/psf/black
rev: 24.3.0
rev: 24.4.0
hooks:
- id: black
additional_dependencies:
- .[jupyter]
args:
- docs
- src
- tests
- noxfile.py
pass_filenames: false
stages:
- manual
Expand All @@ -75,14 +81,20 @@ repos:
- high
- --confidence-level
- high
- docs
- src
- tests
- noxfile.py
pass_filenames: false
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
args:
- docs
- src
- tests
- noxfile.py
pass_filenames: false
stages:
- manual
Expand All @@ -105,27 +117,27 @@ repos:
args:
- --disable
- import-error
- src
- .
pass_filenames: false
stages:
- manual
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.357
rev: v1.1.358
hooks:
- id: pyright
pass_filenames: false
stages:
- manual
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.3.7
hooks:
- id: ruff
args:
- src
- .
pass_filenames: false
- id: ruff-format
args:
- src
- .
pass_filenames: false
- repo: https://github.com/jendrikseipp/vulture
rev: v2.11
Expand All @@ -140,7 +152,10 @@ repos:
- .[tomli]
args:
- --in-place
- docs
- src
- tests
- noxfile.py
pass_filenames: false
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
Expand All @@ -152,11 +167,14 @@ repos:
- --target-version
- py310
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
rev: 1.7.0
hooks:
- id: interrogate
args:
- docs
- src
- tests
- noxfile.py
pass_filenames: false
- repo: https://github.com/numpy/numpydoc
rev: v1.7.0
Expand All @@ -183,7 +201,7 @@ repos:
stages:
- manual
- repo: https://github.com/crate-ci/typos
rev: v1.20.4
rev: v1.20.8
hooks:
- id: typos
args:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- [x] ~~Hypotheses Testing~~
- [x] ~~Pydantic Validation~~
- [x] ~~Support Expressions~~
- [x] ~~Bump Workflow~~
- [ ] Bump Workflow

## Tools Used

Expand Down
9 changes: 2 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
"""Configure Sphinx documentation."""
# pylint: disable=invalid-name
import sys

import package_name_to_import_with

sys.path.insert(0, "../src")

# pylint: disable=invalid-name
project = "package-name-to-install-with"
version = str(package_name_to_import_with.__version__)
version = "0.0.5"
project_copyright = "2022-2024, Anirban Ray, First Maintainer, Second Maintainer"
author = "Anirban Ray, First Author, Second Author"
release = f"v{version}"
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configure nox."""

import functools
import pathlib

Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ src = [
"docs",
"src",
"tests",
"noxfile.py",
]
target-version = "py310"

Expand Down Expand Up @@ -310,7 +311,10 @@ atomic = true
line_length = 99
remove_redundant_aliases = true
src_paths = [
"docs",
"src",
"tests",
"noxfile.py",
]
py_version = 310

Expand Down Expand Up @@ -404,6 +408,10 @@ serialize = [
"{major}.{minor}.{patch}",
]
tag = false

[[tool.bumpversion.files]]
filename = "docs/source/conf.py"

[[tool.bumpversion.files]]
filename = "src/package_name_to_import_with/metadata.json"

Expand Down Expand Up @@ -448,7 +456,10 @@ ignore-init-method = true
[tool.vulture]
min_confidence = 100
paths = [
"docs",
"src",
"tests",
"noxfile.py",
]

[tool.numpydoc_validation]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def test_successful_operation(
],
)
def test_operation_failure(
first_input: typing.Any, operator: typing.Any, second_input: typing.Any # noqa: ANN401
first_input: typing.Any, # noqa: ANN401
operator: typing.Any, # noqa: ANN401
second_input: typing.Any, # noqa: ANN401
) -> None:
"""Check failure during calculations.
Expand Down
18 changes: 15 additions & 3 deletions tests/package_name_to_import_with/test_hypotheses.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ def generate_finite_numbers() -> hypothesis.strategies.SearchStrategy:
"""
generate_numbers_strategy = hypothesis.strategies.one_of(
hypothesis.strategies.integers(min_value=-10000, max_value=10000),
hypothesis.strategies.floats(min_value=-10000, max_value=10000,allow_nan=False, allow_infinity=False, allow_subnormal=False, width=16),
hypothesis.strategies.floats(
min_value=-10000,
max_value=10000,
allow_nan=False,
allow_infinity=False,
allow_subnormal=False,
width=16,
),
hypothesis.strategies.fractions(),
)

Expand All @@ -49,8 +56,13 @@ def generate_arithmetic_expression() -> hypothesis.strategies.SearchStrategy:
"""
generate_finite_number_strategy = hypothesis.strategies.one_of(
hypothesis.strategies.integers(min_value=-10000, max_value=10000).map(str),
hypothesis.strategies.floats(min_value=-10000, max_value=10000,
allow_nan=False, allow_infinity=False, allow_subnormal=False, width=16
hypothesis.strategies.floats(
min_value=-10000,
max_value=10000,
allow_nan=False,
allow_infinity=False,
allow_subnormal=False,
width=16,
).map(lambda element: format(element, "f")),
)
generate_conditional_space_strategy = hypothesis.strategies.booleans().map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class BinaryArithmeticExpression(CustomPydanticBaseModel):
left_operand: float
binary_operator: BinaryArithmeticOperator
right_operand: float
def validate_zero_division(self) -> BinaryArithmeticExpression: ...
def validate_zero_division(self: BinaryArithmeticExpression) -> BinaryArithmeticExpression: ...
@property
def operation(self) -> BinaryArithmeticOperation: ...
def operation(self: BinaryArithmeticExpression) -> BinaryArithmeticOperation: ...
@functools.cached_property
def result(self) -> float: ...
def result(self: BinaryArithmeticExpression) -> float: ...

def calculate_results(
first_input: float, operator: BinaryArithmeticOperator, second_input: float
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PackageMetadata(CustomPydanticBaseModel):
Authors: list[str]
Links: dict[str, pydantic.HttpUrl]
@classmethod
def validate_version(cls, version: str) -> str: ...
def validate_version(cls: PackageMetadata, version: str) -> str: ...

METADATA_CONTENTS: str
METADATA: PackageMetadata

0 comments on commit a077038

Please sign in to comment.