Git Product home page Git Product logo

baserow-vocabai-plugin's Introduction

Baserow VocabAi Plugin

Baserow Plugins

A Baserow plugin can be used to extend or change the functionality of Baserow. Specifically a plugin is a folder with a backend and/or web-frontend folder.

How to run Baserow VocabAi Plugin using Docker-compose

A number of different example docker-compose files are provided in this folder. Before using any of them it is recommended you set the following env variables:

# Enable Docker buildkit
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
# Set these variables so the images are built and run with the same uid/gid as your 
# actual user. This prevents permission issues when mounting your local source into
# the images.
export PLUGIN_BUILD_UID=$(id -u)
export PLUGIN_BUILD_GID=$(id -g)
  1. docker-compose.yml - This is the simplest compose file that will run the your plugin installed into a single container, use docker-compose up.
  2. docker-compose.multi-service.yml - This is a more complex compose file which runs each of the Baserow services with your plugin installed in separate containers all behind a Caddy reverse proxy.
    1. docker-compose -f docker-compose.multi-service.yml up -d --build
  3. docker-compose.dev.yml - This is a development compose file which runs a Baserow all-in-one image with your plugin installed in development mode. Additionally, it will mount in the local source code into the container for hot code reloading.
    1. docker-compose -f docker-compose.dev.yml up -d --build
  4. docker-compose.multi-service.dev.yml - This is a development compose file which runs the services in a separate containers like the .multi-service.yml above. The images used will be the development variants which have dev dependencies installed. Additionally, it will mount in the local source code into the containers so for hot code reloading.
    1. docker-compose -f docker-compose.multi-service.dev.yml up -d --build

Missing features TODO

  1. A templated setup guide in the generated folder itself.
  2. Example tests for web-frontend and backend.
  3. An equivalent dev.sh
  4. Setup instructions for IDEs (vs-code/intellij)
  5. Example GitLab/GitHub CI integration + instructions to publish plugin to Dockerhub.

baserow-vocabai-plugin's People

Contributors

luc-vocab avatar

Stargazers

Len Hickey avatar

Watchers

 avatar

baserow-vocabai-plugin's Issues

exception when runningc transformation, source field deleted ?

AttributeError: 'TableModelQuerySet' object has no attribute 'field_417'

Sentry Issue: BASEROW-VOCABAI-BACKEND-51

AttributeError: 'TableModelQuerySet' object has no attribute 'field_417'
(17 additional frame(s) were not displayed)
...
  File "baserow/core/telemetry/utils.py", line 37, in _wrapper
    raise ex
  File "baserow/core/telemetry/utils.py", line 33, in _wrapper
    result = wrapped_func(*args, **kwargs)
  File "baserow/contrib/database/rows/handler.py", line 1555, in update_rows
    dependant_field_type.row_of_dependency_updated(
  File "baserow_vocabai_plugin/fields/vocabai_fieldtypes.py", line 360, in row_of_dependency_updated
    self.process_transformation(field, starting_row)
  File "baserow_vocabai_plugin/fields/vocabai_fieldtypes.py", line 121, in process_transformation
    source_value = getattr(row, source_internal_field_name)

allow chaining transformations

allow running pinyin on translated chinese text

  1. start with english
  2. translate to simplified chinese
  3. generate pinyin based on the simplified chinese

requested by Kim over email.

update deepl language list

Vocab-Apps/anki-vocabai#5
DeepL supports English to Norwegian translations, but the baserow sheet does not allow this combination. DeepL is the only high-quality translator for Norwegian, so I won't be using this addon yet. Hope this will be fixed in the future!

while exporting, empty chinese romanization field

TypeError: string indices must be integers

Sentry Issue: BASEROW-VOCABAI-BACKEND-54

TypeError: string indices must be integers
(5 additional frame(s) were not displayed)
...
  File "baserow/contrib/database/export/table_exporters/csv_table_exporter.py", line 89, in write_to_file
    file_writer.write_rows(self.queryset, write_row)
  File "baserow/contrib/database/export/file_writer.py", line 103, in write_rows
    write_row(row, is_last_row)
  File "baserow/contrib/database/export/table_exporters/csv_table_exporter.py", line 84, in write_row
    field_database_name, _, field_human_value = field_serializer(row)
  File "baserow/contrib/database/export/file_writer.py", line 207, in serializer_func
    result = field_object["type"].get_export_value(
  File "baserow_vocabai_plugin/fields/vocabai_fieldtypes.py", line 588, in get_export_value
    return value['rendered_solution']

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.