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: Add output_path property, and streamline implementation #50

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Dec 17, 2023

About

Users got confused about the semantics of the output_path_prefix property. This patch makes it better by renaming it to output_path, while still providing backwards-compatibility.

Further, the destination_path property can also be used, thus this target can be a drop-in replacement to the hotgluexyz variant.

The value of the variable does not need to be configured using a trailing slash any longer. Instead, the implementation more thoroughly leverages pathlib.Path for concatenating output_path and filename.

References

Thoughts

I am not sure about fc54324. I added it because mypy tripped like described in the commit message. Please educate me if that was wrong, so I will either remove it or amend it correspondingly.

@amotl amotl force-pushed the output-path branch 3 times, most recently from fc54324 to b28bf07 Compare December 17, 2023 00:39
@amotl
Copy link
Contributor Author

amotl commented Dec 17, 2023

Thank you for unblocking CI. 👍

target_csv/sinks.py Show resolved Hide resolved
target_csv/target.py Outdated Show resolved Hide resolved
target_csv/target.py Outdated Show resolved Hide resolved
@amotl amotl force-pushed the output-path branch 3 times, most recently from f1a0fed to 61ecf7a Compare December 18, 2023 18:41
error: Argument 1 to "__init__" of "Sink" has incompatible type
"PluginBase"; expected "Target"  [arg-type]
Users got confused about the semantics of the `output_path_prefix`
property. This patch makes it better by renaming it to `output_path`,
while still providing backwards-compatibility.

Further, the `destination_path` property can also be used as an alias,
thus this target can be a drop-in replacement to the `hotgluexyz`
variant.

The value of the variable does not need to be configured using a
trailing slash any longer. Instead, the implementation more thoroughly
leverages `pathlib.Path` for concatenating `output_path` and `filename`.
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@edgarrmondragon edgarrmondragon merged commit 2b156b6 into MeltanoLabs:main Dec 18, 2023
8 checks passed
edgarrmondragon pushed a commit that referenced this pull request Dec 19, 2023
#54)

## About

- Add software tests missing from GH-50.
- Improve documentation wrt. GH-53.
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.

2 participants