Skip to content

Merge main#9

Merged
attogram merged 7 commits intotest-fixes-0081333from
main
Sep 2, 2025
Merged

Merge main#9
attogram merged 7 commits intotest-fixes-0081333from
main

Conversation

@attogram
Copy link
Copy Markdown
Owner

@attogram attogram commented Sep 2, 2025

Description

Related Issue

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the style guidelines of this project.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests passed.

google-labs-jules Bot and others added 7 commits September 1, 2025 19:12
This commit introduces a new `tsv` (Tab-Separated Values) output format to the dashboard. This format is designed to be easily parseable and suitable for historical data analysis.

The new format has the following structure:
Date<tab>module<tab>name<tab>value

Changes include:
- Added `tsv` to the list of valid formats in `dashboard.sh` and implemented the output handling.
- Updated all existing modules (`crypto.sh`, `discord.sh`, `github-sponsors.sh`, `github.sh`, `hackernews.sh`) to generate data in the new `tsv` format.
- Improved the consistency and portability of the module scripts by using `printf` instead of `echo -e`.
- Fixed a number of failing tests by creating a stable `config.sh` for the test environment.

Known issue:
- The 'discord module with no server id' test is currently failing. This is believed to be an issue with the test script's environment and not a regression in the module's functionality. This will be addressed in a future commit.
This commit introduces a new `tsv` (Tab-Separated Values) output format to the dashboard. This format is designed to be easily parseable and suitable for historical data analysis.

The new format has the following structure:
Date<tab>module<tab>name<tab>value

Changes include:
- Added `tsv` to the list of valid formats in `dashboard.sh` and implemented the output handling.
- Updated all existing modules (`crypto.sh`, `discord.sh`, `github-sponsors.sh`, `github.sh`, `hackernews.sh`) to generate data in the new `tsv` format.
- Improved the consistency and portability of the module scripts by using `printf` instead of `echo -e`.

State of the tests:
- The test suite is currently in a broken state. The tests are failing due to issues with the test environment setup, specifically with the creation of the `config.sh` file for each test run.
- I have made several attempts to fix the test suite, but these attempts have been hampered by what appears to be a broken tool environment.
- I have fixed the `test/dashboard.bats` file to use a more robust setup, but I have been unable to apply similar fixes to the other test files due to tool failures.
- As per the instruction to "Make pr 1st. Then try to fix in new commit", I am submitting the feature implementation now. The test suite will need to be fixed in a subsequent commit.
This commit introduces a new `tsv` (Tab-Separated Values) output format to the dashboard and stabilizes the test suite.

The new `tsv` format is designed to be easily parseable and suitable for historical data analysis, with the following structure:
Date<tab>module<tab>name<tab>value

Feature changes:
- Added `tsv` to the list of valid formats in `dashboard.sh`.
- Updated all modules to generate data in the new `tsv` format.
- Used `printf` for creating TSV output for better portability.

Test suite fixes:
- Refactored the test suite to be more robust and reliable.
- Replaced flaky `sed -i` commands in test setup with a `cat` heredoc to create a clean `config.sh` for each test run.
- Added `teardown` functions to test files to ensure test isolation.

All tests now pass.
@attogram attogram merged commit bcad7b7 into test-fixes-0081333 Sep 2, 2025
4 checks passed
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.

1 participant