Skip to content

Commit

Permalink
Merge branch 'master' into zoomY
Browse files Browse the repository at this point in the history
  • Loading branch information
dnil authored Oct 25, 2024
2 parents 49c49f5 + c74e2c5 commit b9f0e87
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 27 deletions.
59 changes: 37 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,63 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Added
- `--force` flag to `gens loads sample` for overwriting any existing sample in case of key conflict.
- `--force` flag prints a warning to stderr when overwriting an existing sample.
- `gens delete sample` command
- Height ordering for variants track.
- `--force` flag to `gens loads sample` for overwriting any existing sample in case of key conflict.
- `--force` flag prints a warning to stderr when overwriting an existing sample.
- `gens delete sample` command
- Height ordering for variants track.
### Changed
- Prettier for code formatting
### Fixed
- Pan able to exit chromosome when using genome build 37
- `--force` flag `update_one` call not being called properly
- Incorrect total sample count on home page.
- Some typos and documentation.
- Labels often not being visible on larger variants.
- Pan able to exit chrosome when using genome build 17
- `--force` flag `update_one` call not being called properly
- Incorrect total sample count on home page.
- Some typos and documentation.
- Labels often not being visible on larger variants.
### Merged for Solna from Lund 2.1.2
#### Changed
- Changed cached method from simple to file system as it would be thread safe
#### Fixed
- Fixed cache issue that could result in chromosome information not being updated
- Fixed max arg error when searching for some genes
- Fixed bug that prevented updating annotation tracks


## [2.3]
### Added
- Link out to Scout: introduce config variable for base URL
- Link out to Scout: case links on home sample list
- Link out to Scout: click variant to open Scout page
- Link out to Scout: introduce config variable for base URL
- Link out to Scout: case links on home sample list
- Link out to Scout: click variant to open Scout page
### Changed
- Archive prod docker image with release tag name. Update action versions.
- Archive prod docker image with release tag name. Update action versions.
### Fixed
- Error image background static path
- GitHub action DockerHub push on release
- Error image background static path
- GitHub action DockerHub push on release

## [2.2]
### Added
- Document track processing and loading
- OAuth authentication
- Document track processing and loading
- OAuth authentication
### Changed
- Use sample id instead of display name for variant retrieval
- Hide balanced variants
- Keyboard pan speed increased
- Don't shrink pan window when attemting to pan over start
- Use sample id instead of display name for variant retrieval
- Hide balanced variants
- Keyboard pan speed increased
- Don't shrink pan window when attemting to pan over start

## [2.1.1]
## [2.1.1b]
### Added
### Changed
- Changes the main view's page title to be `sample_name` and adds `sample_name` and `case_id` to the header title
- Updated external images used in GitHub actions, including tj-actions/branch-names to v7 (fixes a security issue)
- Updated Python and MongoDB version used in tests workflow to 3.8 and 7 respectively

## [2.1.2 Lund only - Solna version in Unreleased/2.4]
### Added
### Changed
- Changed cached method from simple to file system as it would be thread safe
### Fixed
- Fixed cache issue that could result in chromosome information not being updated
- Fixed max arg error when searching for some genes
- Fixed bug that prevented updating annotation tracks

## [2.1.1]
### Added
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ COPY --from=node-builder /usr/src/app/build/css/home.min.css /usr/src/app/build/
COPY --from=node-builder /usr/src/app/build/*/gens.min.* gens/blueprints/gens/static/

# make mountpoints and change ownership of app
RUN mkdir -p /access /fs1/results && chown -R app:app /home/app/app /access /fs1
RUN mkdir -p /access /fs1/results /fs1/results_dev && chown -R app:app /home/app/app /access /fs1 /fs1/results_dev
# Change the user to app
USER app

Expand Down
2 changes: 1 addition & 1 deletion gens/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def search_annotation(query: str, genome_build, annotation_type):
response_code = 404
else:
start_elem = elements[0]
end_elem = max(elements[1:], key=lambda elem: elem.get("end"))
end_elem = max(elements[0:], key=lambda elem: elem.get("end"))
data = {
"chromosome": start_elem.get("chrom"),
"start_pos": start_elem.get("start"),
Expand Down
1 change: 0 additions & 1 deletion gens/blueprints/gens/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


@gens_bp.route("/<path:sample_name>", methods=["GET"])
@cache.cached(timeout=60)
def display_case(sample_name):
"""
Renders the Gens template
Expand Down
4 changes: 3 additions & 1 deletion gens/cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Initiate cachig for app."""
from flask_caching import Cache
import tempfile

cache = Cache(config={"CACHE_TYPE": "simple"})
tmp_dir = tempfile.TemporaryDirectory(prefix="gens_cache_")
cache = Cache(config={"CACHE_TYPE": "FileSystemCache", "CACHE_DIR": tmp_dir.name})
2 changes: 1 addition & 1 deletion gens/db/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def register_data_update(track_type, name=None):
db = app.config["GENS_DB"][UPDATES]
LOG.debug(f"Creating timestamp for {track_type}")
track = {"track": track_type, "name": name}
db.delete_one(track) # remove old track
db.delete_many(track) # remove old track
db.insert_one({**track, "timestamp": datetime.datetime.now()})


Expand Down

0 comments on commit b9f0e87

Please sign in to comment.