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

chore: refactor the generator implementation #2171

Conversation

laststylebender14
Copy link
Contributor

@laststylebender14 laststylebender14 commented Jun 11, 2024

Summary:

  • refactored generalised config generation code.

Issue Reference(s):
Fixes #... (Replace "..." with the issue number)

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

…ted configs.

fix: moved name generators to top.
- use resolved_src for reading file or remote resource but for linking use src.
@laststylebender14 laststylebender14 marked this pull request as draft June 11, 2024 18:49
@github-actions github-actions bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Jun 11, 2024
@github-actions github-actions bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Jun 17, 2024
operation_name: Option<String>,
proto_samples: Option<Vec<ProtoInput>>,
json_samples: Option<Vec<JsonInput>>,
config_samples: Option<Vec<ConfigInput>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Config is not a sample. Rename the field.

Copy link
Contributor

Choose a reason for hiding this comment

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

Create a Vec<Input> where Input is an Enum. Keep proto, json, config all as inputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

reader: ResourceReader<Cached>,
proto_reader: ProtoReader,
operation_name: Option<String>,
inputs: Option<Vec<Input>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Option isn't required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed optional.

@tusharmath tusharmath merged commit 9489120 into feat/generalized-config-gen Jun 17, 2024
6 checks passed
@tusharmath tusharmath deleted the chore/refactor-the-generator-implementation branch June 17, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: benchmark Runs benchmarks type: chore Routine tasks like conversions, reorganization, and maintenance work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants