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

Support editing/patching model files #140

Merged
merged 7 commits into from
Dec 9, 2020
Merged

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 [email protected]

@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.

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.

include/ignition/fuel_tools/FuelClient.hh Show resolved Hide resolved
src/ign.hh Show resolved Hide resolved
@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.

@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 <[email protected]>

* Remove added diff text from merge

Signed-off-by: John Shepherd <[email protected]>

* change model version in test back

Signed-off-by: John Shepherd <[email protected]>

* Fix test

Signed-off-by: Nate Koenig <[email protected]>

* Fix windows

Signed-off-by: Nate Koenig <[email protected]>

* Fix more windows tests

Signed-off-by: Nate Koenig <[email protected]>

* Testing another windows fix

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: John Shepherd <[email protected]>

* Prepare for 3.5.0 release (#135)

* Prepare for 3.5.0 release

Signed-off-by: Nate Koenig <[email protected]>

* Update Changelog.md

Co-authored-by: Louise Poubel <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: Louise Poubel <[email protected]>

* Download model dependencies (#123)

Signed-off-by: John Shepherd <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Prepare for 4.3.0 release (#139)

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Set keep alive on (#141)

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Support editing/patching model files (#140)

* Support editing/patching model files

Signed-off-by: Nate Koenig <[email protected]>

* Added documentation

Signed-off-by: Nate Koenig <[email protected]>

* Set keep alive on

Signed-off-by: Nate Koenig <[email protected]>

* Documentation and tests

Signed-off-by: Nate Koenig <[email protected]>

* One more test and exit catch missing -u

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Prepare for 5.1.0 release (#145)

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Fix light map URI (#146)

Signed-off-by: Ian Chen <[email protected]>

* Bump to 5.1.1 (#147)

Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: John Shepherd <[email protected]>
Co-authored-by: Ian Chen <[email protected]>
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.

2 participants