Skip to content

Conversation

@winder
Copy link
Contributor

@winder winder commented Jun 8, 2023

Summary

The importer/exporter sample files required proper padding, while the processor samples were required to be un-padded.
With this change all sample files may be un-padded. Any accidental padding will still work, and only causes the config file to look strange rather than resulting in a broken file.

With these changes we also consistently pad with 4 spaces. Before there was a mixture of 2/4 space indents.

Test Plan

Manual testing.

@winder winder requested review from Eric-Warehime and shiqizng June 8, 2023 14:12
@winder winder changed the title better padding with init command sample files. Better padding with init command sample files. Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #94 (c550bf3) into master (442791a) will increase coverage by 1.69%.
The diff coverage is 74.27%.

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
+ Coverage   67.66%   69.35%   +1.69%     
==========================================
  Files          32       36       +4     
  Lines        1976     2431     +455     
==========================================
+ Hits         1337     1686     +349     
- Misses        570      653      +83     
- Partials       69       92      +23     
Impacted Files Coverage Δ
conduit/data/block_export_data.go 100.00% <ø> (+92.30%) ⬆️
conduit/plugins/importers/algod/metrics.go 100.00% <ø> (ø)
...plugins/processors/filterprocessor/gen/generate.go 34.28% <ø> (ø)
pkg/cli/internal/list/list.go 20.75% <ø> (ø)
...lugins/exporters/postgresql/postgresql_exporter.go 66.66% <51.21%> (-11.54%) ⬇️
pkg/cli/cli.go 65.97% <65.97%> (ø)
conduit/pipeline/pipeline.go 66.26% <71.12%> (+0.80%) ⬆️
conduit/data/config.go 76.47% <76.47%> (ø)
conduit/plugins/importers/algod/algod_importer.go 88.34% <87.06%> (+0.03%) ⬆️
conduit/pipeline/errors.go 100.00% <100.00%> (ø)
... and 4 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more


func formatArrayObject(obj string) string {

func formatObject(obj string, isArray bool) string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main changes is to use this function for each type of configuration. Once that was done, I updated each of the sample files to use consistent padding.

@winder winder merged commit 93bd79c into algorand:master Jun 9, 2023
@winder winder deleted the will/init-padding branch June 9, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants