chore: bump docs graph being tested

Hadn't been updated in over a year
This commit is contained in:
Gabriel Horner
2025-06-13 10:32:10 -04:00
committed by Gabriel Horner
parent 25bd22522b
commit 7cc9ddc26b
6 changed files with 24 additions and 25 deletions

View File

@@ -248,4 +248,4 @@
frontend.common.thread-api/defkeyword cljs.spec.alpha/def}
:skip-comments true
:output {:progress true
:exclude-files ["src/test/docs-0.10.9/"]}}
:exclude-files ["src/test/docs-0.10.12/"]}}

View File

@@ -105,16 +105,15 @@
(into {})))
"Task marker counts")
(is (= {:markdown 7322 :org 500} (get-block-format-counts db))
(is (= {:markdown 7372 :org 500} (get-block-format-counts db))
"Block format counts")
(is (= {:rangeincludes 13, :description 137, :updated-at 46, :tags 5,
:logseq.order-list-type 16, :query-table 8, :logseq.macro-arguments 105,
:parent 14, :logseq.tldraw.shape 79, :card-last-score 5, :card-repeats 5,
:name 16, :card-next-schedule 5, :ls-type 79, :card-last-interval 5, :type 166,
:template 5, :domainincludes 7, :title 114, :alias 62, :supports 6, :id 145,
:url 30, :card-ease-factor 5, :logseq.macro-name 105, :created-at 46,
:card-last-reviewed 5, :platforms 79, :initial-version 16, :heading 315}
(is (= {:rangeincludes 13, :description 137, :updated-at 46, :tags 5, :logseq.order-list-type 16, :query-table 8,
:logseq.macro-arguments 105, :parent 14, :logseq.tldraw.shape 79, :card-last-score 5, :card-repeats 5,
:name 16, :card-next-schedule 5, :ls-type 79, :card-last-interval 5, :type
166, :template 5, :domainincludes 7, :title 114, :alias 62, :supports 6, :id
146, :url 30, :card-ease-factor 5, :logseq.macro-name 105, :created-at 46,
:card-last-reviewed 5, :platforms 79, :initial-version 16, :heading 332}
(get-top-block-properties db))
"Counts for top block properties")
@@ -159,7 +158,7 @@
;; Counts assertions help check for no major regressions. These counts should
;; only increase over time as the docs graph rarely has deletions
(testing "Counts"
(is (= 340 (count files)) "Correct file count")
(is (= 339 (count files)) "Correct file count")
(is (= 33
(ffirst
(d/q '[:find (count ?b)

View File

@@ -7,14 +7,14 @@
;; Integration test that test parsing a large graph like docs
(deftest ^:integration parse-graph
(let [graph-dir "test/resources/docs-0.10.9"
_ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.10.9")
(let [graph-dir "test/resources/docs-0.10.12"
_ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.10.12")
{:keys [conn files asts]} (gp-cli/parse-graph graph-dir {:verbose false})]
(docs-graph-helper/docs-graph-assertions @conn graph-dir files)
(testing "Additional counts"
(is (= 57814 (count (d/datoms @conn :eavt))) "Correct datoms count"))
(is (= 58149 (count (d/datoms @conn :eavt))) "Correct datoms count"))
(testing "Asts"
(is (seq asts) "Asts returned are non-zero")

View File

@@ -129,9 +129,9 @@
;; =====
(deftest-async ^:integration export-docs-graph-with-convert-all-tags
(p/let [file-graph-dir "test/resources/docs-0.10.9"
(p/let [file-graph-dir "test/resources/docs-0.10.12"
start-time (cljs.core/system-time)
_ (docs-graph-helper/clone-docs-repo-if-not-exists file-graph-dir "v0.10.9")
_ (docs-graph-helper/clone-docs-repo-if-not-exists file-graph-dir "v0.10.12")
conn (db-test/create-conn)
_ (db-pipeline/add-listener conn)
{:keys [import-state]}
@@ -139,7 +139,7 @@
end-time (cljs.core/system-time)]
;; Add multiplicative factor for CI as it runs about twice as slow
(let [max-time (-> 20 (* (if js/process.env.CI 2 1)))]
(let [max-time (-> 25 (* (if js/process.env.CI 2 1)))]
(is (< (-> end-time (- start-time) (/ 1000)) max-time)
(str "Importing large graph takes less than " max-time "s")))

View File

@@ -138,8 +138,8 @@ line 4"]
(deftest ^:integration test->edn
(let [graph-dir "test/resources/docs-0.10.9"
_ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.10.9")
(let [graph-dir "test/resources/docs-0.10.12"
_ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.10.12")
files (#'gp-cli/build-graph-files graph-dir {})
asts-by-file (->> files
(map (fn [{:file/keys [path content]}]
@@ -154,12 +154,12 @@ line 4"]
"Drawer" 1,
"Example" 22,
"Footnote_Definition" 2,
"Heading" 6716,
"Heading" 6764,
"Hiccup" 9,
"List" 25,
"Paragraph" 626,
"Paragraph" 629,
"Properties" 85,
"Property_Drawer" 509,
"Property_Drawer" 510,
"Quote" 28,
"Raw_Html" 18,
"Src" 82,

View File

@@ -16,8 +16,8 @@
(use-fixtures :each test-helper/start-and-destroy-db)
(deftest ^:integration parse-and-load-files-to-db
(let [graph-dir "src/test/docs-0.10.9"
_ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.10.9")
(let [graph-dir "src/test/docs-0.10.12"
_ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.10.12")
repo-config (edn/read-string (str (fs/readFileSync (node-path/join graph-dir "logseq/config.edn"))))
files (#'gp-cli/build-graph-files graph-dir repo-config)
_ (with-redefs [worker-state/get-config (constantly repo-config)]
@@ -26,9 +26,9 @@
(docs-graph-helper/docs-graph-assertions db graph-dir (map :file/path files))
(testing "Additional Counts"
(is (= 76899 (count (d/datoms db :eavt))) "Correct datoms count")
(is (= 77370 (count (d/datoms db :eavt))) "Correct datoms count")
(is (= 7047
(is (= 7095
(ffirst
(d/q '[:find (count ?b)
:where [?b :block/path-refs ?bp] [?bp :block/name]] db)))