Compare commits

...
20 Commits
Author SHA1 Message Date
Seve Badajoz e51aca7561 Bump version: 0.16.6-rc.0 → 0.16.6 2020-11-06 10:05:59 -08:00
Seve Badajoz e8691e5292 Bump version: 0.16.5 → 0.16.6-rc.0 2020-11-04 17:40:28 -08:00
Seve Badajoz f68de84758 Updates due dependency version changes. (#1960)
* Updates due dependency version changes.

h5py recently changes and now values once returned as str are now returned as bytes.
This would have caused a much larger change, so instead the version is restricted to <3.0.0.

This caused the bulk of the testing failues.
A few other changes were needed to make a few other tests pass.

 #1959
2020-11-04 16:11:38 -08:00
maniarathi 89195f074c Add version bump 2020-10-22 16:33:25 -07:00
maniarathi 158a4c7d43 Bump version: 0.16.5-rc.2 → 0.16.5 2020-10-22 14:18:03 -07:00
maniarathi 84c31048ad Bump version: 0.16.5-rc.1 → 0.16.5-rc.2 2020-10-21 11:05:01 -07:00
maniarathi 63262e3235 Merge remote-tracking branch 'origin/main' into release-version-0.16.5 2020-10-21 09:17:08 -07:00
maniarathi 0821b38e84 Merge remote-tracking branch 'origin/main' into release-version-0.16.5 2020-10-21 09:13:35 -07:00
maniarathi 17e0cbeec9 Bump 2020-10-06 13:56:27 -07:00
maniarathi 1a6f89f01a Bump version: 0.16.5-rc.0 → 0.16.5-rc.1 2020-10-06 13:55:35 -07:00
maniarathi e4b47fc0d3 Merge remote-tracking branch 'origin/main' into release-version-0.16.5 2020-10-06 13:25:53 -07:00
maniarathi e8b35a36fd Merge remote-tracking branch 'origin/main' into release-version-0.16.5 2020-10-05 10:34:10 -07:00
maniarathi b37dafa99b Bump 2020-09-21 18:00:07 -07:00
maniarathi f046e8e382 Bump version: 0.16.4-rc.0 → 0.16.5-rc.0 2020-09-21 15:49:24 -07:00
maniarathi 684a61c409 Bump version: 0.16.3-rc.0 → 0.16.4-rc.0 2020-09-21 15:22:39 -07:00
maniarathi 5a68aac8ac Bump version: 0.16.2-rc.0 → 0.16.3-rc.0 2020-09-21 15:09:22 -07:00
maniarathi dbe6ce4b37 Bump version: 0.16.1-rc.1 → 0.16.2-rc.0 2020-09-21 14:56:53 -07:00
maniarathi c2e71da0ae Bump version: 0.16.1-rc.0 → 0.16.1-rc.1 2020-09-21 12:00:48 -07:00
maniarathi 42b2805654 Add package-lock file 2020-09-21 11:21:22 -07:00
maniarathi 279d1be283 Bump version: 0.16.0 → 0.16.1-rc.0 2020-09-21 11:19:52 -07:00
9 changed files with 58 additions and 29 deletions
+3 -6
View File
@@ -1,17 +1,14 @@
[bumpversion]
current_version = 0.16.0
current_version = 0.16.6
commit = True
# The below regex details an acceptable version number by naming the groups (major, minor, patch, prerel, and
# prerelversion) and also specifying the valid values for each group (integers, `\d+`, for major, minor, patch, and
# prerelversion and only `rc` as the acceptable value for prerel).
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<prerel>rc)\.(?P<prerelversion>\d+))?
serialize =
serialize =
{major}.{minor}.{patch}-{prerel}.{prerelversion}
{major}.{minor}.{patch}
[bumpversion:part:prerel]
optional_value = release
values =
values =
rc
release
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cellxgene",
"version": "0.16.0",
"version": "0.16.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cellxgene",
"version": "0.16.0",
"version": "0.16.6",
"license": "MIT",
"description": "cellxgene is a web application for the interactive exploration of single cell sequence data.",
"repository": "https://github.com/chanzuckerberg/cellxgene",
+1 -1
View File
@@ -2,7 +2,7 @@ import logging
import sys
from server.common.utils.utils import import_plugins
__version__ = "0.16.0"
__version__ = "0.16.6"
display_version = "cellxgene v" + __version__
try:
+9 -3
View File
@@ -34,6 +34,12 @@ class AnnotationsHostedTileDB(Annotations):
f"{unsanitary_original_category_names} are not valid category names, please resubmit"
)
def get_user_name(self):
return current_app.auth.get_user_name()
def get_user_id(self):
return current_app.auth.get_user_id()
def is_safe_collection_name(self, name):
"""
return true if this is a safe collection name
@@ -48,7 +54,7 @@ class AnnotationsHostedTileDB(Annotations):
self.CXG_ANNO_COLLECTION = name
def read_labels(self, data_adaptor):
user_id = current_app.auth.get_user_id()
user_id = self.get_user_id()
if user_id is None:
return
dataset_name = data_adaptor.get_location()
@@ -103,8 +109,8 @@ class AnnotationsHostedTileDB(Annotations):
return new_df
def write_labels(self, df, data_adaptor):
auth_user_id = current_app.auth.get_user_id()
user_name = current_app.auth.get_user_name()
auth_user_id = self.get_user_id()
user_name = self.get_user_name()
timestamp = time.time()
dataset_location = data_adaptor.get_location()
dataset_id = self.db.get_or_create_dataset(dataset_location)
+1
View File
@@ -12,6 +12,7 @@ flatbuffers>=1.11.0
flatten-dict>=0.2.0
fsspec>=0.4.4,<0.8.0
gunicorn>=20.0.4
h5py<3.0.0 # h5py returns bytes instead of str, which breaks many assumptions
numba>=0.49.1
numpy>=1.16.0
packaging>=20.0
+36 -13
View File
@@ -63,30 +63,53 @@ def jwks():
return make_response(jsonify(dict(keys=[data])))
# The port that the mock oauth server will listen on
PORT = random.randint(10000, 12000)
# function to launch the mock oauth server
def launch_mock_oauth():
mock_oauth_app.run(port=PORT)
def launch_mock_oauth(mock_port):
mock_oauth_app.run(port=mock_port)
class AuthTest(unittest.TestCase):
def setUp(self):
self.dataset_dataroot = FIXTURES_ROOT
self.mock_oauth_process = Process(target=launch_mock_oauth)
self.mock_oauth_process.start()
@classmethod
def setUpClass(cls):
# The port that the mock oauth server will listen on
cls.mock_port = random.randint(10000, 12000)
cls.dataset_dataroot = FIXTURES_ROOT
cls.mock_oauth_process = Process(target=launch_mock_oauth, args=(cls.mock_port,))
cls.mock_oauth_process.start()
def tearDown(self):
self.mock_oauth_process.terminate()
# Verify that the mock oauth server is ready (accepting requests) before starting the tests.
# The following lines are polling until the mock server is ready.
# The issue is we are starting a mock oauth server, then we are starting a cellxgene server,
# which will start making requests to the mock oauth server.
# So there is a race condition because the mock oauth server needs to be ready before it gets requests.
# We check to see if it is ready, and if not we wait 1 second, then try again.
# If it gets to 5 seconds, which is shouldn't, we assume something has gone wrong and fail the test.
server_okay = False
for _ in range(5):
try:
response = requests.get(f"http://localhost:{cls.mock_port}/.well-known/jwks.json")
if response.status_code == 200:
server_okay = True
break
except: # noqa: E722
pass
# wait one second and try again
time.sleep(1)
assert(server_okay)
@classmethod
def tearDownClass(cls):
cls.mock_oauth_process.terminate()
def auth_flow(self, app_config, cookie_key=None):
app_config.update_server_config(
app__api_base_url="local",
authentication__type="oauth",
authentication__params_oauth__oauth_api_base_url=f"http://localhost:{PORT}",
authentication__params_oauth__oauth_api_base_url=f"http://localhost:{self.mock_port}",
authentication__params_oauth__client_id="mock_client_id",
authentication__params_oauth__client_secret="mock_client_secret",
authentication__params_oauth__jwt_decode_options={"verify_signature": False, "verify_iss": False},
@@ -129,9 +129,11 @@ class WritableTileDBStoredAnnotationTest(unittest.TestCase):
with self.assertRaises(KeyError):
self.annotation_put_fbs(fbs_bad)
@patch("server.common.annotations.hosted_tiledb.current_app")
def test_write_labels_stores_df_as_tiledb_array(self, mock_user_id):
mock_user_id.auth.get_user_id.return_value = "1234"
@patch("server.common.annotations.hosted_tiledb.AnnotationsHostedTileDB.get_user_id")
@patch("server.common.annotations.hosted_tiledb.AnnotationsHostedTileDB.get_user_name")
def test_write_labels_stores_df_as_tiledb_array(self, mock_user_name, mock_user_id):
mock_user_id.return_value = "1234"
mock_user_name.return_value = "user1234"
self.annotations.write_labels(self.df, self.data)
# get uri
dataset_id = self.db.query([CellxGeneDataset], [CellxGeneDataset.name == self.data.get_location()])[0].id
+1 -1
View File
@@ -11,7 +11,7 @@ with open("server/requirements-prepare.txt") as fh:
setup(
name="cellxgene",
version="0.16.0",
version="0.16.6",
packages=find_packages(),
url="https://github.com/chanzuckerberg/cellxgene",
license="MIT",