Skip to content

Commit dddb9da

Browse files
zdavatzclaude
andcommitted
Update CLAUDE.md and README.md with fiparse daemon docs and modernized commands
Add reparse textinfo command, fiparse daemon restart note, update Ruby version to 3.4.1, modernize bundle/ruby commands, add missing system dependencies, and fix test commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d821d92 commit dddb9da

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ bundle exec rspec spec
2828
bundle exec standardrb
2929
bundle exec standardrb --fix # auto-fix
3030

31+
# Reparse FachInfo/PatInfo text for a specific IKSNR
32+
bundle exec ruby jobs/update_textinfo_swissmedicinfo --skip --target=both 62822 --reparse
33+
3134
# Start the app via Rack (port 8012 by default)
3235
bundle exec rackup
3336

@@ -62,6 +65,8 @@ Ruby 3.4 is required. System dependencies: `libmagickcore-dev`, `graphicsmagick`
6265

6366
The app runs alongside several daemons (in `ext/`): export, meddata, refdata, swissindex, fiparse, swissreg. External services: Yus (auth, port 9997), MIGEL (port 33000). The main app listens on port 10000.
6467

68+
**Important:** The `fiparse` daemon (DRb on port 10002) runs as a separate process managed by daemontools (`/etc/service/fiparse`). Code changes to `ext/fiparse/src/` require restarting this daemon to take effect. The main app calls `@parser.parse_fachinfo_html(...)` via DRb, so the fiparse daemon must be running with the current code.
69+
6570
### Key Entry Points
6671

6772
- `config.ru` — Rack startup, creates `ODDB::App` via `ODDB::Util::RackInterface`

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,29 @@ Open Drug Database for Switzerland. See the live version at http://ch.oddb.org
1010

1111
## Requirements
1212
* `git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build`
13-
* `rbenv install 3.1.0`
14-
* `sudo apt-get install apache2 daemontools daemontools-run pkg-config libmagickwand-dev libpq-dev`
13+
* `rbenv install 3.4.1`
14+
* `sudo apt-get install apache2 daemontools daemontools-run pkg-config libmagickwand-dev libpq-dev libmagickcore-dev graphicsmagick uuid-dev`
1515
* `bzcat 22:00-postgresql_database-ch_oddb-backup.bz2 | su -c psql -l postgres -p 5433 ch_odd`
1616
* see Guide.txt
1717

1818
## Useful commands
1919
### Reparse compositions of 5 digit Swissmedic Numbers ([issue #139](https://github.com/zdavatz/oddb.org/issues/139))
20-
`sudo -u apache bundle-300 exec ruby-300 jobs/import_swissmedic_only update_compositions 67685 60134`
20+
`sudo -u apache bundle exec ruby jobs/import_swissmedic_only update_compositions 67685 60134`
2121
### Reparse all compositions
22-
`sudo -u apache bundle-300 exec ruby-300 jobs/import_swissmedic_only update_compositions`
22+
`sudo -u apache bundle exec ruby jobs/import_swissmedic_only update_compositions`
2323
### Check all packages
24-
`sudo -u apache bundle-300 exec ruby-300 jobs/import_swissmedic_only check`
24+
`sudo -u apache bundle exec ruby jobs/import_swissmedic_only check`
25+
### Reparse FachInfo/PatInfo text for a specific IKSNR
26+
`bundle exec ruby jobs/update_textinfo_swissmedicinfo --skip --target=both 62822 --reparse`
27+
28+
**Note:** The `fiparse` daemon (DRb on port 10002) runs as a separate process managed by daemontools (`/etc/service/fiparse`). After making code changes to `ext/fiparse/src/`, restart the daemon for changes to take effect.
2529

2630
## Tests
2731

2832
* to run the Tests you need to do
2933
* bundle install
30-
* rake test
31-
* bundle exec rake spec/parslet_spec.rb # for parsing the compositions
34+
* bundle exec ruby test/suite.rb
35+
* bundle exec rspec spec/parslet_spec.rb # for parsing the compositions
3236
* look at the index.html in the coverage directory
3337

3438
* There are some Selenium/Watir based GUI integration tests. For details on how to use them have

0 commit comments

Comments
 (0)