Age | Commit message (Collapse) | Author |
|
* gn3/auth/authentication/oauth2/models/oauth2token.py
(introspect_token, check_permission): Delete "pylint:
disable=[no-self-use]". R0022: Useless option value for 'disable',
'no-self-use' was moved to an optional extension, see
https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers.
* gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py
(delete_authorization_code): Ditto.
* tests/unit/test_heatmaps.py (test_cluster_traits):
Delete "pylint: disable=R0201". R0022: Useless option value for
'disable', 'no-self-use' was moved to an optional extension, see
https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers.
* tests/unit/computations/test_partial_correlations.py
(test_tissue_correlation): Ditto.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Use pytest's `mark` feature to explicitly categorise the tests and run them
per category
|
|
Notes:
https://github.com/genenetwork/genenetwork3/pull/56#issuecomment-973798918
* From the notes above, the assert_allclose is a better function for figuring
out what failed, unlike the allclose that simply just returns a True/False
value.
This commit restores the use of the assert_allclose function, and then
disables the linter error due to the fact that there is no use of the `self`
keyword.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Fix some obvious linting errors and remove obsolete code
|
|
Floating point numbers should only be compared approximately. Different
implementations of functions might produce slightly different results.
* tests/unit/computations/test_correlation.py: Import assert_almost_equal from
numpy.testing.
(TestCorrelation.test_compute_correlation): Compare floats using
assert_almost_equal instead of assertEqual.
* tests/unit/test_heatmaps.py: Import assert_allclose from numpy.testing.
(TestHeatmap.test_cluster_traits): Use assert_allclose instead of assertEqual.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/db/traits.py: Move function `export_trait_data` here
* gn3/heatmaps.py: Remove function `export_trait_data`
* tests/unit/db/test_traits.py: Move function `export_trait_data` tests here
* tests/unit/test_heatmaps.py: Remove function `export_trait_data` here
Function `export_trait_data` more closely corresponds to the traits and is
used in more than just the `gn3.heatmaps` module. This commit moves the
relevant code over to the `gn3.db.traits` module and also moves the tests to
the corresponding tests modules.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* gn3/heatmaps.py: implement function
* tests/unit/test_heatmaps.py: add test
Add a function to retrieve the loci names from the traits, ordered by
chromosomes, in alphabetical order.
This is useful to provide the user with more information on hovering over
the heatmap cells: each cell will now display the locus name, trait name and
value associated with it.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Update the terminology used: use `sample` in place of `strain` according to
Zachary's direction at
https://github.com/genenetwork/genenetwork3/pull/37#issuecomment-926043306
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Move common sample test data into a separate file where it can be imported
from, to prevent pylint error R0801 which proved tricky to silence in any
other way.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
|
|
* gn3/heatmaps.py: implement `process_traits_data_for_heatmap` function, that
will process the data into a form usable by heatmaps.
* tests/unit/test_heatmaps.py: check that the function processes the data into
the correct form.
|
|
* gn3/heatmaps.py: copy over function
* tests/unit/test_heatmaps.py: add tests
Copy function over from proof of concept and add some tests to ensure it
works as expected.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* The heatmap generation does not fall cleanly within the computations or db
modules. This commit moves it to the higher level gn3 module.
|