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

Python client default mentat export #515

Merged
merged 8 commits into from
Feb 5, 2024
Merged

Conversation

jakethekoenig
Copy link
Member

You can now import the PythonClient via from mentat import Mentat.

  • Docs updated
  • Comments added to python_client
  • tests and benchmarks updated to use new import

Pull Request Checklist

  • Documentation has been updated, or this change doesn't require that

You can now import the PythonClient via from mentat import Mentat.
* Docs updated
* Comments added to python_client
* tests and benchmarks updated to use new import
This fixes an import issue.
@waydegilliam waydegilliam self-requested a review February 2, 2024 21:02
Comment on lines 114 to 115
"""Initiates shutdown of the client, ensuring all tasks are cancelled and the session is properly closed."""
"""Sends the stop signal to the session and returns when client is fully shutdown."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: make this a single block comment

readme_path = os.path.join(Path(__file__).parent, "README.md")
with open(readme_path, "r", encoding="utf-8") as f:
long_description = f.read()


setup(
name="mentat",
version=__version__,
version="1.0.9",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we hardcode this over using __version__?

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason I made this change was because we can't import from mentat in setup anymore because the default export will fail as requirements are not installed yet. The number has to be hardcoded somewhere and I thought here made sense but also considered putting it in a VERSION file which I've seen some packages do.

I'm down to do it a different way if you have opinions.

@jakethekoenig jakethekoenig merged commit 23ded7f into main Feb 5, 2024
16 checks passed
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.

2 participants