Title: Incorrect signature for BMI initialize method · Issue #30 · csdms/bmi-example-python · GitHub
Open Graph Title: Incorrect signature for BMI initialize method · Issue #30 · csdms/bmi-example-python
X Title: Incorrect signature for BMI initialize method · Issue #30 · csdms/bmi-example-python
Description: According to the BMI spec, the filename argument for the BMI initialize method must not be optional and must be a string. Right now BmiHeat.initialize accepts either None, a file-like object, or a string. I think this should be changed s...
Open Graph Description: According to the BMI spec, the filename argument for the BMI initialize method must not be optional and must be a string. Right now BmiHeat.initialize accepts either None, a file-like object, or a ...
X Description: According to the BMI spec, the filename argument for the BMI initialize method must not be optional and must be a string. Right now BmiHeat.initialize accepts either None, a file-like object, or a ...
Opengraph URL: https://github.com/csdms/bmi-example-python/issues/30
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect signature for BMI initialize method","articleBody":"According to the BMI spec, the *filename* argument for the BMI *initialize* method must not be optional and must be a string. Right now `BmiHeat.initialize` accepts either `None`, a file-like object, or a string. I think this should be changed so that it only accepts a string that is a path to a configuration file.\r\n\r\ni.e.\r\n```python\r\ndef initialize(self, filename: str):\r\n with open(filename) as file_obj:\r\n self._model = Heat.from_file_like(file_obj)\r\n ...\r\n```\r\n\r\nActually, in looking at what's there now, I think there's also a bug. `Heat.from_file_like` must take a stream, not a string \r\n\r\ni.e. \r\n```python\r\nHeat.from_file_like(file_obj.read())\r\n```\r\nshould be\r\n```python\r\nHeat.from_file_like(file_obj)\r\n```","author":{"url":"https://github.com/mcflugen","@type":"Person","name":"mcflugen"},"datePublished":"2024-01-13T19:12:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/30/bmi-example-python/issues/30"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d423469e-30c7-3a6e-b2a5-3c8061e1caf0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D18E:352A42:1378750:195F7B4:697D4FC2 |
| html-safe-nonce | c033534e0c1df12a3f85e532611d5f86ceee27ec8f93fcc02c1801cae5b9dc77 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMThFOjM1MkE0MjoxMzc4NzUwOjE5NUY3QjQ6Njk3RDRGQzIiLCJ2aXNpdG9yX2lkIjoiMjQzNzMwNDEwODcxMzg1Njk2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bb5abc9b8f37dac86a23a5904e37f4c73d77ac403234c434528d971f176c0da8 |
| hovercard-subject-tag | issue:2080439915 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/csdms/bmi-example-python/30/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cdd8e32051eccf0e3d21c4872876a312b8f17a7b4f130bc5bca602d61ca6bec1/csdms/bmi-example-python/issues/30 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cdd8e32051eccf0e3d21c4872876a312b8f17a7b4f130bc5bca602d61ca6bec1/csdms/bmi-example-python/issues/30 |
| og:image:alt | According to the BMI spec, the filename argument for the BMI initialize method must not be optional and must be a string. Right now BmiHeat.initialize accepts either None, a file-like object, or a ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mcflugen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/csdms/bmi-example-python git https://github.com/csdms/bmi-example-python.git |
| octolytics-dimension-user_id | 6618239 |
| octolytics-dimension-user_login | csdms |
| octolytics-dimension-repository_id | 27944584 |
| octolytics-dimension-repository_nwo | csdms/bmi-example-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27944584 |
| octolytics-dimension-repository_network_root_nwo | csdms/bmi-example-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width