Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
890ed94
rename the stage "compressor" to "compression"
niquerio Dec 5, 2025
2a10649
rename compressor file to compression
niquerio Dec 5, 2025
e474832
start moving compression logic to compressor class
niquerio Dec 5, 2025
530de8e
WIP extracted Log to its own class
niquerio Dec 5, 2025
c304af9
WIP refactor
niquerio Dec 10, 2025
be52df1
test Compressor instead of Compression
antmoth Dec 10, 2025
6438dd3
copy fixtures to spec dir
antmoth Dec 10, 2025
0085d5d
add rspec-temp_dir and ostruct to gems
antmoth Dec 10, 2025
22877cb
WIP start testing Compressor
antmoth Dec 10, 2025
06b722f
test remove_tiff_alpha in ImageMagick module
niquerio Dec 15, 2025
bd2e1ca
properly test Compressor removing alpha when exists
antmoth Dec 16, 2025
26867b8
WIP warnings and errors are their own class
niquerio Dec 16, 2025
8e40048
add icc profile test; refactor tests
antmoth Dec 17, 2025
6c725a1
test that log_it handles warnings (via Compressor)
antmoth Dec 19, 2025
70e3a3d
split Log into its own file (with Exceptions too)
antmoth Dec 19, 2025
c3323b5
fix standardrb errors
antmoth Jan 6, 2026
9f61d68
factor out LogEntry with log levels etc
antmoth Jan 7, 2026
80d3878
have Compressor call Kakadu
antmoth Jan 7, 2026
bf84160
comment out in Compression those things being done in Compressor
antmoth Jan 7, 2026
099752d
remove rubocop remnants
antmoth Jan 7, 2026
cba5990
add jp2 metadata in Compressor
antmoth Jan 8, 2026
e0e893e
add copy-alphaless-metadata to Compressor
antmoth Jan 8, 2026
d0d41f2
moves comments to compressor; Replace Temp with Query
niquerio Jan 8, 2026
e76c49e
removes unused methods
niquerio Jan 8, 2026
7efe060
enable Color and Bitonal compressors
niquerio Jan 8, 2026
57d929b
moves tiff compression and copy tiff metadata to compressor
niquerio Jan 8, 2026
7315709
log_it convenience method in Compressor
niquerio Jan 8, 2026
d1e8a3e
dockerfile change to bookworm
niquerio Jan 12, 2026
c522deb
handles a 2 page bitonal tiff
niquerio Jan 12, 2026
819415b
handles date and document name for bitonal tif
niquerio Jan 12, 2026
c7bec4f
remove orphan code
niquerio Jan 12, 2026
6654764
move kakadu constants to kakadu module
niquerio Jan 13, 2026
df2517b
Bitonal handles adding software tiff tag
niquerio Jan 13, 2026
a815674
standardize on output_path
niquerio Jan 13, 2026
dd1f42c
bitonal copies output image to on disk temp dir
niquerio Jan 13, 2026
9517662
compression stage does not have conditionals
niquerio Jan 13, 2026
5fc22fe
remove problem line
niquerio Jan 13, 2026
4fe77d0
typo
antmoth Jan 15, 2026
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@
/coverage
/config/*.local.yml
/vendor

/test/shipments/*
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# BASE
################################################################################
FROM ruby:3.4-bullseye AS base
FROM ruby:3.4-bookworm AS base
ARG KAKADU_FILE=KDU841_Demo_Apps_for_Linux-x86-64_231117.zip
ARG FEED_VERSION=feed_v1.14.1

Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ gem "byebug"
gem "dotenv"
gem "minitest"
gem "luhn-ruby"
gem "ostruct"
gem "rake"
gem "simplecov"
gem "standardrb"
gem "rubycritic"
gem "rspec"
gem "rspec-temp_dir"

# This is to deal with warning in /usr/local/lib/ruby/3.4.0/readline.rb:4:
# with the 3.4.5 ruby image. We should be able to take this out when we
Expand Down
28 changes: 28 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ GEM
concurrent-ruby (1.3.5)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.6.2)
docile (1.4.1)
dotenv (3.2.0)
dry-configurable (1.3.0)
Expand Down Expand Up @@ -70,6 +71,7 @@ GEM
logger (1.7.0)
luhn-ruby (1.0.0)
minitest (5.26.2)
ostruct (0.6.1)
parallel (1.27.0)
parser (3.3.10.0)
ast (~> 2.4.1)
Expand All @@ -90,6 +92,21 @@ GEM
reline (0.6.3)
io-console (~> 0.5)
rexml (3.4.4)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.7)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.6)
rspec-temp_dir (1.1.2)
rspec (>= 3.0)
rubocop (1.81.7)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
Expand Down Expand Up @@ -165,8 +182,11 @@ DEPENDENCIES
dotenv
luhn-ruby
minitest
ostruct
rake
reline
rspec
rspec-temp_dir
rubycritic
simplecov
standardrb
Expand All @@ -181,6 +201,7 @@ CHECKSUMS
coercible (1.0.0) sha256=5081ad24352cc8435ce5472bc2faa30260c7ea7f2102cc6a9f167c4d9bffaadc
concurrent-ruby (1.3.5) sha256=813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6
descendants_tracker (0.0.4) sha256=e9c41dd4cfbb85829a9301ea7e7c48c2a03b26f09319db230e6479ccdc780897
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
dotenv (3.2.0) sha256=e375b83121ea7ca4ce20f214740076129ab8514cd81378161f11c03853fe619d
dry-configurable (1.3.0) sha256=882d862858567fc1210d2549d4c090f34370fc1bb7c5c1933de3fe792e18afa8
Expand All @@ -202,6 +223,7 @@ CHECKSUMS
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
luhn-ruby (1.0.0) sha256=bc9979c2b37eb14c0c15463aa6a9972a4fd07ddd272b8abefa2877fe5c43e4a8
minitest (5.26.2) sha256=f021118a6185b9ba9f5af71f2ba103ad770c75afde9f2ab8da512677c550cde3
ostruct (0.6.1) sha256=09a3fb7ecc1fa4039f25418cc05ae9c82bd520472c5c6a6f515f03e4988cb817
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
parser (3.3.10.0) sha256=ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6
path_expander (1.1.3) sha256=bea16440dea5a770b9765312c8037931cc576f4f2872d71133a3e480028f9f67
Expand All @@ -214,6 +236,12 @@ CHECKSUMS
regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
rspec-mocks (3.13.7) sha256=0979034e64b1d7a838aaaddf12bf065ea4dc40ef3d4c39f01f93ae2c66c62b1c
rspec-support (3.13.6) sha256=2e8de3702427eab064c9352fe74488cc12a1bfae887ad8b91cba480ec9f8afb2
rspec-temp_dir (1.1.2) sha256=92ccd30b8f4c80632a67cc4bbd6701b7b9d34b410d5bfc1fb6a095c5e6d8ce0a
rubocop (1.81.7) sha256=6fb5cc298c731691e2a414fe0041a13eb1beed7bab23aec131da1bcc527af094
rubocop-ast (1.48.0) sha256=22df9bbf3f7a6eccde0fad54e68547ae1e2a704bf8719e7c83813a99c05d2e76
rubocop-performance (1.25.0) sha256=6f7d03568a770054117a78d0a8e191cefeffb703b382871ca7743831b1a52ec1
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ $ docker-compose build
### 3. Running tests

```
$ docker-compose run --rm test
$ docker-compose run --rm test bundle exec rubocop
$ docker-compose run --rm app bundle exec rake test
$ docker-compose run --rm app bundle exec rspec
$ docker-compose run --rm app bundle exec standardrb
```

or

```
$ bundle exec rake test
$ bundle exec rubocop
$ bundle exec rspec
$ bundle exec standardrb
```
2 changes: 1 addition & 1 deletion bin/jhove
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ statuses = {}
err_file = ['jhove', Time.now.strftime('%Y%m%d_%H%M%S'), 'errors.txt'].join '_'
outfile = File.open err_file, 'w'

args.each do |arg| # rubocop:disable Metrics/BlockLength
args.each do |arg|
dir = Pathname.new(arg).cleanpath.to_s
unless File.exist? dir
statuses[arg] = 'No such directory'.red
Expand Down
2 changes: 1 addition & 1 deletion bin/process
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if ARGV.count.zero?
exit 1
end

ARGV.each do |arg| # rubocop:disable Metrics/BlockLength
ARGV.each do |arg|
dir = Pathname.new(arg).realpath.to_s
unless File.exist?(dir) && File.directory?(dir)
puts "Shipment directory #{dir.bold} does not exist, skipping".red
Expand Down
6 changes: 3 additions & 3 deletions config/config.dlxs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ stages:
- name: Tagger
class: Tagger
file: tagger
- name: Compressor
class: Compressor
file: compressor
- name: Compression
class: Compression
file: compression
- name: DLXSCompressor
class: DLXSCompressor
file: dlxs_compressor
Expand Down
6 changes: 3 additions & 3 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ stages:
- name: Tagger
class: Tagger
file: tagger
- name: Compressor
class: Compressor
file: compressor
- name: Compression
class: Compression
file: compression
- name: Postflight
class: Postflight
file: postflight
Expand Down
2 changes: 1 addition & 1 deletion lib/agenda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def to_s
end

# Propagate stage errors onto subsequent stages.
def update(source_stage) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
def update(source_stage)
@stages.each do |stage|
next if @stage_to_index[stage.name.to_sym] <=
@stage_to_index[source_stage.name.to_sym]
Expand Down
Loading