From 696bf7b4a0f9d8df234dfbb29bf6e222bd4f6726 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Wed, 23 Dec 2020 09:31:04 -0800 Subject: [PATCH 1/7] Document IGN_FUEL_CACHE_PATH on command line (#149) Signed-off-by: Louise Poubel --- src/cmd/cmdfuel.rb.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cmd/cmdfuel.rb.in b/src/cmd/cmdfuel.rb.in index 20988b74..2e636006 100755 --- a/src/cmd/cmdfuel.rb.in +++ b/src/cmd/cmdfuel.rb.in @@ -57,7 +57,10 @@ COMMANDS = { 'fuel' => " -v [ --verbose ] [arg] Adjust the level of console output (0~4). \n"\ " The default verbosity is 1, use -v without \n"\ " arguments for level 3. \n" + - COMMON_OPTIONS + COMMON_OPTIONS + "\n\n" + + "Environment variables: \n"\ + " IGN_FUEL_CACHE_PATH Path to the cache where resources are \n"\ + " downloaded to. Defaults to $HOME/.ignition/fuel \n" } SUBCOMMANDS = { From 99e0bcbf9a3b57669fa4c2b76048c1085fdf0260 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 4 Jan 2021 15:37:09 -0800 Subject: [PATCH 2/7] Use semantic version and prevent crash if version is missing (#151) Also explicitly depend on ign-math6 Signed-off-by: Louise Poubel --- .github/ci/packages.apt | 1 + CMakeLists.txt | 5 +++++ src/LocalCache.cc | 18 ++++++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 1c14ce8f..7bf9b7e2 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -3,6 +3,7 @@ libcurl4-openssl-dev libgflags-dev libignition-cmake2-dev libignition-common3-dev +libignition-math6-dev libignition-msgs5-dev libignition-tools-dev libjsoncpp-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index 9aa0d857..cff58878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,11 @@ ign_find_package(ZIP REQUIRED PRIVATE) ign_find_package(ignition-common3 REQUIRED PRIVATE) set(IGN_COMMON_MAJOR_VER ${ignition-common3_VERSION_MAJOR}) +#-------------------------------------- +# Find ignition-math +ign_find_package(ignition-math6 REQUIRED PRIVATE) +set(IGN_MSGS_MAJOR_VER ${ignition-math6_VERSION_MAJOR}) + #-------------------------------------- # Find ignition-msgs ign_find_package(ignition-msgs5 REQUIRED PRIVATE) diff --git a/src/LocalCache.cc b/src/LocalCache.cc index 0b5f54d2..c0167192 100644 --- a/src/LocalCache.cc +++ b/src/LocalCache.cc @@ -32,6 +32,7 @@ #include #include #include +#include #include "ignition/fuel_tools/ClientConfig.hh" #include "ignition/fuel_tools/LocalCache.hh" @@ -459,11 +460,24 @@ bool LocalCachePrivate::FixPaths(const std::string &_modelVersionedDir, // Get the element with the highest (most recent) version. tinyxml2::XMLElement *sdfElementLatest = nullptr; - double maxVersion = 0.0; + math::SemanticVersion maxVersion{"0.0"}; tinyxml2::XMLElement *sdfElement = modelElement->FirstChildElement("sdf"); while (sdfElement) { - double version = std::stod(sdfElement->Attribute("version")); + math::SemanticVersion version; + + auto versionAttribute = sdfElement->Attribute("version"); + if (nullptr == versionAttribute) + { + version.Parse("0.0.1"); + ignwarn << " element missing version attribute, assuming version [" + << version << "]" << std::endl; + } + else + { + version.Parse(versionAttribute); + } + if (version > maxVersion) { maxVersion = version; From 77e395f484c257fad607ca008df3375012c052ca Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Wed, 20 Jan 2021 18:08:26 -0800 Subject: [PATCH 3/7] Add Windows Installation (#162) Signed-off-by: Mabel Zhang Signed-off-by: Nate Koenig Signed-off-by: John Shepherd Co-authored-by: Mabel Zhang Co-authored-by: Nate Koenig --- README.md | 12 +--- tutorials/01_installation.md | 135 ++++++++++++++++++++++++++--------- 2 files changed, 102 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 416f9ac9..0e4c637d 100644 --- a/README.md +++ b/README.md @@ -13,17 +13,9 @@ Test coverage reports are available at Codecov: # Building and installing -``` -cd ign-fuel-tools -mkdir build -cd build -cmake .. -make -make test -make install -``` +See [http://github.com/ignitionrobotics/ign-fuel-tools](http://github.com/ignitionrobotics/ign-fuel-tools/blob/ign-fuel-tools4/tutorials/01_installation.md). -Make sure `IGN_CONFIG_PATH` is set to the right install location`ign fuel` will work. +Make sure `IGN_CONFIG_PATH` is set to the right install location so that `ign fuel` will work. Default is `/usr/local/share/ignition`. ## Examples diff --git a/tutorials/01_installation.md b/tutorials/01_installation.md index 42075857..33661c9c 100644 --- a/tutorials/01_installation.md +++ b/tutorials/01_installation.md @@ -4,32 +4,30 @@ Next Tutorial: \ref configuration ## Overview -Instructions to install Ignition Fuel Tools on all the platforms -supported: major Linux distributions, Mac OS X and Windows. +Instructions to install Ignition Fuel Tools on all the platforms supported. -## Ubuntu Linux +## Binary Install + +### Ubuntu Linux Setup your computer to accept software from *packages.osrfoundation.org*: - -```{.sh} +``` sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' ``` Setup keys: - ``` wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - ``` Install Ignition Fuel Tools: - ``` sudo apt-get update sudo apt-get install libignition-fuel-tools4-dev ``` -## Mac OS X +### Mac OS X Ignition Fuel Tools and several of its dependencies can be compiled on OS X with [Homebrew](http://brew.sh/) using the [osrf/simulation @@ -42,23 +40,39 @@ Here are the instructions: Install homebrew, which should also prompt you to install the XCode command-line tools: - ``` ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` Run the following commands: - ``` brew tap osrf/simulation brew install ignition-fuel-tools4 ``` -## Windows +### Windows -At this moment, Windows instructions are not available. +Install [Conda package management system](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html). +Miniconda suffices. -## Install from sources (Ubuntu Linux) +Create if necessary, and activate a Conda environment: +``` +conda create -n ign-ws +conda activate ign-ws +``` + +Install: + +``` +conda install libignition-fuel-tools<#> --channel conda-forge +``` + +Be sure to replace `<#>` with a number value, such as 1 or 2, depending on +which version you need. + +## Source Install + +### Ubuntu Linux For compiling the latest version of Ignition Fuel Tools you will need an Ubuntu distribution equal to 16.04 (Xenial) or newer. @@ -93,23 +107,20 @@ cd build Configure Ignition Fuel Tools (choose either method a or b below): * A. Release mode: This will generate optimized code, but will not have debug symbols. Use this mode if you don't need to use GDB. + ``` + cmake ../ + ``` - ``` - cmake ../ - ``` - - Note: You can use a custom install path to make it easier to switch - between source and debian installs: - - ``` - cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../ - ``` + Note: You can use a custom install path to make it easier to switch + between source and debian installs: + ``` + cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../ + ``` * B. Debug mode: This will generate code with debug symbols. Ignition Fuel Tools will run slower, but you'll be able to use GDB. - - ``` - cmake -DCMAKE_BUILD_TYPE=Debug ../ - ``` + ``` + cmake -DCMAKE_BUILD_TYPE=Debug ../ + ``` The output from `cmake ../` may generate a number of errors and warnings about missing packages. You must install the missing packages that have @@ -119,38 +130,92 @@ in which you installed prerequisites). Make note of your install path, which is output from cmake and should look something like: - ``` -- Install prefix: /home/$USER/local ``` Build Ignition Fuel Tools: - ``` make -j4 ``` Install Ignition Fuel Tools: - ``` sudo make install ``` If you decide to install the library in a local directory you'll need to modify your `LD_LIBRARY_PATH`: - ``` echo "export LD_LIBRARY_PATH=/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc ``` -### Uninstalling Source-based Install +#### Uninstalling Source Install If you need to uninstall Ignition Fuel Tools or switch back to a debian-based install when you currently have installed the library from source, navigate to your source code directory's build folders and run `make uninstall`: - -\code +``` cd /tmp/ign-fuel-tools/build sudo make uninstall -\endcode +``` + +### Windows + +#### Prerequisites + +First, follow the [ign-cmake](https://github.com/ignitionrobotics/ign-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment. + +Navigate to ``condabin`` if necessary to use the ``conda`` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of ``condabin`` in Anaconda Prompt, ``where conda``). + +Create if necessary, and activate a Conda environment: +``` +conda create -n ign-ws +conda activate ign-ws +``` + +Install dependencies: +``` +conda install jsoncpp libzip --channel conda-forge +``` + +Install Ignition dependencies: + +You can view available versions and their dependencies: +``` +conda search libignition-fuel-tools* --channel conda-forge --info +``` + +Install Ignition dependencies, replacing `<#>` with the desired versions: +``` +conda install libignition-cmake<#> libignition-common<#> libignition-msgs<#> libignition-tools<#> --channel conda-forge +``` + +#### Building from source + +1. Activate the Conda environment created in the prerequisites: + ``` + conda activate ign-ws + ``` + +2. Navigate to where you would like to build the library, and clone the repository. + ``` + # Optionally, append `-b ign-fuel-tools#` (replace # with a number) to check out a specific version + git clone https://github.com/ignitionrobotics/ign-fuel-tools.git + ``` + +3. Configure and build + ``` + cd ign-fuel-tools + mkdir build + cd build + cmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install + cmake --build . --config Release + ``` + +4. Optionally, install. You wil likely need to run a terminal with admin privileges for this call to succeed. + ``` + cmake --install . --config Release + ``` + From cdbe4d11bf9347c61c7a405bd802964fd85bb6c1 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 25 Jan 2021 09:55:21 -0800 Subject: [PATCH 4/7] Fix Windows CI: fuel-tools5 use msgs6 (#164) Signed-off-by: Louise Poubel Co-authored-by: Jose Luis Rivero --- bitbucket-pipelines.yml | 2 +- configure.bat | 2 +- tutorials/01_installation.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index d46b6519..10312f17 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -18,7 +18,7 @@ pipelines: libignition-cmake2-dev libignition-common3-dev libignition-math6-dev - # libignition-msgs5-dev + libignition-msgs6-dev # Ignition tools - git clone http://github.com/ignitionrobotics/ign-tools -b master - cd ign-tools diff --git a/configure.bat b/configure.bat index 48717d38..2d3c425a 100644 --- a/configure.bat +++ b/configure.bat @@ -11,7 +11,7 @@ call %win_lib% :download_unzip_install libzip-1.4.0_zlip-1.2.11_vc15-x64-dll-MD. call %win_lib% :install_ign_project ign-cmake ign-cmake2 call %win_lib% :install_ign_project ign-tools ign-tools1 call %win_lib% :install_ign_project ign-common ign-common3 -call %win_lib% :install_ign_project ign-msgs master +call %win_lib% :install_ign_project ign-msgs ign-msgs6 :: Set configuration variables @set build_type=Release diff --git a/tutorials/01_installation.md b/tutorials/01_installation.md index 3f114fca..5bd83f0c 100644 --- a/tutorials/01_installation.md +++ b/tutorials/01_installation.md @@ -73,7 +73,7 @@ sudo apt-get remove libignition-fuel-tools5-dev Install prerequisites. A clean Ubuntu system will need: ``` -sudo apt-get install git cmake pkg-config python ruby-ronn libignition-cmake2-dev libignition-common3-dev libignition-msgs5-dev libignition-tools-dev libzip-dev libjsoncpp-dev libcurl4-openssl-dev libyaml-dev +sudo apt-get install git cmake pkg-config python ruby-ronn libignition-cmake2-dev libignition-common3-dev libignition-msgs6-dev libignition-tools-dev libzip-dev libjsoncpp-dev libcurl4-openssl-dev libyaml-dev ``` Clone the repository into a directory and go into it: From 3ae430f833daefdf936d35f33973557e63a12838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Tue, 26 Jan 2021 07:48:31 +0100 Subject: [PATCH 5/7] Included private-token to config.yaml (#156) * Included private-token to config.yaml Signed-off-by: ahcorde * make linters happy Signed-off-by: ahcorde * Added feedback Signed-off-by: ahcorde * Added documentation Signed-off-by: ahcorde * Added feedback Signed-off-by: ahcorde * make linters happy Signed-off-by: ahcorde --- include/ignition/fuel_tools/ClientConfig.hh | 4 ++ include/ignition/fuel_tools/FuelClient.hh | 7 +++ src/ClientConfig.cc | 30 ++++++++++- src/FuelClient.cc | 57 ++++++++++++++++++--- tutorials/02_configuration.md | 2 + tutorials/03_command_line.md | 18 +++++++ 6 files changed, 110 insertions(+), 8 deletions(-) diff --git a/include/ignition/fuel_tools/ClientConfig.hh b/include/ignition/fuel_tools/ClientConfig.hh index 8f088385..b6522285 100644 --- a/include/ignition/fuel_tools/ClientConfig.hh +++ b/include/ignition/fuel_tools/ClientConfig.hh @@ -151,6 +151,10 @@ namespace ignition /// \return The list of servers. public: std::vector Servers() const; + /// \brief List of servers the client will connect to. + /// \return The list of servers. + public: std::vector & MutableServers() const; + /// \brief Add a server to the list. /// \param[in] _srv The server config. public: void AddServer(const ServerConfig &_srv); diff --git a/include/ignition/fuel_tools/FuelClient.hh b/include/ignition/fuel_tools/FuelClient.hh index 4a007140..f2d958c3 100644 --- a/include/ignition/fuel_tools/FuelClient.hh +++ b/include/ignition/fuel_tools/FuelClient.hh @@ -377,6 +377,13 @@ namespace ignition public: bool ParseCollectionUrl(const common::URI &_url, CollectionIdentifier &_id); + /// \brief Checked if there is any header already specify + /// \param[in] _serverConfig Server configuration + /// \param[inout] _headers Vector with headers to check + private: void AddServerConfigParametersToHeaders( + const ignition::fuel_tools::ServerConfig &_serverConfig, + std::vector &_headers) const; + /// \brief PIMPL private: std::unique_ptr dataPtr; }; diff --git a/src/ClientConfig.cc b/src/ClientConfig.cc index 28f7f7e6..f96d7de3 100644 --- a/src/ClientConfig.cc +++ b/src/ClientConfig.cc @@ -278,6 +278,7 @@ bool ClientConfig::LoadConfig(const std::string &_file) tokens.push("root"); std::string serverURL = ""; std::string cacheLocationConfig = ""; + std::string privateToken = ""; do { @@ -325,12 +326,18 @@ bool ClientConfig::LoadConfig(const std::string &_file) { // Sanity check: Make sure that the server is not already stored. bool repeated = false; - for (auto const savedServer : this->Servers()) + for (auto & savedServer : this->MutableServers()) { if (savedServer.Url().Str() == serverURL) { + if (!privateToken.empty()) + { + ignmsg << "Set private token for " << serverURL << " server." + << std::endl; + savedServer.SetApiKey(privateToken); + } ignwarn << "URL [" << serverURL << "] already exists. " - << "Ignoring server" << std::endl; + << "Ignoring server" << std::endl; repeated = true; break; } @@ -340,6 +347,12 @@ bool ClientConfig::LoadConfig(const std::string &_file) // Add the new server. ServerConfig newServer; newServer.SetUrl(common::URI(serverURL)); + if (!privateToken.empty()) + { + ignmsg << "Set private token for " << serverURL << " server." + << std::endl; + newServer.SetApiKey(privateToken); + } this->AddServer(newServer); } } @@ -372,6 +385,13 @@ bool ClientConfig::LoadConfig(const std::string &_file) cacheLocationConfig = path; tokens.pop(); } + else if (!tokens.empty() && tokens.top() == "private-token") + { + std::string token( + reinterpret_cast(event.data.scalar.value)); + privateToken = token; + tokens.pop(); + } else { std::string key( @@ -431,6 +451,12 @@ std::vector ClientConfig::Servers() const return this->dataPtr->servers; } +////////////////////////////////////////////////// +std::vector & ClientConfig::MutableServers() const +{ + return this->dataPtr->servers; +} + ////////////////////////////////////////////////// void ClientConfig::AddServer(const ServerConfig &_srv) { diff --git a/src/FuelClient.cc b/src/FuelClient.cc index 4797cd6c..ae7037a5 100644 --- a/src/FuelClient.cc +++ b/src/FuelClient.cc @@ -277,8 +277,11 @@ Result FuelClient::ModelDetails(const ModelIdentifier &_id, common::URIPath path; path = path / _id.Owner() / "models" / _id.Name(); + std::vector headersIncludingServerConfig = _headers; + AddServerConfigParametersToHeaders( + _id.Server(), headersIncludingServerConfig); resp = rest.Request(HttpMethod::GET, serverUrl, version, - path.Str(), {}, _headers, ""); + path.Str(), {}, headersIncludingServerConfig, ""); if (resp.statusCode != 200) return Result(ResultType::FETCH_ERROR); @@ -439,9 +442,13 @@ Result FuelClient::UploadModel(const std::string &_pathToModelDir, if (!this->dataPtr->FillModelForm(_pathToModelDir, _id, _private, form)) return Result(ResultType::UPLOAD_ERROR); + std::vector headersIncludingServerConfig = _headers; + AddServerConfigParametersToHeaders( + _id.Server(), headersIncludingServerConfig); // Send the request. resp = rest.Request(HttpMethod::POST_FORM, _id.Server().Url().Str(), - _id.Server().Version(), "models", {}, _headers, "", form); + _id.Server().Version(), "models", {}, + headersIncludingServerConfig, "", form); if (resp.statusCode != 200) { @@ -464,6 +471,27 @@ Result FuelClient::DeleteModel(const ModelIdentifier &) return Result(ResultType::DELETE_ERROR); } +void FuelClient::AddServerConfigParametersToHeaders( + const ignition::fuel_tools::ServerConfig &_serverConfig, + std::vector &_headers) const +{ + bool privateTokenDefined = false; + for (auto header : _headers) + { + if (header.find("Private-token:") != std::string::npos) + { + privateTokenDefined = true; + } + } + if (!privateTokenDefined) + { + if (!_serverConfig.ApiKey().empty()) + { + _headers.push_back("Private-token: " + _serverConfig.ApiKey()); + } + } +} + ////////////////////////////////////////////////// Result FuelClient::DeleteUrl(const ignition::common::URI &_uri, const std::vector &_headers) @@ -479,6 +507,7 @@ Result FuelClient::DeleteUrl(const ignition::common::URI &_uri, ModelIdentifier modelId; WorldIdentifier worldId; + std::vector headersIncludingServerConfig = _headers; if (this->ParseModelUrl(_uri, modelId)) { type = "model"; @@ -486,6 +515,8 @@ Result FuelClient::DeleteUrl(const ignition::common::URI &_uri, server = modelId.Server().Url().Str(); version = modelId.Server().Version(); path = path / modelId.Owner() / "models" / modelId.Name(); + AddServerConfigParametersToHeaders( + modelId.Server(), headersIncludingServerConfig); } else if (this->ParseWorldUrl(_uri, worldId)) { @@ -494,6 +525,8 @@ Result FuelClient::DeleteUrl(const ignition::common::URI &_uri, server = worldId.Server().Url().Str(); version = worldId.Server().Version(); path = path / worldId.Owner() / "worlds" / worldId.Name(); + AddServerConfigParametersToHeaders( + worldId.Server(), headersIncludingServerConfig); } else { @@ -503,7 +536,7 @@ Result FuelClient::DeleteUrl(const ignition::common::URI &_uri, // Send the request. resp = rest.Request(HttpMethod::DELETE, server, version, path.Str(), {}, - _headers, "", {}); + headersIncludingServerConfig, "", {}); if (resp.statusCode != 200) { @@ -547,11 +580,15 @@ Result FuelClient::DownloadModel(const ModelIdentifier &_id, ignmsg << "Downloading model [" << _id.UniqueName() << "]" << std::endl; + std::vector headersIncludingServerConfig = _headers; + AddServerConfigParametersToHeaders( + _id.Server(), headersIncludingServerConfig); // Request ignition::fuel_tools::Rest rest; RestResponse resp; resp = rest.Request(HttpMethod::GET, _id.Server().Url().Str(), - _id.Server().Version(), route.Str(), {}, _headers, ""); + _id.Server().Version(), route.Str(), {}, + headersIncludingServerConfig, ""); if (resp.statusCode != 200) { ignerr << "Failed to download model." << std::endl @@ -659,11 +696,16 @@ Result FuelClient::DownloadWorld(WorldIdentifier &_id) ignmsg << "Downloading world [" << _id.UniqueName() << "]" << std::endl; + std::vector headersIncludingServerConfig; + AddServerConfigParametersToHeaders( + _id.Server(), headersIncludingServerConfig); + // Request ignition::fuel_tools::Rest rest; RestResponse resp; resp = rest.Request(HttpMethod::GET, _id.Server().Url().Str(), - _id.Server().Version(), route.Str(), {}, {}, ""); + _id.Server().Version(), route.Str(), {}, + headersIncludingServerConfig, ""); if (resp.statusCode != 200) { ignerr << "Failed to download world." << std::endl @@ -1265,8 +1307,11 @@ Result FuelClient::PatchModel( form.emplace("private", _model.Private() ? "1" : "0"); } + std::vector headersIncludingServerConfig = _headers; + AddServerConfigParametersToHeaders( + _model.Server(), headersIncludingServerConfig); resp = rest.Request(HttpMethod::PATCH_FORM, serverUrl, version, - path.Str(), {}, _headers, "", form); + path.Str(), {}, headersIncludingServerConfig, "", form); if (resp.statusCode != 200) return Result(ResultType::PATCH_ERROR); diff --git a/tutorials/02_configuration.md b/tutorials/02_configuration.md index c4ce904d..1ffc9bba 100644 --- a/tutorials/02_configuration.md +++ b/tutorials/02_configuration.md @@ -16,6 +16,7 @@ Ignition Fuel Tools accepts a YAML file with the following syntax: servers: - url: https://fuel.ignitionrobotics.org + private-token: # - # url: https://myserver @@ -27,6 +28,7 @@ servers: The `servers` section specifies all Fuel servers to interact with. For each server, you must specify the URL to send the HTTP requests. +If the server requires auth you can specify the token filling the optional field `private-token`. The `cache` section captures options related with the local storage of the assets. `path` specifies the local directory where all assets will be diff --git a/tutorials/03_command_line.md b/tutorials/03_command_line.md index b78321a3..4e938d73 100644 --- a/tutorials/03_command_line.md +++ b/tutorials/03_command_line.md @@ -88,6 +88,24 @@ Downloading world: Download succeeded. ``` +If the model is privated you can create a config file with your token. For example, create a file +`/tmp/my_config.yaml` with the following content and edit your token: + +```yaml +--- +# The list of servers. +servers: + - + url: https://fuel.ignitionrobotics.org + private-token: +``` + +Then try to download the model: + +```bash +ign fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty -c /tmp/my_config.yaml +``` + Worlds downloaded with the tool get conveniently organized into the same directory, which we call the "local cache". The path is broken down as follows: From 4a1fa538f259fd12bd966bc866d3f11e28bb21f5 Mon Sep 17 00:00:00 2001 From: Jenn Nguyen Date: Thu, 4 Feb 2021 18:52:30 -0800 Subject: [PATCH 6/7] added issue & PR templates (#165) Signed-off-by: Jenn Nguyen --- .github/ISSUE_TEMPLATE/bug_report.md | 29 +++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 23 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 52 +++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE/port.md | 6 +++ 4 files changed, 110 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/port.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..3d89f641 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Report a bug +labels: bug +--- + + + +## Environment +* OS Version: +* Source or binary build? + + + +## Description +* Expected behavior: +* Actual behavior: + +## Steps to reproduce + + +1. +2. +3. + +## Output + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..f49727a0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Request a new feature +labels: enhancement +--- + + + +## Desired behavior + + +## Alternatives considered + + +## Implementation suggestion + + +## Additional context + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..6c88bd54 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,52 @@ + + +# Bug Report + +Fixes issue # + +## Summary + + +## Checklist +- [ ] Signed all commits for DCO +- [ ] Added tests +- [ ] Updated documentation (as needed) +- [ ] Updated migration guide (as needed) +- [ ] `codecheck` passed (See + [contributing](https://ignitionrobotics.org/docs/all/contributing#contributing-code)) +- [ ] All tests passed (See + [test coverage](https://ignitionrobotics.org/docs/all/contributing#test-coverage)) +- [ ] While waiting for a review on your PR, please help review +[another open pull request](https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3Aignitionrobotics+archived%3Afalse+) +to support the maintainers + +**Note to maintainers**: Remember to use **Squash-Merge** + +--- + +# New feature + +Closes # + +## Summary + + +## Test it + + +## Checklist +- [ ] Signed all commits for DCO +- [ ] Added tests +- [ ] Added example world and/or tutorial +- [ ] Updated documentation (as needed) +- [ ] Updated migration guide (as needed) +- [ ] `codecheck` passed (See [contributing](https://ignitionrobotics.org/docs/all/contributing#contributing-code)) +- [ ] All tests passed (See [test coverage](https://ignitionrobotics.org/docs/all/contributing#test-coverage)) +- [ ] While waiting for a review on your PR, please help review +[another open pull request](https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3Aignitionrobotics+archived%3Afalse+) +to support the maintainers + +**Note to maintainers**: Remember to use **Squash-Merge** diff --git a/.github/PULL_REQUEST_TEMPLATE/port.md b/.github/PULL_REQUEST_TEMPLATE/port.md new file mode 100644 index 00000000..37f04eef --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/port.md @@ -0,0 +1,6 @@ +Port to + +Branch comparison: https://github.com/ignitionrobotics/ign-fuel-tools/compare/... + +**Note to maintainers**: Remember to **Merge** with commit (not squash-merge +or rebase) From 47fe8ab57fd13397642ee0c780ac3c59aba41494 Mon Sep 17 00:00:00 2001 From: Jenn Nguyen Date: Tue, 16 Feb 2021 14:31:53 -0800 Subject: [PATCH 7/7] Remove issue & PR templates (#167) Signed-off-by: Jenn Nguyen --- .github/ISSUE_TEMPLATE/bug_report.md | 29 ------------- .github/ISSUE_TEMPLATE/feature_request.md | 23 ---------- .github/PULL_REQUEST_TEMPLATE.md | 52 ----------------------- .github/PULL_REQUEST_TEMPLATE/port.md | 6 --- 4 files changed, 110 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/port.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 3d89f641..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Bug report -about: Report a bug -labels: bug ---- - - - -## Environment -* OS Version: -* Source or binary build? - - - -## Description -* Expected behavior: -* Actual behavior: - -## Steps to reproduce - - -1. -2. -3. - -## Output - diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index f49727a0..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Feature request -about: Request a new feature -labels: enhancement ---- - - - -## Desired behavior - - -## Alternatives considered - - -## Implementation suggestion - - -## Additional context - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6c88bd54..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# Bug Report - -Fixes issue # - -## Summary - - -## Checklist -- [ ] Signed all commits for DCO -- [ ] Added tests -- [ ] Updated documentation (as needed) -- [ ] Updated migration guide (as needed) -- [ ] `codecheck` passed (See - [contributing](https://ignitionrobotics.org/docs/all/contributing#contributing-code)) -- [ ] All tests passed (See - [test coverage](https://ignitionrobotics.org/docs/all/contributing#test-coverage)) -- [ ] While waiting for a review on your PR, please help review -[another open pull request](https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3Aignitionrobotics+archived%3Afalse+) -to support the maintainers - -**Note to maintainers**: Remember to use **Squash-Merge** - ---- - -# New feature - -Closes # - -## Summary - - -## Test it - - -## Checklist -- [ ] Signed all commits for DCO -- [ ] Added tests -- [ ] Added example world and/or tutorial -- [ ] Updated documentation (as needed) -- [ ] Updated migration guide (as needed) -- [ ] `codecheck` passed (See [contributing](https://ignitionrobotics.org/docs/all/contributing#contributing-code)) -- [ ] All tests passed (See [test coverage](https://ignitionrobotics.org/docs/all/contributing#test-coverage)) -- [ ] While waiting for a review on your PR, please help review -[another open pull request](https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3Aignitionrobotics+archived%3Afalse+) -to support the maintainers - -**Note to maintainers**: Remember to use **Squash-Merge** diff --git a/.github/PULL_REQUEST_TEMPLATE/port.md b/.github/PULL_REQUEST_TEMPLATE/port.md deleted file mode 100644 index 37f04eef..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/port.md +++ /dev/null @@ -1,6 +0,0 @@ -Port to - -Branch comparison: https://github.com/ignitionrobotics/ign-fuel-tools/compare/... - -**Note to maintainers**: Remember to **Merge** with commit (not squash-merge -or rebase)