Skip to content

Commit

Permalink
Merge pull request #58 from fazedordecodigo/11-add-guid-validation
Browse files Browse the repository at this point in the history
Release v2.2.0
  • Loading branch information
fazedordecodigo authored Mar 13, 2024
2 parents aac3efb + f30be4a commit c076e0c
Show file tree
Hide file tree
Showing 33 changed files with 1,915 additions and 909 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: python -m pip install --upgrade pip

- name: Instala dependências
run: python -m pip install -r requirements_dev.txt
run: python -m pip install -r ./requirements/requirements_dev.txt

- name: Executa Ruff
run: python -m ruff check
57 changes: 0 additions & 57 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Realiza o checkout
uses: actions/checkout@v4
Expand Down
38 changes: 31 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
default_language_version:
python: python3

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-symlinks
- id: destroyed-symlinks
- id: mixed-line-ending
args:
- "--fix=lf"

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
- id: pyupgrade
args: ["--py39-plus"]

- repo: https://github.com/python-poetry/poetry
rev: 1.7.1
rev: 1.8.0
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: ["--with", "dev", "-f", "requirements.txt", "-o", "requirements_dev.txt"]
- id: poetry-install
args: [
"--with",
"dev",
"-f",
"requirements.txt",
"-o",
"./requirements/requirements_dev.txt",
]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
rev: v0.3.0
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
args:
- "--fix"
- "--fixable=ALL"
- "--exit-non-zero-on-fix"
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORTUGUÊS | [ENGLISH](./CHANGELOG_EN.md)
PORTUGUÊS | [ENGLISH](https://github.com/fazedordecodigo/PyFlunt/blob/main/CHANGELOG_EN.md)

# Registro de Alterações

Expand All @@ -8,7 +8,6 @@ O formato é baseado em [Mantenha um Registro de Alterações](https://keepachan
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/spec/v2.0.0.html).

## [Não Lançado]
- Adicionar validação de GUID [#11](https://github.com/fazedordecodigo/PyFlunt/issues/11)
- Adicionar mensagens padronizadas em PT-BR e EN [#18](https://github.com/fazedordecodigo/PyFlunt/issues/18)
- Adicionar validação de DateTime [#27](https://github.com/fazedordecodigo/PyFlunt/issues/27)
- Adicionar validação de Números [#28](https://github.com/fazedordecodigo/PyFlunt/issues/28)
Expand All @@ -18,6 +17,18 @@ e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR
- Adicionar validação de Regex [#32](https://github.com/fazedordecodigo/PyFlunt/issues/32)
- Adicionar validação de URL [#33](https://github.com/fazedordecodigo/PyFlunt/issues/33)

## [2.2.0] - 2024-03-13
### Adicionado
- Validação UUID aplicando Duck Typing [#11](https://github.com/fazedordecodigo/PyFlunt/issues/11)
- Novos cenários de teste unitários

### Corrigido
- Links do README quebrados [#53](https://github.com/fazedordecodigo/PyFlunt/issues/53)
- Bug em `requires` que retornava falso positivo ao receber o valor booleano `False`.
- Reescrita dos testes unitários existentes.



## [2.1.1] - 2024-02-27
### Corrigido
- Links do README quebrados [#53](https://github.com/fazedordecodigo/PyFlunt/issues/53)
Expand Down Expand Up @@ -78,6 +89,8 @@ e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR
<br>
<br>

[2.2.0](https://github.com/fazedordecodigo/PyFlunt/compare/v2.1.1...v2.2.0)

[2.1.1](https://github.com/fazedordecodigo/PyFlunt/compare/v2.1.0...v2.1.1)

[2.1.0](https://github.com/fazedordecodigo/PyFlunt/compare/v2.0.0...v2.1.0)
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG_EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ENGLISH | [PORTUGUÊS](./CHANGELOG.md)
ENGLISH | [PORTUGUÊS](https://github.com/fazedordecodigo/PyFlunt/blob/main/CHANGELOG.md)

# Changelog

Expand All @@ -8,7 +8,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0
and this project adheres to [Semantic Versioning](https://semver.org/lang/pt-BR/spec/v2.0.0.html).

## [Unreleased]
- Add GUID validation [#11](https://github.com/fazedordecodigo/PyFlunt/issues/11)
- Add standardized messages in PT-BR and EN [#18](https://github.com/fazedordecodigo/PyFlunt/issues/18)
- Add DateTime validation [#27](https://github.com/fazedordecodigo/PyFlunt/issues/27)
- Add Numbers validation [#28](https://github.com/fazedordecodigo/PyFlunt/issues/28)
Expand All @@ -18,6 +17,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/pt-BR/
- Add Regex validation [#32](https://github.com/fazedordecodigo/PyFlunt/issues/32)
- Add URL validation [#33](https://github.com/fazedordecodigo/PyFlunt/issues/33)

## [2.2.0] - 2024-03-13
### Added
- Applied Duck Typing for UUID validation [#11](https://github.com/fazedordecodigo/PyFlunt/issues/11)
- New unit test scenarios

### Fixed
- Fixed broken links in the README [#53](https://github.com/fazedordecodigo/PyFlunt/issues/53)
- Fixed bug in `requires` that returned a false positive when receiving the boolean value `False`.
- Rewrote existing unit tests.

## [2.1.1] - 2024-02-27
### Fixed
- Broken README links [#53](https://github.com/fazedordecodigo/PyFlunt/issues/53)
Expand All @@ -40,7 +49,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/pt-BR/
### Fixed
- Bug that prevented running on Python v3.9 [#36](https://github.com/fazedordecodigo/PyFlunt/issues/36)


## [2.0.0] - 2024-02-13
### Added

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORTUGUÊS | [ENGLISH](./CODE_OF_CONDUCT_EN.md)
PORTUGUÊS | [ENGLISH](https://github.com/fazedordecodigo/PyFlunt/blob/main/CODE_OF_CONDUCT_EN.md)

# Código de Conduta do Pacto do Contribuidor

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT_EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ENGLISH | [PORTUGUÊS](./CODE_OF_CONDUCT.md)
ENGLISH | [PORTUGUÊS](https://github.com/fazedordecodigo/PyFlunt/blob/main/CODE_OF_CONDUCT.md)

# Contributor Covenant Code of Conduct

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORTUGUÊS | [ENGLISH](./CONTRIBUTING_EN.md)
PORTUGUÊS | [ENGLISH](https://github.com/fazedordecodigo/PyFlunt/blob/main/CONTRIBUTING_EN.md)

# Contribuindo

Expand Down Expand Up @@ -92,7 +92,7 @@ $ poetry pre-commit-install

## Utilizando Localmente

Agora você pode usá-lo [da mesma forma descrita no arquivo README.md](/README.md#utilização).
Agora você pode usá-lo [da mesma forma descrita no arquivo README.md](https://github.com/fazedordecodigo/PyFlunt/blob/main/README.md#utilização).

## Testes

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING_EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ENGLISH | [PORTUGUÊS](./CONTRIBUTING.md)
ENGLISH | [PORTUGUÊS](https://github.com/fazedordecodigo/PyFlunt/blob/main/CONTRIBUTING.md)

# Contributing

Expand Down Expand Up @@ -89,7 +89,7 @@ $ poetry pre-commit-install

## Using Locally

Now you can use it [in the same way described in the README.md file](/README.md#utilization).
Now you can use it [in the same way described in the README.md file](https://github.com/fazedordecodigo/PyFlunt/blob/main/README.md#utilization).

## Testing

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
PORTUGUÊS | [ENGLISH](./README_EN.md)
PORTUGUÊS | [ENGLISH](https://github.com/fazedordecodigo/PyFlunt/blob/main/README_EN.md)

# 🐍 PyFlunt: Domain Notification Pattern

Implementação Python inspirada no [Flunt](https://github.com/andrebaltieri/flunt) (.NET)

[![Último Lançamento no PyPI](https://img.shields.io/pypi/v/flunt.svg)](https://pypi.org/project/flunt/)
[![Downloads](https://pepy.tech/badge/flunt)](https://pepy.tech/project/flunt)
[![python](https://img.shields.io/pypi/pyversions/flunt.svg)](https://pypi.org/project/flunt/)
[![Downloads](https://static.pepy.tech/badge/flunt/month)](https://pepy.tech/project/flunt)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Discord](https://img.shields.io/discord/1211477389830393866?logo=discord&label=Discord&color=5865F2&logoColor=white)](https://discord.gg/HNwFHQWX)

Expand Down Expand Up @@ -35,8 +36,8 @@ pip install flunt
### 🔔 Notifiable

````python
from flunt.notifiable import Notifiable
from flunt.notification import Notification
from flunt.notifications.notifiable import Notifiable
from flunt.validations.contract import Contract

class Nome(Notifiable):
def __init__(self, nome):
Expand All @@ -53,8 +54,8 @@ class Nome(Notifiable):
### 📜 Contract
````python
"""Módulo Objetos de Valor."""
from flunt.notifiable import Notifiable
from flunt.contract import Contract
from flunt.notifications.notifiable import Notifiable
from flunt.validations.contract import Contract


class Nome(Notifiable):
Expand Down Expand Up @@ -94,15 +95,15 @@ if not nome.is_valid():

## Contribuindo

Consulte nosso DevGuide no link a seguir: [CONTRIBUTING](./CONTRIBUTING.md)
Consulte nosso DevGuide no link a seguir: [CONTRIBUTING](https://github.com/fazedordecodigo/PyFlunt/blob/main/README.md/CONTRIBUTING.md)

## Registro de Alterações

Consulte nosso registro de alterações no link a seguir: [CHANGELOG](./CHANGELOG.md)
Consulte nosso registro de alterações no link a seguir: [CHANGELOG](https://github.com/fazedordecodigo/PyFlunt/blob/main/README.md/CHANGELOG.md)

## 📄 Licença

Este projeto contém a licença MIT. Consulte o arquivo [LICENSE](./LICENSE).
Este projeto contém a licença MIT. Consulte o arquivo [LICENSE](https://github.com/fazedordecodigo/PyFlunt/blob/main/README.md/LICENSE).

## Mods
* [Flunt para C# (Original)](https://github.com/andrebaltieri/Flunt)
Expand Down
19 changes: 10 additions & 9 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ENGLISH | [PORTUGUÊS](README)
ENGLISH | [PORTUGUÊS](https://github.com/fazedordecodigo/PyFlunt/blob/main/README.md)

# 🐍 PyFlunt: Domain Notification Pattern

Python implementation of Domain Notification Pattern inspired by [Flunt](https://github.com/andrebaltieri/flunt) (.NET)

[![Último Lançamento no PyPI](https://img.shields.io/pypi/v/flunt.svg)](https://pypi.org/project/flunt/)
[![Downloads](https://pepy.tech/badge/flunt)](https://pepy.tech/project/flunt)
[![python](https://img.shields.io/pypi/pyversions/flunt.svg)](https://pypi.org/project/flunt/)
[![Downloads](https://static.pepy.tech/badge/flunt/month)](https://pepy.tech/project/flunt)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-yellow.svg)](https://matrix.to/#/#pyflunt:gitter.im)

Expand Down Expand Up @@ -34,8 +35,8 @@ pip install flunt
### 🔔 Notifiable

````python
from flunt.notifiable import Notifiable
from flunt.notification import Notification
from flunt.notifications.notifiable import Notifiable
from flunt.validations.contract import Contract

class Name(Notifiable):
def __init__(self, name):
Expand All @@ -52,8 +53,8 @@ class Name(Notifiable):
### 📜 Contract
````python
"""Module Value Objects."""
from flunt.notifiable import Notifiable
from flunt.contract import Contract
from flunt.notifications.notifiable import Notifiable
from flunt.validations.contract import Contract


class Name(Notifiable):
Expand Down Expand Up @@ -92,15 +93,15 @@ if not nome.is_valid():
````
## Contributing

Please refer to our DevGuide at the following link: [CONTRIBUTING](CONTRIBUTING_EN)
Please refer to our DevGuide at the following link: [CONTRIBUTING](https://github.com/fazedordecodigo/PyFlunt/blob/main/CONTRIBUTING_EN.md)

## Changelog

Please refer to our changelog at the following link: [CHANGELOG](CHANGELOG_EN)
Please refer to our changelog at the following link: [CHANGELOG](https://github.com/fazedordecodigo/PyFlunt/blob/main/CHANGELOG_EN.md)

## 📄 License

This project contains the MIT license. See the file [LICENSE](LICENSE).
This project contains the MIT license. See the file [LICENSE](https://github.com/fazedordecodigo/PyFlunt/blob/main/LICENSE.md).

## Mods
* [Flunt for C# (Original)](https://github.com/andrebaltieri/Flunt)
Expand Down
5 changes: 4 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
PORTUGUÊS | [ENGLISH](./SECURITY_EN.md)
PORTUGUÊS | [ENGLISH](https://github.com/fazedordecodigo/PyFlunt/blob/main/SECURITY_EN.md)

# Política de Segurança

## Versões Suportadas

| Version | Supported |
| ------- | ------------------ |
| 2.2.0 | :white_check_mark: |
| 2.1.1 | :white_check_mark: |
| 2.1.0 | :white_check_mark: |
| 2.0.0 | :white_check_mark: |
| 1.0.0 | :x: |
| 0.2.0 | :x: |
Expand Down
5 changes: 4 additions & 1 deletion SECURITY_EN.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
ENGLISH | [PORTUGUÊS](./SECURITY.md)
ENGLISH | [PORTUGUÊS](https://github.com/fazedordecodigo/PyFlunt/blob/main/SECURITY.md)

# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 2.2.0 | :white_check_mark: |
| 2.1.1 | :white_check_mark: |
| 2.1.0 | :white_check_mark: |
| 2.0.0 | :white_check_mark: |
| 1.0.0 | :x: |
| 0.2.0 | :x: |
Expand Down
Loading

0 comments on commit c076e0c

Please sign in to comment.