-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feature/pymetkit #56
base: develop
Are you sure you want to change the base?
Feature/pymetkit #56
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #56 +/- ##
===========================================
- Coverage 60.39% 58.70% -1.70%
===========================================
Files 101 102 +1
Lines 6242 6422 +180
Branches 585 590 +5
===========================================
Hits 3770 3770
- Misses 2472 2652 +180 ☔ View full report in Codecov by Sentry. |
import findlibs | ||
from typing import IO, Iterator | ||
|
||
__metkit_version__ = "1.11.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: use the VERSION file
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "metkit-python" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: metkit-python -> pymetkit everywhere
|
||
[project] | ||
name = "metkit-python" | ||
version = "0.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we have one version of metkit/pymetkit together, or separate versioning?
lib.metkit_request_params(self.__request, cparams) | ||
self._cdata = ffi.gc(cparams[0], lib.metkit_free_paramiterator) | ||
|
||
while lib.metkit_paramiterator_next(self._cdata) == lib.METKIT_SUCCESS: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: next() should be at the end of this loop, not the beginning, as it skips the first element.
Happens to cancel out an error in the metkit_c, which nullifies the first call to next().
lib.metkit_request_params(self.__request, cparams) | ||
self._cdata = ffi.gc(cparams[0], lib.metkit_free_paramiterator) | ||
|
||
while lib.metkit_paramiterator_next(self._cdata) == lib.METKIT_SUCCESS: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem as request iterator, see comment.
Python interface, based on initial implementation by @jinmannwong.
wip