Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SciRuby/iruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.0
Choose a base ref
...
head repository: SciRuby/iruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 1,825 additions and 732 deletions.
  1. +143 −0 .github/workflows/ci.yml
  2. +0 −62 .github/workflows/ubuntu.yml
  3. +68 −1 CHANGES.md
  4. +5 −0 Gemfile
  5. +59 −51 README.md
  6. +2 −1 Rakefile
  7. +0 −5 bin/iruby
  8. +7 −0 exe/iruby
  9. +19 −0 ext/Rakefile
  10. +7 −1 iruby.gemspec
  11. +380 −0 lib/iruby/application.rb
  12. +35 −3 lib/iruby/backend.rb
  13. +6 −6 lib/iruby/comm.rb
  14. +0 −190 lib/iruby/command.rb
  15. +165 −59 lib/iruby/display.rb
  16. +12 −0 lib/iruby/error.rb
  17. +1 −1 lib/iruby/formatter.rb
  18. +4 −1 lib/iruby/jupyter.rb
  19. +4 −2 lib/iruby/kernel.rb
  20. +108 −0 lib/iruby/kernel_app.rb
  21. +12 −2 lib/iruby/logger.rb
  22. +5 −1 lib/iruby/ostream.rb
  23. +4 −2 lib/iruby/session.rb
  24. +3 −3 lib/iruby/session/mixin.rb
  25. +3 −2 lib/iruby/session_adapter.rb
  26. +0 −77 lib/iruby/session_adapter/pyzmq_adapter.rb
  27. +4 −1 lib/iruby/utils.rb
  28. +1 −1 lib/iruby/version.rb
  29. +22 −3 test/helper.rb
  30. +7 −1 test/integration_test.rb
  31. +32 −0 test/iruby/application/application_test.rb
  32. +97 −0 test/iruby/application/console_test.rb
  33. +38 −0 test/iruby/application/helper.rb
  34. +93 −0 test/iruby/application/kernel_test.rb
  35. +139 −0 test/iruby/application/register_test.rb
  36. +77 −0 test/iruby/application/unregister_test.rb
  37. +12 −0 test/iruby/backend_test.rb
  38. +0 −207 test/iruby/command_test.rb
  39. +185 −0 test/iruby/display_test.rb
  40. +27 −15 test/iruby/jupyter_test.rb
  41. +0 −2 test/iruby/kernel_test.rb
  42. +13 −0 test/iruby/multi_logger_test.rb
  43. +0 −28 test/iruby/session_adapter_test.rb
  44. +0 −4 test/iruby/session_test.rb
  45. +25 −0 test/iruby/utils_test.rb
  46. +1 −0 test/run-test.rb
143 changes: 143 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
ubuntu:
name: Ubuntu
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ruby:
- "3.4"
- "3.3"
- "3.2"
- "3.1"
- "3.0"
- "2.7"
- "2.6"
- "2.5"
- debug

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- run: rake build

