Skip to content

Conversation

@heiruwu
Copy link
Contributor

@heiruwu heiruwu commented Nov 7, 2023

Because

  • allow better user experience when setting target host and api token

This commit

  • make config file optional and allow setting default host and api token during runtime
  • fix mandatory recipe argument even with existing resource
  • bump protogen-python version

Resolves INS-2505

@linear
Copy link

linear bot commented Nov 7, 2023

INS-2507 [Improvement] optional config file for python-sdk

Is There an Existing Issue for This?

  • I have searched the existing issues

Project

Instill SDK

Is your Proposal Related to a Problem?

config file is cumbersome for sdk usage

Describe Your Proposed Improvement

make config file optional, and allow setting the host and api-key in script

Highlight the Benefits

better user experience

Anything Else?

No response

INS-2505 [Bug] `recipe` should be optional when creating a `Pipeline` object with existing pipeline

Is There an Existing Issue for This?

  • I have searched the existing issues

Project

Instill SDK

Describe the Bug

when using python-sdk, creating a Pipeline resource object requires recipe as input, even if the pipeline exist.

Steps to Reproduce

  1. import instill
  2. import instill.resources.Pipeline
  3. get client
something = Pipeline(client=client, name=pipeline_id)

wont work

Actual Result

TypeError: __init__() missing 1 required positional argument: 'recipe'

Expected Behavior

no error

Technical Details

  • Project version:
  • Service name: python-sdk
  • Service version: 0.3.0rc11
  • OS: macOS
  • Browser: none

Anything Else?

No response

@codecov
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (d32fb83) 53.40% compared to head (bc8113d) 53.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   53.40%   53.52%   +0.12%     
==========================================
  Files          23       23              
  Lines         882      880       -2     
  Branches      177      176       -1     
==========================================
  Hits          471      471              
+ Misses        392      390       -2     
  Partials       19       19              
Files Coverage Δ
instill/resources/pipeline.py 51.35% <ø> (ø)
instill/configuration/__init__.py 73.17% <50.00%> (+3.40%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@heiruwu heiruwu merged commit 5290868 into main Nov 7, 2023
@heiruwu heiruwu deleted the heiru/ins-2507-improvement-optional-config-file-for-python-sdk branch November 7, 2023 21:46
heiruwu pushed a commit that referenced this pull request Nov 7, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.3.0](v0.2.1...v0.3.0)
(2023-11-07)


### ⚠ BREAKING CHANGES

* **client:** fix wrongful delete of resources and connection not close
([#42](#42))

### Features

* **ray:** add help functions for ray model
([#40](#40))
([39b2cc7](39b2cc7))


### Bug Fixes

* **client:** fix wrongful delete of resources and connection not close
([#42](#42))
([d32fb83](d32fb83))
* **config,pipeline:** allow no config file and fix required pipeline
recipe ([#43](#43))
([5290868](5290868))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: 👋 Done

3 participants