webgestaltpy 0.1.1__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of webgestaltpy might be problematic. Click here for more details.

Files changed (36) hide show
  1. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/.github/workflows/CI.yml +37 -0
  2. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/.github/workflows/doc.yaml +12 -4
  3. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/.gitignore +3 -0
  4. WebGestaltPy-0.3.0/.pre-commit-config.yaml +15 -0
  5. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/Cargo.lock +54 -27
  6. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/Cargo.toml +3 -3
  7. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/PKG-INFO +5 -3
  8. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/README.md +3 -1
  9. WebGestaltPy-0.3.0/_typos.toml +2 -0
  10. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/build_docs.py +26 -6
  11. WebGestaltPy-0.3.0/data/hsapiens_network_CPTAC_Proteomics_OV_entrezgene.net +6091 -0
  12. WebGestaltPy-0.3.0/data/net_genes.txt +50 -0
  13. WebGestaltPy-0.3.0/data/second_genelist.txt +474 -0
  14. WebGestaltPy-0.3.0/data/test.rnk +11150 -0
  15. WebGestaltPy-0.3.0/docs/Usage/index.md +46 -0
  16. WebGestaltPy-0.3.0/docs/data.tar.gz +0 -0
  17. WebGestaltPy-0.3.0/docs/index.md +15 -0
  18. WebGestaltPy-0.3.0/docs/overrides/main.html +8 -0
  19. WebGestaltPy-0.3.0/mkdocs.yml +43 -0
  20. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/pyproject.toml +2 -0
  21. WebGestaltPy-0.3.0/requirements-dev.lock +114 -0
  22. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/requirements.lock +2 -0
  23. WebGestaltPy-0.3.0/src/lib.rs +427 -0
  24. WebGestaltPy-0.3.0/test.py +29 -0
  25. WebGestaltPy-0.1.1/docs/Usage/index.md +0 -8
  26. WebGestaltPy-0.1.1/docs/index.md +0 -11
  27. WebGestaltPy-0.1.1/mkdocs.yml +0 -23
  28. WebGestaltPy-0.1.1/requirements-dev.lock +0 -44
  29. WebGestaltPy-0.1.1/src/lib.rs +0 -171
  30. WebGestaltPy-0.1.1/test.py +0 -19
  31. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/data/genelist.txt +0 -0
  32. /WebGestaltPy-0.1.1/data/ktest.gmt → /WebGestaltPy-0.3.0/data/kegg.gmt +0 -0
  33. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/data/reference.txt +0 -0
  34. /WebGestaltPy-0.1.1/data/test.rnk → /WebGestaltPy-0.3.0/data/second_test.rnk +0 -0
  35. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/docs/assets/favicon-32x32.png +0 -0
  36. {WebGestaltPy-0.1.1 → WebGestaltPy-0.3.0}/docs/assets/logo.svg +0 -0
@@ -119,3 +119,40 @@ jobs:
119
119
  with:
120
120
  command: upload
121
121
  args: --non-interactive --skip-existing *
122
+
123
+ build-docs:
124
+ runs-on: ubuntu-latest
125
+ needs: release
126
+ steps:
127
+ - uses: actions/checkout@v4
128
+ - name: Configure Git Credentials
129
+ run: |
130
+ git config user.name github-actions[bot]
131
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
132
+ - uses: actions/setup-python@v4
133
+ with:
134
+ python-version: 3.12
135
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
136
+ - uses: actions/cache@v3
137
+ with:
138
+ key: mkdocs-material-${{ env.cache_id }}
139
+ path: .cache
140
+ restore-keys: |
141
+ mkdocs-material-
142
+ - name: Install mkdocs-material
143
+ run: pip install mkdocs-material
144
+ - name: Install mike
145
+ run: pip install mike
146
+ - uses: PyO3/maturin-action@v1
147
+ with:
148
+ command: build
149
+ - run: pip install .
150
+ - run: python build_docs.py
151
+ - name: Extract branch name
152
+ shell: bash
153
+ run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
154
+ id: extract_branch
155
+ - name: Deploy with mike 🚀
156
+ run: |
157
+ git fetch origin gh-pages
158
+ mike deploy --update-aliases --push ${{ steps.extract_branch.outputs.branch }} latest
@@ -24,10 +24,18 @@ jobs:
24
24
  path: .cache
25
25
  restore-keys: |
26
26
  mkdocs-material-
27
- - run: pip install mkdocs-material
27
+ - name: Install mkdocs-material
28
+ run: pip install mkdocs-material
29
+ - name: Install mike
30
+ run: pip install mike
28
31
  - uses: PyO3/maturin-action@v1
