Skip to content

Commit

Permalink
Developed and tested ISOWeekday and Sequence calls support
Browse files Browse the repository at this point in the history
  • Loading branch information
gtkacz committed Jun 17, 2024
1 parent b6f5b18 commit f456a11
Show file tree
Hide file tree
Showing 7 changed files with 305 additions and 190 deletions.
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[run]
source = .
omit = ./venv/*,*tests*,*__init__.py,build/*,dist/*,docs/*
omit = ./venv/*,*tests*,*__init__.py,build/*,dist/*,docs/*,setup.py

[report]
omit = ./venv/*,*tests*,*__init__.py,build/*,dist/*,docs/*
omit = ./venv/*,*tests*,*__init__.py,build/*,dist/*,docs/*,setup.py
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2024-01-06
---

### Fixed

- `generate_legal_process` [#325](https://github.com/brazilian-utils/brutils-python/pull/325)
## [1.1.0] - 2024-06-17

### Added

- Utilitário `generate_voter_id` [#220](https://github.com/brazilian-utils/brutils-python/pull/220)
- Added support for `ISOWeekday`, meaning the int value of the weekdays follow the ISO-8601 standard: from 1 (Monday) to 7 (Sunday), to all weekday-based operations. You can also pass `int` or `str` objects corresponding to Pythonic weekdays.
- Added support for calling any method on sequences. Instead of passing a single temporal-like, you can pass any sequence of temporal-likes (for instance `list`, `np.ndarray`, `pd.Series`, etc.) and get back the same sequence with all temporal objects adjusted.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "temporal_adjuster"
dynamic = ["dependencies"]
version = "1.0.2"
version = "1.1.0"
description = "Adjusters are a key tool for modifying temporal objects. They exist to externalize the process of adjustment, permitting different approaches, as per the strategy design pattern. Temporal Adjuster provides tools that help pinpoint very specific moments in time, without having to manually count days, weeks, or months."
requires-python = ">= 3.7"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion temporal_adjuster/common/decorators/sequence_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def sequenceable(target: str):
This decorator is used to process if a sequence of values passed as an argument to a function. The function is called for each value in the sequence, and the result is stored in the same position in the sequence.
"""

def decorator(func: Callable[..., T]) -> Callable[..., Union[T, Sequence[T]]]:
def decorator(func):
@wraps(func)
def wrapper(*args, **kwargs) -> Union[T, Sequence[T]]:
# Get the function signature
Expand Down
Loading

0 comments on commit f456a11

Please sign in to comment.