discotoolkit 1.2.1__tar.gz → 1.2.2__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.
Files changed (27) hide show
  1. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/PKG-INFO +5 -5
  2. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/README.md +4 -4
  3. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/GlobalVariable.py +3 -2
  4. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/__init__.py +1 -1
  5. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit.egg-info/PKG-INFO +5 -5
  6. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/setup.py +1 -1
  7. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/tests/test_docs.py +22 -0
  8. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/tests/test_server_contract.py +1 -1
  9. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/MANIFEST.in +0 -0
  10. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/CELLiD.py +0 -0
  11. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/CellMapper.py +0 -0
  12. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/DiscoClass.py +0 -0
  13. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/DownloadDiscoData.py +0 -0
  14. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/GeneSearch.py +0 -0
  15. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/GetMetadata.py +0 -0
  16. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit/Utilities.py +0 -0
  17. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit.egg-info/SOURCES.txt +0 -0
  18. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit.egg-info/dependency_links.txt +0 -0
  19. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit.egg-info/requires.txt +0 -0
  20. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/discotoolkit.egg-info/top_level.txt +0 -0
  21. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/pyproject.toml +0 -0
  22. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/requirements.txt +0 -0
  23. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/setup.cfg +0 -0
  24. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/tests/test_gene_search.py +0 -0
  25. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/tests/test_reference_loading.py +0 -0
  26. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/tests/test_settings.py +0 -0
  27. {discotoolkit-1.2.1 → discotoolkit-1.2.2}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: discotoolkit
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: DISCOtoolkit is an python package that allows users to access data and use the tools provided by the DISCO database.
5
5
  Home-page: https://disco.bii.a-star.edu.sg/
6
6
  Author: Li Mengwei, Rom Uddamvathanak
@@ -43,7 +43,7 @@ Dynamic: summary
43
43
  -->
