Compare commits

...
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
-1
View File
@@ -39,7 +39,6 @@ jobs:
conda env create -f environment.yml conda env create -f environment.yml
eval "$(conda shell.bash hook)" eval "$(conda shell.bash hook)"
conda activate cellxgene-gateway 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 python setup.py install
- name: Run tests - name: Run tests
+5
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 # 0.3.12
* #81 List gene set annotations when cell annotations not present * #81 List gene set annotations when cell annotations not present
+3 -3
View File
@@ -1,7 +1,7 @@
FROM python:3.9 FROM python:3.11
RUN pip install --upgrade pip \ RUN pip install --upgrade pip
&& pip install cellxgene-gateway 'MarkupSafe<2.1' RUN pip install "cellxgene-gateway>=0.4"
ENV CELLXGENE_DATA=/cellxgene-data ENV CELLXGENE_DATA=/cellxgene-data
ENV CELLXGENE_LOCATION=/usr/local/bin/cellxgene ENV CELLXGENE_LOCATION=/usr/local/bin/cellxgene
+30 -1
View File
@@ -110,7 +110,7 @@ Additional environment variables can be provided with the `-e` parameter:
```bash ```bash
docker run -it --rm \ docker run -it --rm \
-v <local_data_dir>:/cellxgene-data \ -v ../cellxgene_data:/cellxgene-data \
-e GATEWAY_PORT=8080 \ -e GATEWAY_PORT=8080 \
-p 8080:8080 \ -p 8080:8080 \
cellxgene-gateway 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. 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 # Contributors
* Niket Patel - https://github.com/NiketPatel9 * Niket Patel - https://github.com/NiketPatel9
+1 -1
View File
@@ -7,4 +7,4 @@
# OR CONDITIONS OF ANY KIND, either express or implied. See the License for # OR CONDITIONS OF ANY KIND, either express or implied. See the License for
# the specific language governing permissions and limitations under the License. # the specific language governing permissions and limitations under the License.
__version__ = "0.3.12" __version__ = "0.4.0"
+3 -4
View File
@@ -8,11 +8,10 @@
# the specific language governing permissions and limitations under the License. # the specific language governing permissions and limitations under the License.
import time import time
from http import HTTPStatus
from threading import Thread from threading import Thread
from typing import List from typing import List
from flask_api import status
from cellxgene_gateway import env from cellxgene_gateway import env
from cellxgene_gateway.cache_entry import CacheEntry, CacheEntryStatus from cellxgene_gateway.cache_entry import CacheEntry, CacheEntryStatus
from cellxgene_gateway.cache_key import CacheKey from cellxgene_gateway.cache_key import CacheKey
@@ -53,7 +52,7 @@ class BackendCache:
return matches[0] return matches[0]
else: else:
raise CellxgeneException( raise CellxgeneException(
status.HTTP_500_INTERNAL_SERVER_ERROR, HTTPStatus.INTERNAL_SERVER_ERROR,
"Found " + str(len(matches)) + " for " + path, "Found " + str(len(matches)) + " for " + path,
) )
@@ -71,7 +70,7 @@ class BackendCache:
return matches[0] return matches[0]
else: else:
raise CellxgeneException( raise CellxgeneException(
status.HTTP_500_INTERNAL_SERVER_ERROR, HTTPStatus.INTERNAL_SERVER_ERROR,
"Found " + str(len(matches)) + " for " + key.dataset, "Found " + str(len(matches)) + " for " + key.dataset,
) )
-2
View File
@@ -9,8 +9,6 @@
import os import os
from flask_api import status
from cellxgene_gateway import env from cellxgene_gateway import env
from cellxgene_gateway.cellxgene_exception import CellxgeneException from cellxgene_gateway.cellxgene_exception import CellxgeneException
+3 -4
View File
@@ -9,8 +9,7 @@
import logging import logging
import subprocess import subprocess
from http import HTTPStatus
from flask_api import status
from cellxgene_gateway.cache_entry import CacheEntryStatus from cellxgene_gateway.cache_entry import CacheEntryStatus
from cellxgene_gateway.dir_util import make_annotations from cellxgene_gateway.dir_util import make_annotations
@@ -76,10 +75,10 @@ class SubprocessBackend:
or "Could not open file" in stderr or "Could not open file" in stderr
): ):
message = "File was invalid." message = "File was invalid."
http_status = status.HTTP_400_BAD_REQUEST http_status = HTTPStatus.BAD_REQUEST
else: else:
message = "Cellxgene failed to launch dataset." 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.status = CacheEntryStatus.error
cache_entry.set_error(message, stderr, http_status) cache_entry.set_error(message, stderr, http_status)
+3 -4
View File
@@ -2,9 +2,9 @@ name: cellxgene-gateway
channels: channels:
- conda-forge - conda-forge
dependencies: dependencies:
- python=3.9 - python=3.11
- requests - requests
- flask==2.2.5 - flask
- psutil - psutil
- black - black
- twine - twine
@@ -13,6 +13,5 @@ dependencies:
- pip - pip
- pip: - pip:
- pre_commit - pre_commit
- flask-api - werkzeug
- werkzeug==2.3.8
- cellxgene - cellxgene
+2 -3
View File
@@ -1,6 +1,5 @@
cellxgene cellxgene
flask==2.2.5 flask
flask-api werkzeug
werkzeug==2.3.8
psutil psutil
requests requests