ni / ni/nisystemlink-clients-python

Update NotebookMetadata.metadata to an appropriate type

Open
#112 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10
Forks
32
Avg merge
12h 42m
Merged PRs (30d)
2

Description

NotebookMetadata.metadata is typed as Dict[str,Any] whereas there are a few standard fields documented by the example provided in the swagger docs.

https://github.com/ni/nisystemlink-clients-python/blob/4a965b48e791397d1aed56cd8dc2e7b0acade69d/nisystemlink/clients/notebook/models/_notebook_metadata.py#L34

OrderedMap { 
	"interfaces": List [ "interface" ], 
	"outputs": List [ 
		OrderedMap { 
			"display_name": "Output", 
			"id": "output", 
			"type": "scalar" 
			} ], 
	"parameters": List [
		OrderedMap { 
			"display_name": "Parameter1",
			"id": "parameter1",
			"type": "string" },
			OrderedMap {
				"display_name": "Parameter2",
				"id": "parameter2",
				"type": "string[]" 
				} ] 
			}

Developer experience will improve if the metadata field is properly modeled to depict the default optional fields instead of a generic type.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in nisystemlink/clients/notebook/models/_notebook_metadata.py at NotebookMetadata.metadata and compare its current generic type with the standard fields shown in the linked Swagger example. Model the documented optional fields so the metadata structure is represented explicitly, then verify the resulting type matches the example and improves developer-facing usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.