Skip to content

Commit 2c7f09e

Browse files
Merge pull request #161 from tigergraph/update-contrib
update contrib
2 parents ca797fc + eb6d29f commit 2c7f09e

File tree

3 files changed

+27
-23
lines changed

3 files changed

+27
-23
lines changed

.github/auto_request_review.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,28 @@
44
reviewers:
55
# The default reviewers if not assigned specifically
66
defaults:
7+
- primary
78
- secondary
89
- tertiary
910
# Reviewer groups each of which has a list of GitHub usernames
1011
groups:
11-
group1:
12-
- yimingpantg
13-
- TannerW
12+
primary:
13+
- RobRossmiller-TG
1414
- wyattjoynertg
1515
- parkererickson-tg
16-
- alexthomasTG
17-
secondary:
18-
- yimingpantg
19-
- wyattjoynertg
20-
- TannerW
21-
tertiary:
22-
- xinyuchtg
2316
- victorleeTG
24-
- TannerW
17+
# secondary:
18+
# - RobRossmiller-TG
19+
# - wyattjoynertg
20+
# tertiary:
21+
# - victorleeTG
2522

2623
files:
2724
# All review request will be sent to the following groups/people.
2825
'**':
29-
- secondary
30-
- tertiary
26+
- primary
27+
# - secondary
28+
# - tertiary
3129

3230
options:
3331
# ignore draft PRs

tests/CONTRIBUTING.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,26 @@ pip install -r requirements.txt
2929

3030
`run.sh` does a few things:
3131

32-
- runs `data/create_baseline.py`
33-
- this creates the baselines from the graphs listed in that file
34-
- runs the setup script to make sure the graph is created and data is loaded
32+
- runs the setup script to make sure the graphs are created and data is loaded
33+
- runs `test/create_baseline.py`
34+
- this creates the baselines for the algorithm types listed in that file
3535
- runs the tests with pytest
3636

3737
## Directory layout
3838

39-
Data: stores the satic data for creating graphs, and algorithm baseline results.
39+
`data`: stores the satic data for creating graphs, and algorithm baseline results.
4040

4141
- CSV files under `data/[heterogeneous_edges, unweighted_edges, weighted_edges]` store the adjacency information for creating graphs. The baselines for algorithms are made from these graphs
4242
- For example `data/weighted_edges/line_edges.csv` stores the edges and weights to create a weighted, line graph.
4343
- JSON files under `data/baseline` store the baseline results for a given algorithm on a given graph type.
4444
- For example `data/baseline/centrality/pagerank/Line_Directed.json` stores the baseline results for pagerank on a directed line graph
4545

46+
Some data (like the Cora graph) comes from [pyTigerGraph Datasets](https://docs.tigergraph.com/pytigergraph/current/datasets/datasets_object), so it will not be in the this path.
47+
4648
test:
4749

4850
- setup.py: creates the graph, loads the data and installs the queries from pyTG's featurizer. Any new/custom queries need to be manually installed
51+
- create_baseline.py: creates the baselines the algorithms will be compared to.
4952
- test<algo_family>.py: houses the testing code for each family of algorithms
5053

5154
```
@@ -56,25 +59,28 @@ test:
5659
│   │ │ └── <GraphType>.json
5760
│   ├── <edge_family>
5861
│   │ └── <graph_type>.csv
59-
│   └── create_baseline.py
6062
├── requirements.txt
6163
├── run.sh
6264
├── test
6365
│   ├── pyrightconfig.json
6466
│   ├── setup.py
67+
│   ├── baseline/
68+
│ │   ├── algos/
69+
│ │ │ └── <baseline algorithms>.py
70+
│ │ └── <funcs for running baseline generation by algo family>.py
6571
│   ├── test_centrality.py
6672
│   ├── test_community.py
6773
│   ├── test_path_finding.py
68-
│   ├── test_topological_link_prediction.py
74+
│   ├── ...
6975
│   └── util.py
7076
```
7177

7278
## Adding tests
7379

74-
Start with creating the baseline. Add a section to `create_baseline.py` that creates a baseline for all the necessary graph types for your algorithm. The output of the baseline should be written to
75-
the correct baseline path (see above [layout](#directory-layout)).
80+
Start with creating the baseline. Add a method call to `create_baseline.py` that creates a baseline for all the necessary graph types for your algorithm. The output of the baseline should be written to
81+
the correct path in `data/baseline` (see above [layout](#directory-layout)).
7682

77-
If you're adding a new algorithm, add a test method for it to the algorithm family that it belongs to (i.e., community algorigthms go in community.py). The first test method in `test/test_centrality.py`
83+
If you're adding a new algorithm, add a test method to the algorithm family that it belongs to (i.e., community algorigthms go in community.py). The first test method in `test/test_centrality.py`
7884
is a good template to follow:
7985

8086
```py

tests/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
clear
22
python3 test/setup.py &&
33
python3 test/baseline/create_baselines.py &&
4-
pytest test/test_centrality.py test/test_ml.py
4+
pytest test/test_centrality.py #test/test_ml.py

0 commit comments

Comments
 (0)