webgestaltpy 0.1.1__tar.gz → 0.2.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 (31) hide show
  1. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/.github/workflows/CI.yml +37 -0
  2. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/.github/workflows/doc.yaml +8 -2
  3. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/.gitignore +3 -0
  4. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/Cargo.lock +13 -13
  5. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/Cargo.toml +3 -3
  6. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/PKG-INFO +4 -2
  7. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/README.md +3 -1
  8. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/build_docs.py +26 -6
  9. WebGestaltPy-0.2.0/data/second_genelist.txt +474 -0
  10. WebGestaltPy-0.2.0/data/test.rnk +11150 -0
  11. WebGestaltPy-0.2.0/docs/Usage/index.md +38 -0
  12. WebGestaltPy-0.2.0/docs/data.tar.gz +0 -0
  13. WebGestaltPy-0.2.0/docs/index.md +15 -0
  14. WebGestaltPy-0.2.0/docs/overrides/main.html +8 -0
  15. WebGestaltPy-0.2.0/mkdocs.yml +43 -0
  16. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/pyproject.toml +1 -0
  17. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/requirements-dev.lock +4 -0
  18. WebGestaltPy-0.2.0/src/lib.rs +318 -0
  19. WebGestaltPy-0.2.0/test.py +24 -0
  20. WebGestaltPy-0.1.1/docs/Usage/index.md +0 -8
  21. WebGestaltPy-0.1.1/docs/index.md +0 -11
  22. WebGestaltPy-0.1.1/mkdocs.yml +0 -23
  23. WebGestaltPy-0.1.1/src/lib.rs +0 -171
  24. WebGestaltPy-0.1.1/test.py +0 -19
  25. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/data/genelist.txt +0 -0
  26. /WebGestaltPy-0.1.1/data/ktest.gmt → /WebGestaltPy-0.2.0/data/kegg.gmt +0 -0
  27. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/data/reference.txt +0 -0
  28. /WebGestaltPy-0.1.1/data/test.rnk → /WebGestaltPy-0.2.0/data/second_test.rnk +0 -0
  29. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/docs/assets/favicon-32x32.png +0 -0
  30. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/docs/assets/logo.svg +0 -0
  31. {WebGestaltPy-0.1.1 → WebGestaltPy-0.2.0}/requirements.lock +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-pagess
158
+ mike deploy --update-aliases --push ${{ steps.extract_branch.outputs.branch }} latest
@@ -24,10 +24,16 @@ 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
34
  - run: pip install .
32
35
  - run: python build_docs.py
33
- - run: mkdocs gh-deploy --force
36
+ - name: Deploy with mike 🚀
37
+ run: |
38
+ git fetch origin gh-pages
39
+ 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/*
@@ -311,9 +311,9 @@ dependencies = [
311
311
 
312
312
  [[package]]
313
313
  name = "pyo3"
314
- version = "0.20.0"
314
+ version = "0.20.2"
315
315
  source = "registry+https://github.com/rust-lang/crates.io-index"
316
- checksum = "04e8453b658fe480c3e70c8ed4e3d3ec33eb74988bd186561b0cc66b85c3bc4b"
316
+ checksum = "9a89dc7a5850d0e983be1ec2a463a171d20990487c3cfcd68b5363f1ee3d6fe0"
317
317
  dependencies = [
318
318
  "cfg-if",
319
319
  "indoc",
@@ -328,9 +328,9 @@ dependencies = [
328
328
 
329
329
  [[package]]
330
330
  name = "pyo3-build-config"
331
- version = "0.20.0"
331
+ version = "0.20.2"
332
332
  source = "registry+https://github.com/rust-lang/crates.io-index"
333
- checksum = "a96fe70b176a89cff78f2fa7b3c930081e163d5379b4dcdf993e3ae29ca662e5"
333
+ checksum = "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be"
334
334
  dependencies = [
335
335
  "once_cell",
336
336
  "target-lexicon",
@@ -338,9 +338,9 @@ dependencies = [
338
338
 
339
339
  [[package]]
340
340
  name = "pyo3-ffi"
341
- version = "0.20.0"
341
+ version = "0.20.2"
342
342
  source = "registry+https://github.com/rust-lang/crates.io-index"
343
- checksum = "214929900fd25e6604661ed9cf349727c8920d47deff196c4e28165a6ef2a96b"
343
+ checksum = "dbb7dec17e17766b46bca4f1a4215a85006b4c2ecde122076c562dd058da6cf1"
344
344
  dependencies = [
345
345
  "libc",
346
346
  "pyo3-build-config",
@@ -348,9 +348,9 @@ dependencies = [
348
348
 
349
349
  [[package]]
350
350
  name = "pyo3-macros"
351
- version = "0.20.0"
351
+ version = "0.20.2"
352
352
  source = "registry+https://github.com/rust-lang/crates.io-index"
353
- checksum = "dac53072f717aa1bfa4db832b39de8c875b7c7af4f4a6fe93cdbf9264cf8383b"
353
+ checksum = "05f738b4e40d50b5711957f142878cfa0f28e054aa0ebdfc3fd137a843f74ed3"
354
354
  dependencies = [
355
355
  "proc-macro2",
356
356
  "pyo3-macros-backend",
@@ -360,9 +360,9 @@ dependencies = [
360
360
 
361
361
  [[package]]
362
362
  name = "pyo3-macros-backend"
363
- version = "0.20.0"
363
+ version = "0.20.2"
364
364
  source = "registry+https://github.com/rust-lang/crates.io-index"
365
- checksum = "7774b5a8282bd4f25f803b1f0d945120be959a36c72e08e7cd031c792fdfd424"
365
+ checksum = "0fc910d4851847827daf9d6cdd4a823fbdaab5b8818325c5e97a86da79e8881f"
366
366
  dependencies = [
367
367
  "heck",
368
368
  "proc-macro2",
@@ -593,9 +593,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
593
593
 
594
594
  [[package]]
595
595
  name = "webgestalt_lib"
596
- version = "0.1.0"
596
+ version = "0.2.0"
597
597
  source = "registry+https://github.com/rust-lang/crates.io-index"
598
- checksum = "c001c59ee0aee8eba0a7714e4fa36b6e4ba466be9f48f261d2fa5491db6022a7"
598
+ checksum = "c25835d6a6fa0cdbf6164306c0aafa046f6af630dfbfd9ee0c1d2307e36cfb44"
599
599
  dependencies = [
600
600
  "ahash",
601
601
  "csv",
@@ -607,7 +607,7 @@ dependencies = [
607
607
 
608
608
  [[package]]
609
609
  name = "webgestaltpy"
610
- version = "0.1.1"
610
+ version = "0.2.0"
611
611
  dependencies = [
612
612
  "pyo3",
613
613
  "rustc-hash",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "webgestaltpy"
3
- version = "0.1.1"
3
+ version = "0.2.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.2.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: WebGestaltPy
3
- Version: 0.1.1
3
+ Version: 0.2.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
  ```
@@ -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"]
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