Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Export formats

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

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

評価

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

調査の方向性

src/semsql/builder/build.Makefile から始め、特に 51 行目付近の main target を確認し、rdftab、relation-graph TSV、prefixes、sql_schema/semsql.sql が SQLite build にどのように取り込まれるかを追跡します。build コマンドが DSV 出力と SQLite 出力のどちらを選択するかを定義し、そのうえで、既存のデータベース build を維持したまま、DSV 出力では SQLite のロードがスキップされることを検証します。

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

説明

As part of KBase's work with ontologies in semsql, it would be very handy to be able to export as DSV directly, rather than going via the sqlite database.

We could put together a file similar to build.Makefile to perform the conversions, but I am wary of changes being made in the semsql sqlite build process that we'd have to ensure that we kept up with. I was therefore wondering about adapting the current build command to export either DSV or sqlite, depending on what args it is given.

build.Makefile line 51 onwards:

# -- MAIN TARGET --
# A db is constructed from
# (1) triples loaded using rdftab
# (2) A relation-graph TSV
%.db: %.owl %-$(RGSUFFIX).tsv $(PREFIX_CSV_PATH)
	rm -f [email protected] && \
	cat $(THIS_DIR)/sql_schema/semsql.sql | sqlite3 [email protected] && \
	echo .exit | sqlite3 -echo [email protected] -cmd ".mode csv" -cmd ".import $(PREFIX_CSV_PATH) prefix" && \
	rdftab [email protected] < $< && \
	sqlite3 [email protected] -cmd '.separator "\t"' ".import $*-$(RGSUFFIX).tsv entailed_edge" && \
	gzip -f $*-$(RGSUFFIX).tsv && \
	cat $(THIS_DIR)/indexes/*.sql | sqlite3 [email protected] && \
	echo "ALTER TABLE statements ADD COLUMN graph TEXT;" | sqlite3 [email protected] && \
	(test -d views && find views -maxdepth 1 -name '$(notdir $*)*.sql' -type f -print0 | xargs -0 -I{} sh -c 'sqlite3 [email protected]< "$$1"' sh {} || echo no views ) && \
	mv [email protected] $@
.PRECIOUS: %.db

Alter this so that if the desired output is DSV, the rdftab command is run but the sqlite db loading is omitted. Relevant files, including prefixes, relation graph, and schema SQL could be moved to a directory together or something like that.

主要言語
Python
スター
70
フォーク
7
平均マージ
4時間 18分
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

INCATools/semantic-sql のほかの issue

INCATools/semantic-sql の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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