29
32
  with:
30
33
  command: build
31
- - run: pip install .
32
- - run: python build_docs.py
33
- - run: mkdocs gh-deploy --force
34
+ - name: Install package
35
+ run: pip install .
36
+ - name: Build documentation
37
+ run: python build_docs.py
38
+ - name: Deploy with mike 🚀
39
+ run: |
40
+ git fetch origin gh-pages
41
+ mike deploy --push dev
@@ -78,3 +78,6 @@ docs/_build/
78
78
 
79
79
  # Pyenv
80
80
  .python-version
81
+
82
+ # Autogen documentation
83
+ docs/reference/*
@@ -0,0 +1,15 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/crate-ci/typos
5
+ rev: v1.22.7
6
+ hooks:
7
+ - id: typos
8
+ - repo: local
9
+ hooks:
10
+ - id: rustfmt
11
+ name: rustfmt
12
+ description: Check if all files follow the rustfmt style
13
+ entry: cargo fmt --all -- --check --color always
14
+ language: system
15
+ pass_filenames: false
@@ -219,6 +219,20 @@ dependencies = [
219
219
  "syn 1.0.109",
220
220
  ]
221
221
 
222
+ [[package]]
223
+ name = "ndarray"
224
+ version = "0.15.6"
225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
226
+ checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32"
227
+ dependencies = [
228
+ "matrixmultiply",
229
+ "num-complex",
230
+ "num-integer",
231
+ "num-traits",
232
+ "rawpointer",
233
+ "rayon",
234
+ ]
235
+
222
236
  [[package]]
223
237
  name = "num-complex"
224
238
  version = "0.4.4"
@@ -302,18 +316,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
302
316
 
303
317
  [[package]]
304
318
  name = "proc-macro2"
305
- version = "1.0.69"
319
+ version = "1.0.85"
306
320
  source = "registry+https://github.com/rust-lang/crates.io-index"
307
- checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
321
+ checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23"
308
322
  dependencies = [
309
323
  "unicode-ident",
310
324
  ]
311
325
 
312
326
  [[package]]
313
327
  name = "pyo3"
314
- version = "0.20.0"
328
+ version = "0.20.2"
315
329
  source = "registry+https://github.com/rust-lang/crates.io-index"
316
- checksum = "04e8453b658fe480c3e70c8ed4e3d3ec33eb74988bd186561b0cc66b85c3bc4b"
330
+ checksum = "9a89dc7a5850d0e983be1ec2a463a171d20990487c3cfcd68b5363f1ee3d6fe0"
317
331
  dependencies = [
318
332
  "cfg-if",
319
333
  "indoc",
@@ -328,9 +342,9 @@ dependencies = [
328
342
 
329
343
  [[package]]
330
344
  name = "pyo3-build-config"
331
- version = "0.20.0"
345
+ version = "0.20.2"
332
346
  source = "registry+https://github.com/rust-lang/crates.io-index"
333
- checksum = "a96fe70b176a89cff78f2fa7b3c930081e163d5379b4dcdf993e3ae29ca662e5"
347
+ checksum = "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be"
334
348
  dependencies = [
335
349
  "once_cell",
336
350
  "target-lexicon",
@@ -338,9 +352,9 @@ dependencies = [
338
352
 
339
353
  [[package]]
340
354
  name = "pyo3-ffi"
341
- version = "0.20.0"
355
+ version = "0.20.2"
342
356
  source = "registry+https://github.com/rust-lang/crates.io-index"
343
- checksum = "214929900fd25e6604661ed9cf349727c8920d47deff196c4e28165a6ef2a96b"
357
+ checksum = "dbb7dec17e17766b46bca4f1a4215a85006b4c2ecde122076c562dd058da6cf1"
344
358
  dependencies = [
345
359
  "libc",
346
360
  "pyo3-build-config",
@@ -348,33 +362,33 @@ dependencies = [
348
362
 
349
363
  [[package]]
350
364
  name = "pyo3-macros"
351
- version = "0.20.0"
365
+ version = "0.20.2"
352
366
  source = "registry+https://github.com/rust-lang/crates.io-index"
353
- checksum = "dac53072f717aa1bfa4db832b39de8c875b7c7af4f4a6fe93cdbf9264cf8383b"
367
+ checksum = "05f738b4e40d50b5711957f142878cfa0f28e054aa0ebdfc3fd137a843f74ed3"
354
368
  dependencies = [
355
369
  "proc-macro2",
356
370
  "pyo3-macros-backend",
357
371
  "quote",
358
- "syn 2.0.39",
372
+ "syn 2.0.66",
359
373
  ]
360
374
 
361
375
  [[package]]
362
376
  name = "pyo3-macros-backend"
363
- version = "0.20.0"
377
+ version = "0.20.2"
364
378
  source = "registry+https://github.com/rust-lang/crates.io-index"
365
- checksum = "7774b5a8282bd4f25f803b1f0d945120be959a36c72e08e7cd031c792fdfd424"
379
+ checksum = "0fc910d4851847827daf9d6cdd4a823fbdaab5b8818325c5e97a86da79e8881f"
366
380
  dependencies = [
367
381
  "heck",
368
382
  "proc-macro2",
369
383
  "quote",
370
- "syn 2.0.39",
384
+ "syn 2.0.66",
371
385
  ]
372
386
 
373
387
  [[package]]
374
388
  name = "quote"
375
- version = "1.0.33"
389
+ version = "1.0.36"
376
390
  source = "registry+https://github.com/rust-lang/crates.io-index"
377
- checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
391
+ checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
378
392
  dependencies = [
379
393
  "proc-macro2",
380
394
  ]
@@ -483,22 +497,33 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
483
497
 
484
498
  [[package]]
485
499
  name = "serde"
486
- version = "1.0.192"
500
+ version = "1.0.203"
487
501
  source = "registry+https://github.com/rust-lang/crates.io-index"
488
- checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
502
+ checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
489
503
  dependencies = [
490
504
  "serde_derive",
491
505
  ]
492
506
 
493
507
  [[package]]
494
508
  name = "serde_derive"
495
- version = "1.0.192"
509
+ version = "1.0.203"
496
510
  source = "registry+https://github.com/rust-lang/crates.io-index"
497
- checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
511
+ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
498
512
  dependencies = [
499
513
  "proc-macro2",
500
514
  "quote",
501
- "syn 2.0.39",
515
+ "syn 2.0.66",
516
+ ]
517
+
518
+ [[package]]
519
+ name = "serde_json"
520
+ version = "1.0.117"
521
+ source = "registry+https://github.com/rust-lang/crates.io-index"
522
+ checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"
523
+ dependencies = [
524
+ "itoa",
525
+ "ryu",
526
+ "serde",
502
527
  ]
503
528
 
504
529
  [[package]]
@@ -546,9 +571,9 @@ dependencies = [
546
571
 
547
572
  [[package]]
548
573
  name = "syn"
549
- version = "2.0.39"
574
+ version = "2.0.66"
550
575
  source = "registry+https://github.com/rust-lang/crates.io-index"
551
- checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
576
+ checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
552
577
  dependencies = [
553
578
  "proc-macro2",
554
579
  "quote",
@@ -593,21 +618,23 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
593
618
 
594
619
  [[package]]
595
620
  name = "webgestalt_lib"
596
- version = "0.1.0"
621
+ version = "0.3.1"
597
622
  source = "registry+https://github.com/rust-lang/crates.io-index"
598
- checksum = "c001c59ee0aee8eba0a7714e4fa36b6e4ba466be9f48f261d2fa5491db6022a7"
623
+ checksum = "0af63e3cbb1532cdfa4002ca11c961840c6dbeee6120911d55dcc165df0b3dbe"
599
624
  dependencies = [
600
625
  "ahash",
601
626
  "csv",
627
+ "ndarray",
602
628
  "rand",
603
629
  "rayon",
604
630
  "serde",
631
+ "serde_json",
605
632
  "statrs",
606
633
  ]
607
634
 
608
635
  [[package]]
609
636
  name = "webgestaltpy"
610
- version = "0.1.1"
637
+ version = "0.3.0"
611
638
  dependencies = [
612
639
  "pyo3",
613
640
  "rustc-hash",
@@ -698,5 +725,5 @@ checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b"
698
725
  dependencies = [
699
726
  "proc-macro2",
700
727
  "quote",
701
- "syn 2.0.39",
728
+ "syn 2.0.66",
702
729
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "webgestaltpy"
3
- version = "0.1.1"
3
+ version = "0.3.0"
4
4
  edition = "2021"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -9,6 +9,6 @@ name = "webgestaltpy"
9
9
  crate-type = ["cdylib"]
10
10
 
11
11
  [dependencies]
12
- pyo3 = "0.20.0"
12
+ pyo3 = "0.20.2"
13
13
  rustc-hash = "1.1.0"
14
- webgestalt_lib = "0.1.0"
14
+ webgestalt_lib = "0.3.1"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: WebGestaltPy
3
- Version: 0.1.1
3
+ Version: 0.3.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -30,11 +30,13 @@ pip install webgestaltpy
30
30
  WebGestaltPy uses [maturin](https://www.maturin.rs) and [rye](https://rye-up.com) to build the full project. To build WebGestaltPy, run the following commands
31
31
 
32
32
  ```bash
33
+ git clone https://github.com/bzhanglab/webgestaltpy.git
34
+ cd webgestaltpy
33
35
  rye sync # download correct python version and install dependencies
34
36
  rye tools install maturin
35
37
  rye run python -m ensurepip --default-pip # makes sure maturin can run correctly
36
38
  rye shell # initialize shell so the python command executes the local version
37
- maturin develop # -r # add -r to build the full release version of the rust library.
39
+ maturin develop # add -r to build and install the full release version of the rust library.
38
40
  python test.py # run the test script
39
41
  ```
40
42
 
@@ -21,10 +21,12 @@ pip install webgestaltpy
21
21
  WebGestaltPy uses [maturin](https://www.maturin.rs) and [rye](https://rye-up.com) to build the full project. To build WebGestaltPy, run the following commands
22
22
 
23
23
  ```bash
24
+ git clone https://github.com/bzhanglab/webgestaltpy.git
25
+ cd webgestaltpy
24
26
  rye sync # download correct python version and install dependencies
25
27
  rye tools install maturin
26
28
  rye run python -m ensurepip --default-pip # makes sure maturin can run correctly
27
29
  rye shell # initialize shell so the python command executes the local version
28
- maturin develop # -r # add -r to build the full release version of the rust library.
30
+ maturin develop # add -r to build and install the full release version of the rust library.
29
31
  python test.py # run the test script
30
32
  ```
@@ -0,0 +1,2 @@
1
+ [files]
2
+ extend-exclude = ["data/*"]
@@ -1,10 +1,26 @@
1
1
  import os
2
2
  import webgestaltpy
3
3
 
4
- OUTPUT_DIR = "docs/reference"
4
+ """
5
+ Auto-generation of the Reference section for the documentation website.
6
+
7
+ Needs to be run before website is generated. Currently, this script is run automatically in the github action.
8
+
9
+ Configure the order of the functions by changing the PRIORITY variable in the config section.
10
+
11
+ To skip a function or variable, add the variable to SKIP.
12
+ """
13
+
14
+
5
15
  ADJUSTED_HEADERS = ["#" * i for i in range(1, 7)]
6
- print(ADJUSTED_HEADERS)
7
- PRIORITY = ["webgestaltpy", "ora_from_files", "gsea_from_files"]
16
+
17
+ ######################
18
+ ####### CONFIG #######
19
+ ######################
20
+
21
+ OUTPUT_DIR = "docs/reference"
22
+ PRIORITY = ["ora", "meta_ora", "gsea", "meta_gsea", "nta", "NTAMethod"]
23
+ SKIP = ["webgestaltpy"]
8
24
 
9
25
 
10
26
  def sanitize_file_name(name) -> str:
@@ -15,6 +31,8 @@ def sanitize_file_name(name) -> str:
15
31
  def process_method(name):
16
32
  func = getattr(webgestaltpy, name)
17
33
  doc_string = func.__doc__
34
+ if doc_string is None:
35
+ return ""
18
36
  new_doc_string = ""
19
37
  for line in doc_string.split("\n"):
20
38
  splits = line.split(" ")
@@ -32,18 +50,20 @@ def process_method(name):
32
50
 
33
51
  def start():
34
52
  all_functions = dir(webgestaltpy)
35
- functions = [f for f in all_functions if "__" not in f]
53
+ functions = [f for f in all_functions if "__" not in f and f not in SKIP]
36
54
  new_content = "# Reference\nDocumentation for each function in webgestaltpy.\n\n## Functions\n\n"
37
55
  if not os.path.exists(OUTPUT_DIR):
38
56
  os.makedirs(OUTPUT_DIR)
39
57
  for p in PRIORITY:
40
58
  if p in functions:
41
59
  path = process_method(p)
42
- new_content += f"- [{p}](./{path}.md)\n"
60
+ if path != "":
61
+ new_content += f"- [{p}](./{path}.md)\n"
43
62
  for f in functions:
44
63
  if f not in PRIORITY:
45
64
  path = process_method(f)
46
- new_content += f"- [{f}](./{path}.md)\n"
65
+ if path != "":
66
+ new_content += f"- [{f}](./{path}.md)\n"
47
67
  with open(OUTPUT_DIR + "/index.md", "w") as w:
48
68
  w.write(new_content)
49
69