OceanNetworksCanada / api-python-client

Provides easy access to ONC data in Python
https://oceannetworkscanada.github.io/api-python-client/
Apache License 2.0
10 stars 9 forks source link

Issue 12 make outPath accept both str and Path #20

Closed Renfu-Li closed 8 months ago

Renfu-Li commented 9 months ago

Fixes https://github.com/OceanNetworksCanada/api-python-client/issues/12

Changed outPath to snake-case _out_path and its type to str | Path, then added a @property decorator to protect it. This can provide safer access to _out_path, facilitate testing and in general make the code cleaner.

I also modified the README.md in /tests to reflect the directory structure change, and fully resolved outPath for cleaner error messages.

All jobs passed after I manually triggered the "Formatting, Linting and Testing" workflow in my forked repo.

kan-fu commented 9 months ago

I have merged a quick workaround #22 for the problem that the PR from fork cannot use Actions secrets.

kan-fu commented 9 months ago

LGTM, with two suggestions! There's also some theorycraft in whether to allow attribute access (common in python, guarded in Java). Happy with whatever you guys choose, but I'm going to be out over the holidays, so don't let me hold you up.

We will also be off next week so there won't be any PR fom us. Happy holidays!

Renfu-Li commented 9 months ago

LGTM, with two suggestions! There's also some theorycraft in whether to allow attribute access (common in python, guarded in Java). Happy with whatever you guys choose, but I'm going to be out over the holidays, so don't let me hold you up.

Thanks for your helpful suggestions. Have a great holiday!