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

feat: script qadb-info to dump some info about the QADB #68

Merged
merged 34 commits into from
Jan 17, 2025
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
479c68a
feat: script `qadb-info` to dump some info about the QADB
c-dilks Jan 13, 2025
5ce2391
feat: add some options
c-dilks Jan 13, 2025
9f59ab4
feat: more options for printing datasets
c-dilks Jan 13, 2025
674f3b9
feat: calculate full runs' charge
c-dilks Jan 13, 2025
9943ea5
fix(ci): wrong dir
c-dilks Jan 13, 2025
8320597
fix: avoid relying on environment var
c-dilks Jan 13, 2025
4cc2d51
fix: version detection
c-dilks Jan 14, 2025
4e40b3c
ci: add `bin/` to `PATH`
c-dilks Jan 14, 2025
2a39373
feat: `TTree` table output
c-dilks Jan 15, 2025
ccc83f1
refactor: generalize so we can add a `misc` command more easily
c-dilks Jan 15, 2025
ea6b124
fix: prepend `$PATH`
c-dilks Jan 15, 2025
4cc2308
fix: don't check for datasets when `Command == 'print'`
c-dilks Jan 15, 2025
9a5d081
fix(ci): use `environ.sh` file to set `PATH`
c-dilks Jan 15, 2025
be36e4a
feat: `misc` command
c-dilks Jan 16, 2025
36f11a6
fix(ci): renamed option
c-dilks Jan 16, 2025
dae2fe5
feat: QA filter logic
c-dilks Jan 16, 2025
d583a0d
fix: porcelain -> simple
c-dilks Jan 16, 2025
2fcdc1a
fix: version detection
c-dilks Jan 16, 2025
9f47d78
fix: nevermind, doesn't work
c-dilks Jan 16, 2025
8f6fb00
fix: `JSON#load_file` -> `#parse` for compatibility with ruby 2.75
c-dilks Jan 16, 2025
f1cd4ed
fix: handle conflicts with `--golden`
c-dilks Jan 16, 2025
e65c58e
style: use '`' in printouts
c-dilks Jan 16, 2025
b68b792
feat: start query command
c-dilks Jan 16, 2025
6dd8e53
feat: lookup bins
c-dilks Jan 16, 2025
7788aa8
fix: check bins existence
c-dilks Jan 16, 2025
09a7ff2
fix: finish implementing `query` command
c-dilks Jan 17, 2025
cbe1370
doc: `qadb-info` guidance
c-dilks Jan 17, 2025
d4212e4
feat: example commands
c-dilks Jan 17, 2025
ff57011
Merge remote-tracking branch 'origin/main' into ls-datasets
c-dilks Jan 17, 2025
e27c978
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 17, 2025
042860f
feat: descriptions for defects
c-dilks Jan 17, 2025
a21dd9e
doc: move the rules away from the how-to part
c-dilks Jan 17, 2025
c33ee07
doc: caution
c-dilks Jan 17, 2025
6c54168
doc: charge
c-dilks Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: version detection
c-dilks committed Jan 14, 2025
commit 4cc2d5197360ff8d80ae247b7f2bb7e5b4ec4c1d
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -25,12 +25,17 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
with: # settings needed for version number detection in qadb-info
clean: false
fetch-tags: true
fetch-depth: 0
- name: get data sets
id: datasets
run: |
bin/qadb-info print --list --no-latest --porcelain | jq -Rs '{"dataset": split("\n")[:-1]}' | tee datasets.json
echo datasets=$(jq -c . datasets.json) >> $GITHUB_OUTPUT
- name: run qadb-info
- run: qadb-info --version
- name: qadb-info summary
run: |
echo '```' >> $GITHUB_STEP_SUMMARY
bin/qadb-info print --verbose | xargs -0 -I{} echo {} >> $GITHUB_STEP_SUMMARY
13 changes: 8 additions & 5 deletions bin/qadb-info
Original file line number Diff line number Diff line change
@@ -8,9 +8,6 @@ require 'optparse'
TopDir = File.realpath(File.join __dir__, '..')
QaDir = File.realpath(File.join TopDir, 'qadb')
ExeName = File.basename __FILE__
ver = `cd #{TopDir} && git describe --tags --abbrev=0`
ver = 'UNKNOWN' unless $?.success?
Version = ver


##################################################################################
@@ -71,8 +68,14 @@ COMMANDS

MISC OPTIONS"""
o.on('-v', '--version', 'print the QADB version number') do
puts o.version()
exit
ver = `cd #{TopDir} && git describe --tags --abbrev=0`
if $?.success?
puts ver
exit
else
puts 'UNKNOWN'
exit 1
end
end
on_help o
end