Document how to generate custom graphs to run tests on
Resolves #4844
Merge request reports
Activity
@jenkins retry build
Jenkins job DGRPH/gitlab-builds #2735 succeeded in 6 min 14 sec.
See Console Output, Blue Ocean and Coverage Report for more details.Jenkins job DGRPH/gitlab-builds #2736 succeeded in 4 min 55 sec.
See Console Output, Blue Ocean and Coverage Report for more details.- docs/testing.rst 0 → 100644
53 ``swh_graph::serde::deserialize_with_labels_and_maps``. For example, in JSON: 54 55 .. code-block:: rust 56 57 let file = std::fs::File::open(&graph_path).with_context(|| { 58 format!("Could not open {}", graph_path.display()) 59 })?; 60 61 let mut deserializer = 62 serde_json::Deserializer::from_reader(BufReader::new(file)); 63 64 let graph = swh_graph::serde::deserialize_with_labels_and_maps(&mut deserializer) 65 .map_err(|e| anyhow!("Could not read JSON graph: {e}"))?; 66 67 In particular, the gRPC server executable (``swh-graph-grpc-serve``) can read files 68 serialized to JSON this way, using the ``--graph-format json`` option. - Comment on lines +67 to +68
welp, I hallucinated the existence of this flag. It's present in swh-provenance, but it's still an open issue for swh-graph: #4835
A bit outside of this MR, but we're on the
Regeneration the dataset
section: the example command currently does not start:$ python -m swh.graph.example_dataset.generate_dataset --compress swh/graph/example_dataset Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/home/martin/swh-environment/swh-graph/swh/graph/example_dataset/generate_dataset.py", line 51, in <module> main() File "/home/martin/swh-environment/swh-graph/swh/graph/example_dataset/generate_dataset.py", line 47, in main compress("example", output_path / "orc", output_path / "compressed") TypeError: compress() missing 1 required positional argument: 'test_flavor'
On test graphs: looking at
graph_builder.rs
I think I'll try very soon to add inswh-fuse
a test of corner cases mentioned in swh-fuse!93 (comment 197559) - but should I wait for--graph-format json
? Or use another format, already supported ?the example command currently does not start:
ping @varasterix
but should I wait for
--graph-format json
?Yes, I can do it now if that's a blocker. Or do you want to do it yourself? It should be easy using the documentation here (or by looking at the implementation of the same flag in swh-provenance), and of course I can help
Edited by vlorentzThe issue with the script tracked in #4845 (closed) and should be resolved with !728 (merged). Feel free to comment if need be
mentioned in issue #4844
mentioned in issue swh-fuse#2919
mentioned in issue #4845 (closed)