Skip to content

Commit

Permalink
Fix for MIME type ordering in renderers.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jul 27, 2023
1 parent 70a1345 commit 0557705
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 88 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ fourfront
Change Log
----------

6.1.0
=====
* Fix for MIME type ordering in renderers.py (differs between cgap and fourfront).

6.0.1
======
=====

`GA4 post-migration updates <https://github.com/4dn-dcic/fourfront/pull/1825>`_

Expand Down
93 changes: 8 additions & 85 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
# Note: Various modules refer to this system as "encoded", not "fourfront".
name = "encoded"
version = "6.0.1"
version = "6.0.1.1b1" # TODO: To become 6.1.0
description = "4DN-DCIC Fourfront"
authors = ["4DN-DCIC Team <support@4dnucleome.org>"]
license = "MIT"
Expand Down Expand Up @@ -47,7 +47,7 @@ colorama = "0.3.3"
# we get odd 'pyo3_runtime.PanicException: Python API call failed' error on import
# of cryptography.hazmat.bindings._rust in cryptography package. 2023-04-21.
cryptography = "39.0.2"
dcicsnovault = "9.0.0"
dcicsnovault = "9.0.0.1b1"
dcicutils = "^7.5.0"
elasticsearch = "7.13.4"
elasticsearch-dsl = "^7.0.0" # TODO: port code from cgap-portal to get rid of uses
Expand Down
7 changes: 7 additions & 0 deletions src/encoded/project/renderers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from snovault.project.renderers import SnovaultProjectRenderers
from snovault.mime_types import MIME_TYPE_HTML, MIME_TYPE_JSON, MIME_TYPE_LD_JSON

class FourfrontProjectRenderers(SnovaultProjectRenderers):

def renderers_mime_types_supported(self):
return [MIME_TYPE_HTML, MIME_TYPE_JSON, MIME_TYPE_LD_JSON]
2 changes: 2 additions & 0 deletions src/encoded/project_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
from .project.authorization import FourfrontProjectAuthorization
from .project.ingestion import FourfrontProjectIngestion
from .project.loadxl import FourfrontProjectLoadxl
from .project.renderers import FourfrontProjectRenderers

@C4ProjectRegistry.register(APPLICATION_PYPROJECT_NAME)
class FourfrontProject(FourfrontProjectAccessKey,
FourfrontProjectAuthentication,
FourfrontProjectAuthorization,
FourfrontProjectIngestion,
FourfrontProjectLoadxl,
FourfrontProjectRenderers,
SnovaultProject):
NAMES = {'NAME': APPLICATION_NAME, 'PYPI_NAME': APPLICATION_PYPROJECT_NAME}
ACCESSION_PREFIX = "4DN"
Expand Down

0 comments on commit 0557705

Please sign in to comment.