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

validating config files description #72

Closed
kjsato opened this issue Nov 9, 2023 · 7 comments
Closed

validating config files description #72

kjsato opened this issue Nov 9, 2023 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@kjsato
Copy link
Contributor

kjsato commented Nov 9, 2023

In the description of "Validating your config files", we might understand the two config files were validated with one command but actually only one file "tasks.json" had been validated. If it is true, the description should be modified according to the actual behaviour so far.

@mzorn-58
Copy link
Contributor

@lshandross @LucieContamin @annakrystalli @elray1

Does the following code validate both "tasks.json" and "admin.json" or just "tasks.json"?

library(hubUtils)
validate_config(
    hub_path = ".",
    config = c("tasks", "admin"), 
    config_path = NULL, 
    schema_version = "from_config", 
    branch = "main"
)

@lshandross
Copy link

Hi @mzorn-58 the documentation for validate_config here seems to suggest that the config argument can only accept a single character string. I'm guessing that if a vector of character strings is provided instead that only the first is used. We should definitely ensure the general hubverse documentation makes this clear and potentially throw an error as well if a character vector is provided instead of a character string.

@LucieContamin
Copy link
Contributor

Hi all,

To add more information:

  • @lshandross is correct, the validate_config() validates only one config file, if you provide both in the config parameter, only the first one will be tested.
  • the function validate_hub_config() validates all the config files

@mzorn-58
Copy link
Contributor

mzorn-58 commented Apr 1, 2024

SO we should change config=c("tasks","admin") to read config = "tasks". And then we could add a note below saying that you you would use validate_hub_config() and config=c("tasks","admin") to validate all config files.

@annakrystalli
Copy link
Contributor

annakrystalli commented Apr 2, 2024

Hi @mzorn-58 validate_hub_config() takes no arguments, it just validates all hub config files in one go.

Also both these functions now live in the hubAdmin package. See function documentation pages for more details including examples of how both functions are used:

@micokoch micokoch added the documentation Improvements or additions to documentation label Jun 5, 2024
@micokoch micokoch self-assigned this Jun 5, 2024
@mzorn-58
Copy link
Contributor

mzorn-58 commented Jun 5, 2024

@micokoch Is it OK if I work on this Alvaro? I am looking for an issue and I had done some work on this previously.

@micokoch
Copy link
Contributor

micokoch commented Jun 6, 2024

Yes, @mzorn-58 - thank you.

@micokoch micokoch assigned mzorn-58 and unassigned micokoch Jun 6, 2024
mzorn-58 added a commit that referenced this issue Jun 6, 2024
mzorn-58 added a commit that referenced this issue Jun 6, 2024
mzorn-58 added a commit that referenced this issue Jun 6, 2024
@mzorn-58 mzorn-58 closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Development

No branches or pull requests

6 participants