MDeLuise / plant-it

🪴 Self-hosted, open source gardening companion app
https://plant-it.org
GNU General Public License v3.0
453 stars 17 forks source link

Do you plan to replace trefle.io ? #218

Open eskiiom opened 3 weeks ago

eskiiom commented 3 weeks ago

Avoid duplicated feature requests

Description

Hello,

considering that trefle.io seems to be abandonned see this twitter post

and also because their website has been rebuilt, the certificate is not valid anymore and api returns ssl trust issue, so we can only add plants manually (correct me if i'm wrong I discovered plant-it recently)

Capture d’écran 2024-06-12 à 21 41 02

Adding my plants from a worldwide database seemed wonderful :)

MDeLuise commented 2 weeks ago

Hi @eskiiom, Thanks for opening this issue and bringing up these concerns.

Yes, I do plan to replace Trefle.io. The service appears to be inactive, with no updates to their database and no recent activity in their repository, which has several open issues dating back years.

I'm currently exploring the best way to move forward. My initial plan is to create a new project that will start by incorporating all the information from the Trefle database. Over time, this new service will be expanded with additional information as requested by users, such as "Hardiness Zone."

This will be a significant step for the project, and transitioning from Trefle to the new service will be the next big milestone. I'll keep you updated on the progress and any developments related to this migration.

Regarding the certificate issue you've pointed out, thank you for bringing it to my attention. I wasn't aware of it until now. I'll investigate and try to implement a temporary fix to address this issue until the switch to the new service will be completed.

eskiiom commented 2 weeks ago

Thank you very much for your quick and detailed answer. I'll happily contribute if I can or support this new project ! Have a nice day

MDeLuise commented 2 weeks ago

I've implemented a temporary fix to the server code, ensuring that the Trefle integration should now function correctly until we transition to another service. This fix will be included in the next release.

Thank you for opening the issue and offering your help. I'll keep this issue open to provide updates on any progress regarding this transition.

Have a great day!

eskiiom commented 2 weeks ago

the fix made the trick, connection to trefle is back and I can search and add my plants :) thanks for the swift comit

John710 commented 2 days ago

It`s again not working( How can we help you speed up work on a new service?

MDeLuise commented 1 day ago

Hi, Unfortunately, the Trefle service is no longer operational. The project is inactive, and while the dataset was accessible until now, it is no longer available, so the fix I previously made does not work anymore.

As a temporary solution, I suggest making Trefle available as a self-hosted service. Then, we can switch to a new service when it becomes available.

I tried to build Trefle locally using the Dockerfile provided in their repository. However, I encountered the following error when running:

docker build --no-cache -t trefle-fork -f Dockerfile . --progress=plain

The error output is:

#15 [10/12] RUN mkdir -p /app/tmp/pids &&   chmod -R 777 /app/tmp &&   chmod 777 /app/bin/post-start
#15 DONE 0.1s

#16 [11/12] RUN bundle exec rails assets:precompile --trace --verbose
#16 1.404 rails aborted!
#16 1.406 LoadError: cannot load such file -- nokogiri
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/loofah-2.19.0/lib/loofah.rb:4:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rails-html-sanitizer-1.4.3/lib/rails-html-sanitizer.rb:2:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers/sanitize_helper.rb:3:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers.rb:8:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/context.rb:1:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/railtie.rb:10:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails.rb:3:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:73:in `rescue in block in require'
#16 1.406 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:51:in `block in require'
#16 1.406 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:44:in `each'
#16 1.406 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:44:in `require'
#16 1.406 /usr/local/lib/ruby/3.1.0/bundler.rb:176:in `require'
#16 1.406 /app/config/application.rb:19:in `<main>'
#16 1.406 /app/Rakefile:4:in `require_relative'
#16 1.406 /app/Rakefile:4:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
#16 1.406 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
#16 1.406 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
#16 1.406 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
#16 1.406 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:51:in `invoke'
#16 1.406 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.406 bin/rails:4:in `<main>'
#16 1.406
#16 1.406 Caused by:
#16 1.416 LoadError: cannot load such file -- sprockets-rails
#16 1.416 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
#16 1.416 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:60:in `block (2 levels) in require'
#16 1.416 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:55:in `each'
#16 1.416 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:55:in `block in require'
#16 1.416 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:44:in `each'
#16 1.416 /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:44:in `require'
#16 1.416 /usr/local/lib/ruby/3.1.0/bundler.rb:176:in `require'
#16 1.416 /app/config/application.rb:19:in `<main>'
#16 1.416 /app/Rakefile:4:in `require_relative'
#16 1.416 /app/Rakefile:4:in `<main>'
#16 1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
#16 1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
#16 1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
#16 1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
#16 1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
#16 1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
#16 1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
#16 1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
#16 1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
#16 1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:51:in `invoke'
#16 1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
#16 1.416 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.416 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#16 1.416 bin/rails:4:in `<main>'
#16 ERROR: process "/bin/sh -c bundle exec rails assets:precompile --trace --verbose" did not complete successfully: exit code: 1
------
 > [11/12] RUN bundle exec rails assets:precompile --trace --verbose:
1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
1.416 /app/vendor/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:51:in `invoke'
1.416 /app/vendor/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
1.416 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
1.416 /app/vendor/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
1.416 bin/rails:4:in `<main>'
------
Dockerfile:39
--------------------
  37 |       chmod 777 /app/bin/post-start
  38 |
  39 | >>> RUN bundle exec rails assets:precompile --trace --verbose
  40 |     RUN rm -rf /app/node_modules storage /usr/local/share/.cache/yarn log/* *.md test kube frontend spec tmp/cache lib/assets spec && \
  41 |       rm -rf /var/cache/apk/* && \
--------------------
ERROR: failed to solve: process "/bin/sh -c bundle exec rails assets:precompile --trace --verbose" did not complete successfully: exit code: 1
MDeLuise commented 1 day ago

I have successfully connected the project to FloraCodex as the backend, thanks to the suggestion I received. After some initial testing, it seems to be a suitable temporary replacement. However, it does have some limitations, including:

Furthermore, FloraCodex has a smaller plant database compared to Trefle.

Despite these shortcomings, it could still serve as an effective interim solution. I will continue to test the service and will keep you updated on the progress.

sunjam commented 1 day ago

So, floracodex appears to have no software license or repos, but is also a fork of trefle..? https://github.com/orgs/floracodex/repositories

MDeLuise commented 22 hours ago

I agree, it’s quite unusual that FloraCodex lacks a software license and repository. This raised my concerns as well, and I suspect the service might be discontinued eventually. The documentation also lacks a lot of basic information, which is not ideal.

For the next few months, I believe we can use FloraCodex as a backend dataset as a temporary fix. Meanwhile, I have downloaded the dataset of Trefle and have started testing a new project based on it.