python-visualization / python-visualization/folium
Add template parameters to JsCode objects
まだ誰も着手していません。
- 主要言語
- 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?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、JsCode init エントリポイントと、JsCode 本体で現在使われている文字列補間を読みます。要求されている %(name)s パラメータの動作を、既存の JavaScript 生成アプローチと比較します。JsCode がパラメータを受け取り、提案された基本的なテンプレート形式を使ってそれらをレンダリングし、新しい動作のカバレッジが追加されていれば完了とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, python
- 領域
- data-visualization, web-dev
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100