python-visualization / python-visualization/folium

Add template parameters to JsCode objects

オープン
#2,121 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
7.4k
フォーク
2.3k
平均マージ
17時間 22分
マージ済み PR(30日)
11

説明

Is your feature request related to a problem? Please describe.
I'd like to be able to refer to other folium /leaflet objects inside a JsCode object. So far I have been using string interpolation inside the body of the JsCode object.

Describe the solution you'd like
I'd like to add parameters to the JsCode __init__ method, together with a basic string templating solution. For the string templating I'd prefer to use the good-old %(name)s format.

Describe alternatives you've considered
I considered using the newer formatting templates such as used in python format, or Jinja templates. However, due to brace heavy nature of javascript, I think a completely new variable marker will lead to more readable code.

Implementation
folium is maintained by volunteers. Can you help make a PR if we want to implement this feature?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、JsCode init エントリポイントと、JsCode 本体で現在使われている文字列補間を読みます。要求されている %(name)s パラメータの動作を、既存の JavaScript 生成アプローチと比較します。JsCode がパラメータを受け取り、提案された基本的なテンプレート形式を使ってそれらをレンダリングし、新しい動作のカバレッジが追加されていれば完了とします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, python
領域
data-visualization, web-dev
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。