- name: Install ffi (if Ruby 2.7)
if: |
matrix.ruby == '2.7'
run: |
cat <<GEMFILE > Gemfile.irb
source 'https://rubygems.org'
gem 'ffi'
GEMFILE
BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
- name: Install ffi 1.6.x (if Ruby 2.6)
if: |
matrix.ruby == '2.6'
run: |
cat <<GEMFILE > Gemfile.irb
source 'https://rubygems.org'
gem 'ffi', '~> 1.6.0'
GEMFILE
BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
- name: Install ffi 1.6.x and irb < 1.4.3 (if Ruby 2.5)
if: |
matrix.ruby == '2.5'
run: |
cat <<GEMFILE > Gemfile.irb
source 'https://rubygems.org'
gem 'ffi', '~> 1.6.0'
gem 'irb', '< 1.4.3'
GEMFILE
BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
- name: Install IRuby gem
run: |
sudo apt update # Preparation for Native Package Installer
gem install pkg/*.gem
- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
env:
IRUBY_SESSION_ADAPTER: ffi-rzmq

- name: Install requirements on ubuntu
run: |
sudo apt update
sudo apt install -y --no-install-recommends \
libczmq-dev \
python3 \
python3-pip \
python3-setuptools
sudo pip3 install wheel
sudo pip3 install -r ci/requirements.txt
- run: bundle install --jobs 4 --retry 3

- name: Run tests
env:
PYTHON: python3
ADAPTERS: cztop ffi-rzmq
run: |
for adapter in $ADAPTERS; do
export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter
bundle exec rake test TESTOPTS="-v"
done
windows:
name: Windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"

- run: rake build

- run: gem install pkg/*.gem

- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
env:
IRUBY_SESSION_ADAPTER: ffi-rzmq

macos:
name: macOS
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"

- run: rake build

- run: gem install pkg/*.gem

- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
env:
IRUBY_SESSION_ADAPTER: ffi-rzmq
62 changes: 0 additions & 62 deletions .github/workflows/ubuntu.yml

This file was deleted.

69 changes: 68 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
# 0.8.1 (2025-02-16)

* Add support for jupyter widgets by @matt-do-it in https://github.com/SciRuby/iruby/pull/350
* Suppress "literal string will be frozen in the future" warning by @tikkss in https://github.com/SciRuby/iruby/pull/353
* Fix warnings in project by @simpl1g in https://github.com/SciRuby/iruby/pull/356
* restore support for IRB <= v1.13.0 by @sealocal in https://github.com/SciRuby/iruby/pull/358
* Restore ruby 2.6 and 2.5 in CI by @sealocal in https://github.com/SciRuby/iruby/pull/359
* Add Ruby 3.4 to CI by @kojix2 in https://github.com/SciRuby/iruby/pull/360
* Fix NoMethodError in backend by @edsinclair in https://github.com/SciRuby/iruby/pull/364

# 0.8.0 (2024-07-28)

* Hide output on assignment by @ankane in https://github.com/SciRuby/iruby/pull/312
* Introduce the new Application classes by @mrkn in https://github.com/SciRuby/iruby/pull/317
* Fix Gnuplot issues in Ruby 2.7 (#321) by @kojix2 in https://github.com/SciRuby/iruby/pull/322
* Add Ruby3.1 to CI by @kojix2 in https://github.com/SciRuby/iruby/pull/323
* Update README.md by @marek-witkowski in https://github.com/SciRuby/iruby/pull/324
* ci: upgrade actions/checkout by @kojix2 in https://github.com/SciRuby/iruby/pull/325
* Add Ruby 3.2 to CI for ubuntu by @petergoldstein in https://github.com/SciRuby/iruby/pull/327
* Default to true for `store_history` if not in silent mode by @gartens in https://github.com/SciRuby/iruby/pull/330
* Add Ruby 3.3 to CI for Ubuntu by @kojix2 in https://github.com/SciRuby/iruby/pull/331
* Remove Ruby 2.3 and 2.4 from CI by @kojix2 in https://github.com/SciRuby/iruby/pull/332
* Fix typos by @kojix2 in https://github.com/SciRuby/iruby/pull/335
* Format README.md and ci.yml by @kojix2 in https://github.com/SciRuby/iruby/pull/337
* Fix PlainBackend for irb v1.13.0 by @zalt50 in https://github.com/SciRuby/iruby/pull/339
* Added `date` to header by @ebababi in https://github.com/SciRuby/iruby/pull/342
* Update CI Configuration for IRuby by @kojix2 in https://github.com/SciRuby/iruby/pull/344
* Add logger and Remove base64 to Fix CI Tests by @kojix2 in https://github.com/SciRuby/iruby/pull/345
* Update CI trigger configuration by @kojix2 in https://github.com/SciRuby/iruby/pull/346

# 0.7.4 (2021-08-18)

## Enhancements

* Install zeromq library automatically https://github.com/SciRuby/iruby/pull/307, https://github.com/SciRuby/iruby/pull/308 (@mrkn, @kou)
* Remove pyzmq session adapter (@mrkn)
* Make cztop session adapter deprecated (@mrkn)

# 0.7.3 (2021-07-08)

## Bug Fixes

* Do not call default renderers when to_iruby_mimebundle is available (@mrkn)

# 0.7.2 (2021-06-23)

## Bug Fixes

* Fix IRuby.table for Ruby >= 2.7 https://github.com/SciRuby/iruby/pull/305 (@topofocus)
* Fix PlainBackend to include modules https://github.com/SciRuby/iruby/issues/303 (@UliKuch, @mrkn)

# 0.7.1 (2021-06-21)

## Enhancements

* Add support of `to_iruby_mimebundle` format method https://github.com/SciRuby/iruby/pull/304 (@mrkn)

## Bug Fixes

* Prevent unintentional display the result of Session#send (@mrkn)
* Update display formatter for Gruff::Base to prevent warning (@mrkn)

# 0.7.0 (2021-05-28)

## Enhancements
@@ -7,9 +69,14 @@

## Bug Fixes

* Follow the messages and hooks orders during execute_request processing (@mrkn)
* Fix the handling of image/svg+xml https://github.com/SciRuby/iruby/pull/300, https://github.com/SciRuby/iruby/pull/301 (@kojix2)

# 0.6.1 (2021-05-26)

## Bug Fixes

* Follow the messages and hooks orders during execute_request processing (@mrkn)

# 0.6.0 (2021-05-25)

## Bug Fixes
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -15,3 +15,8 @@ end
group :test do
gem 'cztop'
end

# Tests are failing on Ruby 3.3 because warnings related to OpenStruct are being written to the standard error output.
# This is being captured by Open3.capture2e and then mistakenly parsed as JSON.
# This gem can be removed when json gem is updated
gem 'ostruct'
Loading