44
44
  [![Documentation](https://img.shields.io/badge/docs-disco.bii.a--star.edu.sg-blue)](https://disco.bii.a-star.edu.sg/v1/docs/toolkit/guide/) [![Downloads](https://static.pepy.tech/personalized-badge/discotoolkit?period=total&units=international_system&left_color=black&right_color=orange&left_text=Downloads)](https://pepy.tech/project/discotoolkit) [![PyPI version](https://img.shields.io/pypi/v/discotoolkit)](https://pypi.org/project/discotoolkit)
45
45
 
46
- # DISCOtoolkit 1.2.1
46
+ # DISCOtoolkit 1.2.2
47
47
 
48
48
  DISCOtoolkit is a Python package for accessing the data and tools of the [DISCO database](https://disco.bii.a-star.edu.sg/) (DISCO v1). Read the documentation, with tutorials and the API reference, at [disco.bii.a-star.edu.sg/v1/docs/toolkit/guide](https://disco.bii.a-star.edu.sg/v1/docs/toolkit/guide/).
49
49
 
@@ -52,7 +52,7 @@ DISCOtoolkit is a Python package for accessing the data and tools of the [DISCO
52
52
  - CELLiD: cell type annotation
53
53
  - scEnrichment: gene set enrichment using DISCO DEGs
54
54
 
55
- > **DISCO v1 and v2.** The toolkit talks to **DISCO v1** by default. DISCO v2 has its own R package ([DISCOtoolkit](https://github.com/JinmiaoChenLab/DISCOtoolkit)); the Python package can still be pointed at a v2 server, see [Choosing a server](#choosing-a-server).
55
+ > **Use DISCO v1.** The toolkit is developed and tested against **DISCO v1**, which is the default, and that is the server we recommend. DISCO v2 has its own R package ([DISCOtoolkit](https://github.com/JinmiaoChenLab/DISCOtoolkit)). The Python package can be pointed at a v2 server, but that is not tested; see [Choosing a server](#choosing-a-server).
56
56
 
57
57
  ## Quickstart (Google Colab)
58
58
 
@@ -102,7 +102,7 @@ python -m pip install -U discotoolkit
102
102
  import discotoolkit as dt
103
103
 
104
104
  dt.get_server() # 'https://disco.bii.a-star.edu.sg/disco_v3_api/' (DISCO v1, the default)
105
- dt.set_server("v2") # DISCO v2
105
+ dt.set_server("v2") # DISCO v2 (not tested; DISCO v1 is the supported server)
106
106
  dt.set_server("https://my.server/disco_v3_api/") # any server with the same API
107
107
  ```
108
108
 
@@ -117,7 +117,7 @@ python tests/test_settings.py # offline: server selection logic
117
117
  python tests/test_version.py # offline: setup.py and __init__.py agree on the version
118
118
  python tests/test_docs.py # offline: notebooks are clean, every public function is in the API reference
119
119
  python tests/test_server_contract.py # online: does the server answer everything the toolkit needs?
120
- python tests/test_server_contract.py https://immunesinglecell.org/disco_v3_api/ # check another server
120
+ python tests/test_server_contract.py <api root> # check another server
121
121
  ```
122
122
 
123
123
  GitHub Actions runs these, and installs the package on Python 3.9-3.12, on every push. Maintainers: see [RELEASING.md](RELEASING.md) for how a release, and its documentation, is published.
@@ -8,7 +8,7 @@
8
8
  -->
9
9
  [![Documentation](https://img.shields.io/badge/docs-disco.bii.a--star.edu.sg-blue)](https://disco.bii.a-star.edu.sg/v1/docs/toolkit/guide/) [![Downloads](https://static.pepy.tech/personalized-badge/discotoolkit?period=total&units=international_system&left_color=black&right_color=orange&left_text=Downloads)](https://pepy.tech/project/discotoolkit) [![PyPI version](https://img.shields.io/pypi/v/discotoolkit)](https://pypi.org/project/discotoolkit)
10
10
 
11
- # DISCOtoolkit 1.2.1
11
+ # DISCOtoolkit 1.2.2
12
12
 
13
13
  DISCOtoolkit is a Python package for accessing the data and tools of the [DISCO database](https://disco.bii.a-star.edu.sg/) (DISCO v1). Read the documentation, with tutorials and the API reference, at [disco.bii.a-star.edu.sg/v1/docs/toolkit/guide](https://disco.bii.a-star.edu.sg/v1/docs/toolkit/guide/).
14
14
 
@@ -17,7 +17,7 @@ DISCOtoolkit is a Python package for accessing the data and tools of the [DISCO
17
17
  - CELLiD: cell type annotation
18
18
  - scEnrichment: gene set enrichment using DISCO DEGs
19
19
 
20
- > **DISCO v1 and v2.** The toolkit talks to **DISCO v1** by default. DISCO v2 has its own R package ([DISCOtoolkit](https://github.com/JinmiaoChenLab/DISCOtoolkit)); the Python package can still be pointed at a v2 server, see [Choosing a server](#choosing-a-server).
20
+ > **Use DISCO v1.** The toolkit is developed and tested against **DISCO v1**, which is the default, and that is the server we recommend. DISCO v2 has its own R package ([DISCOtoolkit](https://github.com/JinmiaoChenLab/DISCOtoolkit)). The Python package can be pointed at a v2 server, but that is not tested; see [Choosing a server](#choosing-a-server).
21
21
 
22
22
  ## Quickstart (Google Colab)
23
23
 
@@ -67,7 +67,7 @@ python -m pip install -U discotoolkit
67
67
  import discotoolkit as dt
68
68
 
69
69
  dt.get_server() # 'https://disco.bii.a-star.edu.sg/disco_v3_api/' (DISCO v1, the default)
70
- dt.set_server("v2") # DISCO v2
70
+ dt.set_server("v2") # DISCO v2 (not tested; DISCO v1 is the supported server)
71
71
  dt.set_server("https://my.server/disco_v3_api/") # any server with the same API
72
72
  ```
73
73
 
@@ -82,7 +82,7 @@ python tests/test_settings.py # offline: server selection logic
82
82
  python tests/test_version.py # offline: setup.py and __init__.py agree on the version
83
83
  python tests/test_docs.py # offline: notebooks are clean, every public function is in the API reference
84
84
  python tests/test_server_contract.py # online: does the server answer everything the toolkit needs?
85
- python tests/test_server_contract.py https://immunesinglecell.org/disco_v3_api/ # check another server
85
+ python tests/test_server_contract.py <api root> # check another server
86
86
  ```
87
87
 
88
88
  GitHub Actions runs these, and installs the package on Python 3.9-3.12, on every push. Maintainers: see [RELEASING.md](RELEASING.md) for how a release, and its documentation, is published.
@@ -2,8 +2,9 @@
2
2
  Settings shared by the rest of the package: logging, the request timeout and --
3
3
  most importantly -- which DISCO server the toolkit talks to.
4
4
 
5
- By default the toolkit talks to DISCO v1 (https://disco.bii.a-star.edu.sg). To use
6
- another server:
5
+ By default the toolkit talks to DISCO v1 (https://disco.bii.a-star.edu.sg). DISCO v1 is the
6
+ server the toolkit is developed and tested against, and the one we recommend. Other servers
7
+ are possible but untested (the "v2" preset in particular):
7
8
 
8
9
  import discotoolkit as dt
9
10
  dt.set_server("v2") # a named preset
@@ -5,4 +5,4 @@ from .CELLiD import *
5
5
  from .GeneSearch import *
6
6
  from .GlobalVariable import set_server, get_server
7
7
 
8
- __version__ = "1.2.1"
8
+ __version__ = "1.2.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: discotoolkit
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: DISCOtoolkit is an python package that allows users to access data and use the tools provided by the DISCO database.
5
5
  Home-page: https://disco.bii.a-star.edu.sg/
6
6
  Author: Li Mengwei, Rom Uddamvathanak
@@ -43,7 +43,7 @@ Dynamic: summary
43
43
  -->
44
44
  [![Documentation](https://img.shields.io/badge/docs-disco.bii.a--star.edu.sg-blue)](https://disco.bii.a-star.edu.sg/v1/docs/toolkit/guide/) [![Downloads](https://static.pepy.tech/personalized-badge/discotoolkit?period=total&units=international_system&left_color=black&right_color=orange&left_text=Downloads)](https://pepy.tech/project/discotoolkit) [![PyPI version](https://img.shields.io/pypi/v/discotoolkit)](https://pypi.org/project/discotoolkit)
45
45
 
46
- # DISCOtoolkit 1.2.1
46
+ # DISCOtoolkit 1.2.2
47
47
 
48
48
  DISCOtoolkit is a Python package for accessing the data and tools of the [DISCO database](https://disco.bii.a-star.edu.sg/) (DISCO v1). Read the documentation, with tutorials and the API reference, at [disco.bii.a-star.edu.sg/v1/docs/toolkit/guide](https://disco.bii.a-star.edu.sg/v1/docs/toolkit/guide/).
49
49
 
@@ -52,7 +52,7 @@ DISCOtoolkit is a Python package for accessing the data and tools of the [DISCO
52
52
  - CELLiD: cell type annotation
53
53
  - scEnrichment: gene set enrichment using DISCO DEGs
54
54
 
55
- > **DISCO v1 and v2.** The toolkit talks to **DISCO v1** by default. DISCO v2 has its own R package ([DISCOtoolkit](https://github.com/JinmiaoChenLab/DISCOtoolkit)); the Python package can still be pointed at a v2 server, see [Choosing a server](#choosing-a-server).
55
+ > **Use DISCO v1.** The toolkit is developed and tested against **DISCO v1**, which is the default, and that is the server we recommend. DISCO v2 has its own R package ([DISCOtoolkit](https://github.com/JinmiaoChenLab/DISCOtoolkit)). The Python package can be pointed at a v2 server, but that is not tested; see [Choosing a server](#choosing-a-server).
56
56
 
57
57
  ## Quickstart (Google Colab)
58
58
 
@@ -102,7 +102,7 @@ python -m pip install -U discotoolkit
102
102
  import discotoolkit as dt
103
103
 
104
104
  dt.get_server() # 'https://disco.bii.a-star.edu.sg/disco_v3_api/' (DISCO v1, the default)
105
- dt.set_server("v2") # DISCO v2
105
+ dt.set_server("v2") # DISCO v2 (not tested; DISCO v1 is the supported server)
106
106
  dt.set_server("https://my.server/disco_v3_api/") # any server with the same API
107
107
  ```
108
108
 
@@ -117,7 +117,7 @@ python tests/test_settings.py # offline: server selection logic
117
117
  python tests/test_version.py # offline: setup.py and __init__.py agree on the version
118
118
  python tests/test_docs.py # offline: notebooks are clean, every public function is in the API reference
119
119
  python tests/test_server_contract.py # online: does the server answer everything the toolkit needs?
120
- python tests/test_server_contract.py https://immunesinglecell.org/disco_v3_api/ # check another server
120
+ python tests/test_server_contract.py <api root> # check another server
121
121
  ```
122
122
 
123
123
  GitHub Actions runs these, and installs the package on Python 3.9-3.12, on every push. Maintainers: see [RELEASING.md](RELEASING.md) for how a release, and its documentation, is published.
@@ -6,7 +6,7 @@ with open("requirements.txt", "r") as f:
6
6
 
7
7
  setup(
8
8
  name='discotoolkit',
9
- version="1.2.1",
9
+ version="1.2.2",
10
10
  url='https://disco.bii.a-star.edu.sg/',
11
11
  author='Li Mengwei, Rom Uddamvathanak',
12
12
  author_email='uddamvathanak_rom@immunol.a-star.edu.sg',
@@ -72,6 +72,28 @@ def test_api_reference_names_only_things_that_exist():
72
72
  assert re.search(r"^(def|class)\s+%s\b" % name, source, re.M), "%s.%s is gone" % (module, name)
73
73
 
74
74
 
75
+ def test_tutorials_link_to_pages_not_to_notebook_files_and_not_to_the_v2_site():
76
+ problems = []
77
+ for path in sorted(glob.glob(os.path.join(ROOT, "docs", "*.ipynb"))):
78
+ text = "\n".join("".join(c["source"]) for c in json.load(open(path, encoding="utf-8"))["cells"])
79
+ name = os.path.basename(path)
80
+ # a relative link to another .ipynb works on GitHub but is a dead link on the site
81
+ for target in re.findall(r"\]\(([^)\s]+)\)", text):
82
+ if target.endswith(".ipynb") and not target.startswith("http"):
83
+ problems.append("%s links to the file %s; link to the page on the docs site" % (name, target))
84
+ if "immunesinglecell.org" in text:
85
+ problems.append("%s sends readers to the DISCO V2 site; V1 is the supported server" % name)
86
+ assert not problems, "; ".join(problems)
87
+
88
+
89
+ def test_the_changelog_has_notes_for_the_current_version():
90
+ # the release workflow builds the GitHub Release text from it, and refuses a version without notes
91
+ version = re.search(r'__version__\s*=\s*"([^"]+)"', read("discotoolkit/__init__.py")).group(1)
92
+ assert re.search(r"^## %s\b" % re.escape(version), read("CHANGELOG.md"), re.M), (
93
+ "add a '## %s' section to CHANGELOG.md before releasing" % version
94
+ )
95
+
96
+
75
97
  def _run_all():
76
98
  tests = [(n, f) for n, f in sorted(globals().items()) if n.startswith("test_") and callable(f)]
77
99
  failed = 0
@@ -5,7 +5,7 @@ Needs only `requests`, so it runs anywhere -- including a fresh Colab notebook:
5
5
 
6
6
  !pip install requests
7
7
  !python tests/test_server_contract.py # DISCO v1 (default)
8
- !python tests/test_server_contract.py https://immunesinglecell.org/disco_v3_api/ # another server
8
+ !python tests/test_server_contract.py <api root> # another server
9
9
 
10
10
  or with pytest: DISCO_API_URL=<api root> pytest tests/test_server_contract.py
11
11
 
File without changes
File without changes