Skip to content

Added more code generation utilities#369

Merged
nfx merged 1 commit intomainfrom
wait/status-type
Apr 17, 2023
Merged

Added more code generation utilities#369
nfx merged 1 commit intomainfrom
wait/status-type

Conversation

@nfx
Copy link
Copy Markdown
Contributor

@nfx nfx commented Apr 17, 2023

Changes

  • added dict "k" "v" "k2" "v2" function to construct map[string]string{"k": "v", "k2": "v2"}
  • added getOrDefault $dict "default value"
  • added fmt as template alias for fmt.Sprintf
  • added concat "a" "b" "c" to join strings to "abc"
  • added TrimPrefix on *Named to (.TrimPrefix "account").CamelName

Tests

  • make test passing
  • make fmt applied
  • relevant integration tests applied

- added `dict "k" "v" "k2" "v2"` function to construct `map[string]string{"k": "v", "k2": "v2"}`
- added `getOrDefault $dict "default value"`
- added `fmt` as template alias for `fmt.Sprintf`
- added `concat "a" "b" "c"` to join strings to "abc"
- added `TrimPrefix` on `*Named` to `(.TrimPrefix "account").CamelName`
@nfx nfx requested a review from mgyucht April 17, 2023 11:57
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: -0.35 ⚠️

Comparison is base (c4dcc5a) 41.82% compared to head (9251f2e) 41.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #369      +/-   ##
==========================================
- Coverage   41.82%   41.47%   -0.35%     
==========================================
  Files          50       50              
  Lines        2788     2811      +23     
==========================================
  Hits         1166     1166              
- Misses       1518     1541      +23     
  Partials      104      104              
Impacted Files Coverage Δ
openapi/code/named.go 88.70% <0.00%> (-2.20%) ⬇️
openapi/code/tmpl_util_funcs.go 0.00% <0.00%> (ø)
openapi/code/wait.go 51.25% <0.00%> (-2.70%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tanmay-db tanmay-db changed the title Added more code generation utilities [PLAT-75252] Added more code generation utilities Apr 17, 2023
@tanmay-db tanmay-db changed the title [PLAT-75252] Added more code generation utilities Added more code generation utilities Apr 17, 2023
@nfx nfx merged commit 4732b87 into main Apr 17, 2023
@nfx nfx deleted the wait/status-type branch April 17, 2023 12:54
@nfx nfx mentioned this pull request Apr 20, 2023
nfx added a commit that referenced this pull request Apr 20, 2023
# Version changelog

## 0.8.0

* Added more code generation utilities
([#369](#369)).
* Body logger for non-JSON payload as well
([#365](#365)).
* Cleanup ephemeral groups in integration tests
([#368](#368)).
* Fixed external entity generation
([#372](#372)).
* Skip loading default profile if host is already configured
([#363](#363)).
* Update debug messages in config loader to display correct path
([#362](#362)).

Dependency updates:

* Bump golang.org/x/oauth2 from 0.6.0 to 0.7.0
([#364](#364)).
* Bump google.golang.org/api from 0.115.0 to 0.116.0
([#361](#361)).
* Bump google.golang.org/api from 0.116.0 to 0.118.0
([#367](#367)).
 
API changes:

 * Moved `clusterpolicies` APIs to `compute` package.
 * Moved `clusters` APIs to `compute` package.
 * Moved `commands` APIs to `compute` package.
 * Moved `globalinitscripts` APIs to `compute` package.
 * Moved `instancepools` APIs to `compute` package.
 * Moved `scim` APIs to `iam` package.
 * Moved `permissions` APIs to `iam` package.
 * Moved `ipaccesslists` APIs to `settings` package.
 * Moved `tokenmanagement` APIs to `settings` package.
 * Moved `tokens` APIs to `settings` package.
 * Moved `workspaceconf` APIs to `settings` package.
 * Moved `gitcredentials` APIs to `workspace` package.
 * Moved `repos` APIs to `workspace` package.
 * Moved `secrets` APIs to `workspace` package.
 * Split `unitcatalog` package to `catalog` and `sharing`.
 * Renamed `mlflow` package to `ml`.
 * Renamed `dbfs` package to `files`.
 * Renamed `deployment` package to `provisioning`.
 * Renamed `endpoints` package to `serving`.
 * Renamed `clusters.List` type to `compute.ListClustersRequest`.
 * Renamed `jobs.ListRuns` type to `jobs.ListRunsRequest`.
 * Renamed `jobs.ExportRun` type to `jobs.ExportRunRequest`.
* Renamed `clusterpolicies.List` type to
`compute.ListClusterPoliciesRequest`.
 * Renamed `jobs.List` type to `jobs.ListJobsRequest`.
* Renamed `permissions.GetPermissionLevels` type to
`iam.GetPermissionLevelsRequest`.
* Renamed `pipelines.ListPipelineEvents` type to
`pipelines.ListPipelineEventsRequest`.
* Renamed `pipelines.ListPipelines` type to
`pipelines.ListPipelinesRequest`.
* Renamed `workspaceconf.GetStatus` type to `settings.GetStatusRequest`.
 * Renamed `repos.List` type to `workspace.ListReposRequest`.
* Renamed `tokenmanagement.List` type to
`settings.ListTokenManagementRequest`.
 * Renamed `workspace.Export` type to `workspace.ExportRequest`.
 * Renamed `workspace.List` type to `workspace.ListWorkspaceRequest`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants