jupyter_on_rails 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/jupyter_on_rails/railtie.rb +9 -1
- data/lib/jupyter_on_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6500d132489c7b40c8502a6d4d95f0cd4e314bccb33b26d3693206a27046c988
|
4
|
+
data.tar.gz: 6d928c989159b0bddd3dc2df4489e190863217bc8fe5e6c2d9baeb3446678852
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 271038f2cf2635d8fad00f9ed23edee77a6a0743201f7fe590a1c834492cb6e87d04681c92ae53f1824f4133d41b37729fdd8d3a47d2e9f82e6a08b35a9b1b04
|
7
|
+
data.tar.gz: 2488dff0517374702c01e6ebf36d5a8c8a170741aef8a9948a2632edc666d7e2443c609b0ccfd1ccef037b44ff42d3879368cd1b6b0db1210afbd156eb0d4a41
|
data/README.md
CHANGED
@@ -58,6 +58,12 @@ rake jupyter:notebook
|
|
58
58
|
Eventually, you'll have jupyter opened, and the kernel being available.
|
59
59
|
|
60
60
|
|
61
|
+
### ApplicationRecord#to_df
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
User.to_df # => Daru::DataFrame is returned
|
65
|
+
```
|
66
|
+
|
61
67
|
## Development
|
62
68
|
|
63
69
|
This is a railtie gem, so you'd probably want to do something like:
|
@@ -1,9 +1,17 @@
|
|
1
|
-
|
1
|
+
require_relative 'daru/active_record_ext'
|
2
2
|
|
3
3
|
module JupyterOnRails
|
4
4
|
class Railtie < ::Rails::Railtie
|
5
5
|
rake_tasks do
|
6
6
|
load 'jupyter_on_rails/railtie/jupyter.rake'
|
7
7
|
end
|
8
|
+
|
9
|
+
config.before_configuration do
|
10
|
+
if defined?(::Daru) && defined?(::ActiveRecord)
|
11
|
+
class ::ActiveRecord::Base
|
12
|
+
include ::JupyterOnRails::Daru::ActiveRecordExt
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
8
16
|
end
|
9
17
|
end
|