-
Notifications
You must be signed in to change notification settings - Fork 90
Add package version #409
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
Merged
Merged
Add package version #409
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6afd059
Create the version.py w/ current meilisearch-python version
brunoocasali ebd84d9
Use version= from meilisearch.version.__version__ in setup.py
brunoocasali d166f19
Add basic coverage for version data
brunoocasali 813f88d
Update check-release script with the new way to update version
brunoocasali eebf948
Add type notation to the return of the qualified_version method
brunoocasali File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
__version__ = "0.18.0" | ||
|
||
def qualified_version() -> str: | ||
brunoocasali marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"""Get the qualified version of this module.""" | ||
|
||
return f"Meilisearch Python (v{__version__})" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from setuptools import setup, find_packages | ||
from meilisearch.version import __version__ | ||
|
||
with open("README.md", "r", encoding="utf8") as fh: | ||
long_description = fh.read() | ||
|
@@ -8,7 +9,7 @@ | |
"requests" | ||
], | ||
name="meilisearch", | ||
version="0.18.0", | ||
version=__version__, | ||
author="Charlotte Vermandel", | ||
author_email="[email protected]", | ||
description="The python client for Meilisearch API.", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# pylint: disable=invalid-name | ||
|
||
import re | ||
|
||
from meilisearch.version import __version__, qualified_version | ||
|
||
|
||
def test_get_version(): | ||
assert re.match(r'^(\d+\.)?(\d+\.)?(\*|\d+)$', __version__) | ||
|
||
def test_get_qualified_version(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function doesn't seem necessary so if it is removed this test can also be removed. |
||
assert qualified_version() == f"Meilisearch Python (v{__version__})" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.