Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve and add new replacements to the dataset module #403

Merged
merged 48 commits into from
Oct 10, 2024

Conversation

promans718
Copy link
Contributor

@promans718 promans718 commented Oct 4, 2024

  • Allow negative indexes for list elements in context searches. Example: [CONTEXT:element.-1]
  • Add support for JSON strings to the DICT and `LIST`` replacement. Example: [DICT:{"key": true}], [LIST:[null]]
  • Add REPLACE replacement, to replace a substring with another. Example: [REPLACE:[CONTEXT:some_url]::https::http]
  • Add TITLE replacement, to apply Python's title() function. Example: [TITLE:the title]
  • Add ROUND replacement, float number to a string with the indicated number of decimals. Example: [ROUND:3.3333::2]

toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
Copy link
Member

@pabloge pabloge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Estos cambios son nuevas funcionalidades, así que el título de la PR debería ser algo tipo feat: improve and add new replacements to the dataset module

Y habría que añadir un pequeño resumen en inglés a la descripción de la PR, que queda muy triste vacía.

CHANGELOG.rst Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
@promans718 promans718 changed the title chore: Update utils datasets functions feat: improve and add new replacements to the dataset module Oct 7, 2024
Copy link
Member

@pabloge pabloge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Algunos comentarios más.

Y sigue faltando una pequeña descripción en la PR, como comentaba aquí: #403 (review)

image

toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
toolium/utils/dataset.py Outdated Show resolved Hide resolved
@promans718 promans718 requested review from pabloge and rgonalo October 8, 2024 09:02
Copy link
Member

@pabloge pabloge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faltaría añadir la nueva transformación ROUND al summary.

toolium/test/utils/test_dataset_replace_param.py Outdated Show resolved Hide resolved
pabloge
pabloge previously approved these changes Oct 9, 2024
Copy link
Member

@pabloge pabloge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

toolium/utils/dataset.py Outdated Show resolved Hide resolved
@promans718 promans718 closed this Oct 9, 2024
@promans718 promans718 reopened this Oct 9, 2024
@promans718 promans718 requested review from rgonalo and pabloge October 9, 2024 17:03
rgonalo
rgonalo previously approved these changes Oct 10, 2024
Copy link

codeclimate bot commented Oct 10, 2024

Code Climate has analyzed commit b650606 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3

View more on Code Climate.

@pabloge pabloge merged commit 5699865 into Telefonica:master Oct 10, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants