Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Add script: merge concat without space #602

Merged
merged 8 commits into from
Sep 2, 2021
Merged

Add script: merge concat without space #602

merged 8 commits into from
Sep 2, 2021

Conversation

nriss
Copy link
Contributor

@nriss nriss commented Sep 1, 2021

Fixes

Fixes #[issue number] by @[issue author]

Description

Technical details

Tests

django/common/scripts/cleaning/clean_string.py Outdated Show resolved Hide resolved
from common.scripts.merging import merge_concat_without_separator


def test_merge_concat_without_separator():
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to separate this into several tests (for each type)
And you can also use parametrization to improve readability and copy-paste errors: https://docs.pytest.org/en/6.2.x/parametrize.html

@nriss nriss requested a review from Jasopaum September 2, 2021 08:39
Copy link
Contributor

@elsiehoffet-94 elsiehoffet-94 left a comment

Choose a reason for hiding this comment

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

Hi! I'm trying to understand the purpose of this PR, and why you needed to add this script, but I'm probably a step behind the latest developments on cleaning scripts. Didn't this script already exist ? https://github.com/arkhn/cleaning-scripts/blob/master/scripts/utils/concat_without_separator.py

Or did you want to do some cleaning ?

Copy link
Contributor

@Jasopaum Jasopaum left a comment

Choose a reason for hiding this comment

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

I think it would be easier to have all the tests in the same file 🙂

tests/common/scripts/merging/test_merge_concat_bool.py Outdated Show resolved Hide resolved
tests/common/scripts/merging/test_merge_concat_bool.py Outdated Show resolved Hide resolved
tests/common/scripts/merging/test_merge_concat_string.py Outdated Show resolved Hide resolved
tests/common/scripts/merging/test_merge_concat_string.py Outdated Show resolved Hide resolved
@nriss
Copy link
Contributor Author

nriss commented Sep 2, 2021

Hi! I'm trying to understand the purpose of this PR, and why you needed to add this script, but I'm probably a step behind the latest developments on cleaning scripts. Didn't this script already exist ? https://github.com/arkhn/cleaning-scripts/blob/master/scripts/utils/concat_without_separator.py

Or did you want to do some cleaning ?

The scripts on the utils folder doesn't appear on pyrog, their purpose is to be called by other scripts.
I need to use it on pyrog, to create canonical url for example

Copy link
Contributor

@Jasopaum Jasopaum left a comment

Choose a reason for hiding this comment

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

LGTM if tests do pass 🙂

@nriss nriss merged commit b415b09 into main Sep 2, 2021
@nriss nriss deleted the nr/mergeConcatWOSpace branch September 2, 2021 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants