2 Commits

Author SHA1 Message Date
Alok Saldanha
05a95c2ca9 Prepare 0.4.0 release 2024-03-10 09:33:50 -04:00
Alok Saldanha
5d29153544 #87 remove version pins for markupsafe, flask and werkzeug
also remove dependency on flask-api
2024-03-10 09:31:39 -04:00
10 changed files with 50 additions and 23 deletions

View File

@@ -39,7 +39,6 @@ jobs:
conda env create -f environment.yml
eval "$(conda shell.bash hook)"
conda activate cellxgene-gateway
pip install markupsafe==2.0.1 # temporary workaround for jinja2-2.11.3 calling soft_unicode in markupsafe
python setup.py install
- name: Run tests

View File

@@ -1,3 +1,8 @@
# 0.4.0
* Removed dependency on flask-api
* Updated dependencies (python 3.11, numpy, unpinned flask, werkzeug)
# 0.3.12
* #81 List gene set annotations when cell annotations not present

View File

@@ -1,7 +1,7 @@
FROM python:3.9
FROM python:3.11
RUN pip install --upgrade pip \
&& pip install cellxgene-gateway 'MarkupSafe<2.1'
RUN pip install --upgrade pip
RUN pip install "cellxgene-gateway>=0.4"
ENV CELLXGENE_DATA=/cellxgene-data
ENV CELLXGENE_LOCATION=/usr/local/bin/cellxgene

View File

@@ -110,7 +110,7 @@ Additional environment variables can be provided with the `-e` parameter:
```bash
docker run -it --rm \
-v <local_data_dir>:/cellxgene-data \
-v ../cellxgene_data:/cellxgene-data \
-e GATEWAY_PORT=8080 \
-p 8080:8080 \
cellxgene-gateway
@@ -191,6 +191,35 @@ black .
If you need help for any reason, please make a github ticket. One of the contributors should help you out.
# Releasing New Versions
## How to prepare for release
- Update Changelog.md and version number in __init__.py
- Cut a release on github
- Go to your project homepage on GitHub
- On right side, you will see [Releases](https://github.com/Novartis/cellxgene-gateway/releases) link. Click on it.
- Click on Draft a new release
- Fill in all the details
- Tag version should be the version number of your package release
- Release Title can be anything you want, but we use v0.3.11 (the same as the tag to be created on publish)
- Description should be changelog
- Click Publish release at the bottom of the page
- Now under Releases you can view all of your releases.
- Copy the download link (tar.gz) and save it somewhere
## How to publish to PyPI
Make sure your `.pypirc` is set up for testpypi and pypi index servers.
```bash
rm -rf dist
python setup.py sdist bdist_wheel
python -m twine upload --repository testpypi dist/*
python -m twine upload dist/*
```
# Contributors
* Niket Patel - https://github.com/NiketPatel9

View File

@@ -7,4 +7,4 @@
# OR CONDITIONS OF ANY KIND, either express or implied. See the License for
# the specific language governing permissions and limitations under the License.
__version__ = "0.3.12"
__version__ = "0.4.0"

View File

@@ -8,11 +8,10 @@
# the specific language governing permissions and limitations under the License.
import time
from http import HTTPStatus
from threading import Thread
from typing import List
from flask_api import status
from cellxgene_gateway import env
from cellxgene_gateway.cache_entry import CacheEntry, CacheEntryStatus
from cellxgene_gateway.cache_key import CacheKey
@@ -53,7 +52,7 @@ class BackendCache:
return matches[0]
else:
raise CellxgeneException(
status.HTTP_500_INTERNAL_SERVER_ERROR,
HTTPStatus.INTERNAL_SERVER_ERROR,
"Found " + str(len(matches)) + " for " + path,
)
@@ -71,7 +70,7 @@ class BackendCache:
return matches[0]
else:
raise CellxgeneException(
status.HTTP_500_INTERNAL_SERVER_ERROR,
HTTPStatus.INTERNAL_SERVER_ERROR,
"Found " + str(len(matches)) + " for " + key.dataset,
)

View File

@@ -9,8 +9,6 @@
import os
from flask_api import status
from cellxgene_gateway import env
from cellxgene_gateway.cellxgene_exception import CellxgeneException

View File

@@ -9,8 +9,7 @@
import logging
import subprocess
from flask_api import status
from http import HTTPStatus
from cellxgene_gateway.cache_entry import CacheEntryStatus
from cellxgene_gateway.dir_util import make_annotations
@@ -76,10 +75,10 @@ class SubprocessBackend:
or "Could not open file" in stderr
):
message = "File was invalid."
http_status = status.HTTP_400_BAD_REQUEST
http_status = HTTPStatus.BAD_REQUEST
else:
message = "Cellxgene failed to launch dataset."
http_status = status.HTTP_500_INTERNAL_SERVER_ERROR
http_status = HTTPStatus.INTERNAL_SERVER_ERROR
cache_entry.status = CacheEntryStatus.error
cache_entry.set_error(message, stderr, http_status)

View File

@@ -2,9 +2,9 @@ name: cellxgene-gateway
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.11
- requests
- flask==2.2.5
- flask
- psutil
- black
- twine
@@ -13,6 +13,5 @@ dependencies:
- pip
- pip:
- pre_commit
- flask-api
- werkzeug==2.3.8
- werkzeug
- cellxgene

View File

@@ -1,6 +1,5 @@
cellxgene
flask==2.2.5
flask-api
werkzeug==2.3.8
flask
werkzeug
psutil
requests