Skip to content

Support editing/patching model files#140

Merged
nkoenig merged 7 commits intoign-fuel-tools4from
edit_upload_form
Dec 9, 2020
Merged

Support editing/patching model files#140
nkoenig merged 7 commits intoign-fuel-tools4from
edit_upload_form

Conversation

@nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Dec 3, 2020

This allows an edit command to change a model's files, metadata, tags, etc.

Example usage:

ign fuel edit -v 4 -m PATH_TO_MODEL -u "https://fuel.ignitionrobotics.org/1.0/OWNER/models/MODEL_NAME" --header 'Private-Token: PRIVATE_TOKEN'

Signed-off-by: Nate Koenig nate@openrobotics.org

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Dec 3, 2020
@codecov
Copy link

codecov bot commented Dec 3, 2020

Codecov Report

Merging #140 (aa8250c) into ign-fuel-tools4 (bdf5303) will increase coverage by 1.24%.
The diff coverage is 32.92%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           ign-fuel-tools4     #140      +/-   ##
===================================================
+ Coverage            77.30%   78.55%   +1.24%     
===================================================
  Files                   19       19              
  Lines                 2560     2583      +23     
===================================================
+ Hits                  1979     2029      +50     
+ Misses                 581      554      -27     
Impacted Files Coverage Δ
src/ign.cc 60.86% <0.00%> (-0.90%) ⬇️
src/FuelClient.cc 72.64% <36.48%> (+3.82%) ⬆️
src/RestClient.cc 67.91% <0.00%> (+10.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdf5303...aa8250c. Read the comment docs.

Nate Koenig added 3 commits December 3, 2020 15:58
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

I understand that testing a successful edit would be complicated, but maybe we could at least add some tests for some of the failure modes, to cover part of the code.

Nate Koenig added 2 commits December 8, 2020 09:53
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig
Copy link
Contributor Author

nkoenig commented Dec 8, 2020

I understand that testing a successful edit would be complicated, but maybe we could at least add some tests for some of the failure modes, to cover part of the code.

Some tests added in e3ae7d8

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Works for me 👍

One weird thing I ran into was that I forgot to pass -u to the edit command, and I got this error message:

Invalid URL: only models can be edited right now.

I think we could catch the missing URL earlier.

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig
Copy link
Contributor Author

nkoenig commented Dec 9, 2020

Works for me

One weird thing I ran into was that I forgot to pass -u to the edit command, and I got this error message:

Invalid URL: only models can be edited right now.

I think we could catch the missing URL earlier.

Added early catch in aa8250c.

@nkoenig nkoenig merged commit 21e8b0f into ign-fuel-tools4 Dec 9, 2020
@nkoenig nkoenig deleted the edit_upload_form branch December 9, 2020 21:49
nkoenig added a commit that referenced this pull request Dec 23, 2020
* Use lowercase resource and owner names when storing assets on disk (#130)

* Use lowercase resource and owner names when storing assets on disk

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove added diff text from merge

Signed-off-by: John Shepherd <john@openrobotics.org>

* change model version in test back

Signed-off-by: John Shepherd <john@openrobotics.org>

* Fix test

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix windows

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix more windows tests

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Testing another windows fix

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: John Shepherd <john@openrobotics.org>

* Prepare for 3.5.0 release (#135)

* Prepare for 3.5.0 release

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update Changelog.md

Co-authored-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Download model dependencies (#123)

Signed-off-by: John Shepherd <john@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Prepare for 4.3.0 release (#139)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Set keep alive on (#141)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Support editing/patching model files (#140)

* Support editing/patching model files

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added documentation

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Set keep alive on

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Documentation and tests

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* One more test and exit catch missing -u

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Prepare for 5.1.0 release (#145)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Fix light map URI (#146)

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Bump to 5.1.1 (#147)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Nate Koenig <nkoenig@users.noreply.github.com>
Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: John Shepherd <john@openrobotics.org>
Co-authored-by: Ian Chen <ichen@osrfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏰 citadel Ignition Citadel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants