Skip to content
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

Add prep and storage rename CLI #309

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Add prep and storage rename CLI #309

merged 5 commits into from
Sep 14, 2023

Conversation

xinaxu
Copy link
Contributor

@xinaxu xinaxu commented Sep 13, 2023

This adds support for belwo commands

singularity prep rename old new
singularity storage rename old new

Also updated CONTRIBUTING.md for how to do this correctly as listed below

resolves #292

  • Create a handler implementation under handler/* directory
  • Make proper godoc comments for the implementation
  • Add the handler function to the interface under handler/*/interface.go
  • Update the MockHandler under handler/*/interface.go
  • Create unit tests for this handler implementation
  • Create a function to document the swagger API func _(){}
  • Create corresponding API route handler in api/api.go
  • Create a CLI command under cmd/* directory
  • Update cmd/app.go to register the new command
  • Add the CLI command unit test in one of cmd/*_test.go
  • Optionally add CLI command integration tests in cmd/functional_test.go
  • Run make generate or go generate ./...
  • Add the swagger API unit test in api/api_test.go
  • Optionally add swagger API integration tests in cmd/api_test.go

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage: 68.42% and project coverage change: +3.49% 🎉

Comparison is base (72cbd09) 70.41% compared to head (1d875a5) 73.90%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
+ Coverage   70.41%   73.90%   +3.49%     
==========================================
  Files         130      134       +4     
  Lines        8065     8141      +76     
==========================================
+ Hits         5679     6017     +338     
+ Misses       1786     1488     -298     
- Partials      600      636      +36     
Files Changed Coverage Δ
cmd/app.go 44.61% <ø> (ø)
cmd/storage/list.go 53.84% <ø> (ø)
docs/swagger/docs.go 100.00% <ø> (ø)
handler/dataprep/create.go 69.31% <ø> (ø)
handler/storage/create.go 94.54% <ø> (ø)
cmd/dataprep/rename.go 53.84% <53.84%> (ø)
cmd/storage/rename.go 53.84% <53.84%> (ø)
handler/dataprep/rename.go 71.42% <71.42%> (ø)
handler/storage/rename.go 71.42% <71.42%> (ø)
api/api.go 74.31% <100.00%> (+0.15%) ⬆️
... and 2 more

... and 9 files with indirect coverage changes

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

@xinaxu xinaxu marked this pull request as ready for review September 13, 2023 17:58
- Optionally add CLI command integration tests in `cmd/functional_test.go`
- Run `make generate` or `go generate ./...`
- Add the swagger API unit test in `api/api_test.go`
- Optionally add swagger API integration tests in `cmd/api_test.go`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hannahhoward @elijaharita
See if above makes sense to you

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it makes sense!

@xinaxu xinaxu merged commit 0b33cc6 into main Sep 14, 2023
@xinaxu xinaxu deleted the xinaxu/rename branch September 14, 2023 17:09
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.

[Bug]: How to delete or rename after singularity prep create
2 participants