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

docs: explain default generation config in README.md #3388

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

JoeWang1127
Copy link
Collaborator

No description provided.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Nov 20, 2024
@JoeWang1127 JoeWang1127 marked this pull request as ready for review November 20, 2024 14:27
@@ -25,13 +25,20 @@ for more information.

## Parameters to generate a repository using the docker image

### Generation configuration yaml (`generation-config-path`)
### Generation configuration yaml (`generation-config-path`), optional
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add a sentence before this section mentioning something like "All the parameters are optional, but a generation_config.yaml is required"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added this to Prerequisites.

hermetic_build/README.md Outdated Show resolved Hide resolved
hermetic_build/README.md Outdated Show resolved Hide resolved
hermetic_build/library_generation/cli/entry_point.py Outdated Show resolved Hide resolved
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Nov 20, 2024
Copy link

sonarcloud bot commented Nov 20, 2024

Copy link

sonarcloud bot commented Nov 20, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Please refer to [Generation configuration yaml](#generation-configuration-yaml--generation-config-path---optional)
for more information.

### versions.txt
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC, we would generate a versions.txt file if it does not exist. Can you confirm @diegomarquezp ?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, it is not generated. The scripts will just fail if not found.

def prepare_repo(
gen_config: GenerationConfig,
library_config: List[LibraryConfig],
repo_path: str,
language: str = "java",
) -> RepoConfig:
"""
Gather information of the generated repository.
:param gen_config: a GenerationConfig object representing a parsed
configuration yaml
:param library_config: a LibraryConfig object contained inside config,
passed here for convenience and to prevent all libraries to be processed
:param repo_path: the path to which the generated repository goes
:param language: programming language of the library
:return: a RepoConfig object contained repository information
:raise FileNotFoundError if there's no versions.txt in repo_path
:raise ValueError if two libraries have the same library_name
"""

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, thanks for the quick response!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The file is required, per

raise FileNotFoundError(f"{versions_file} is not found.")

Though I think we can create an empty file if not exist since we didn't check the contents.

I'll create a follow-up issue.

@JoeWang1127 JoeWang1127 merged commit 2ac86de into main Nov 20, 2024
49 of 55 checks passed
@JoeWang1127 JoeWang1127 deleted the docs/update-readme branch November 20, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants