python-zulip-api icon indicating copy to clipboard operation
python-zulip-api copied to clipboard

config file: Add $PWD as default directory.

Open orientor opened this issue 4 years ago • 9 comments

The API will first check whether config file exists in the home directory. If not it will take the file from PWD.

This fixes #497

orientor avatar Feb 21 '20 23:02 orientor

There should be a documentation somewhere that needs to be updated to say that $PWD is detected, shouldn't it?

rht avatar Feb 22 '20 08:02 rht

@rht Updated the documentation. Kindly check.

orientor avatar Feb 23 '20 10:02 orientor

@orientor do you know what takes precedence in npm, $PWD or ~? I think it is $PWD but I haven't reconfirm. If that's the case, you might make it to check for $PWD first, instead of ~.

rht avatar Feb 23 '20 12:02 rht

@rht Yes it would make sense for local to have more precedence over global so that I can have different directories for different zulip API uses. npm also does the same, checking the project config file instead of global config if we are in the directory of a project.

orientor avatar Feb 23 '20 21:02 orientor

@rht changed the precedence accordingly.

orientor avatar Feb 23 '20 21:02 orientor

The commit messages need to end with fullstop as standard in Zulip commits (check out the examples at https://zulip.readthedocs.io/en/latest/contributing/version-control.html#commit-messages). Everything else LGTM.

rht avatar Feb 24 '20 00:02 rht

@rht done. Commit messages updated.

orientor avatar Feb 24 '20 00:02 orientor

Heads up @orientor, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

zulipbot avatar Apr 07 '20 23:04 zulipbot

I'm not convinced we want to make this change; I worry a bit that it'll replace "Have to type a bit more to specify the config" with "confusing behavior where $PWD is important to whether the tool works"

timabbott avatar Apr 07 '20 23:04 timabbott