-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #272 from MetaCell/develop
Release 1.6.0
- Loading branch information
Showing
108 changed files
with
349 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
antibody_data | ||
antibody_data | ||
persistent/partners |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 13 additions & 2 deletions
15
applications/portal/backend/api/controllers/api_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
from openapi.models import DataInfo | ||
from api.services import antibody_service | ||
from openapi.models import DataInfo, PartnerResponseObject | ||
from api.services import antibody_service, partner_service | ||
from typing import List | ||
from django.conf import settings | ||
|
||
|
||
def get_datainfo(): | ||
return DataInfo(total=antibody_service.count(), lastupdate=antibody_service.last_update()) | ||
|
||
def get_partners() -> List[PartnerResponseObject]: | ||
return [ | ||
PartnerResponseObject( | ||
name=partner.name, | ||
url=partner.url, | ||
image=f"{settings.MEDIA_URL}{partner.image}" if partner.image else None | ||
) for partner in partner_service.get_all_partners() | ||
] |
38 changes: 38 additions & 0 deletions
38
applications/portal/backend/api/migrations/0015_add_partner_model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 4.2.11 on 2025-01-03 11:05 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0014_remove_antibodysearch_citations_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Partner", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("name", models.CharField(db_index=True, max_length=512)), | ||
("url", models.URLField(db_index=True, max_length=2048)), | ||
( | ||
"image", | ||
models.ImageField(blank=True, null=True, upload_to="partners"), | ||
), | ||
], | ||
options={ | ||
"verbose_name_plural": "Partners", | ||
"ordering": ("name",), | ||
}, | ||
), | ||
] |
83 changes: 83 additions & 0 deletions
83
applications/portal/backend/api/migrations/0016_auto_20250103_0311.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Generated by Django 4.2.11 on 2025-01-03 11:11 | ||
|
||
from django.db import migrations | ||
from django.core.files import File | ||
import os | ||
|
||
common_file_path_for_partners_image_data = "api/migrations/data/partners" | ||
|
||
partners = [ | ||
{"name": "thermofisher", "url": "https://www.thermofisher.com/", "image": f"{common_file_path_for_partners_image_data}/thermofisher.jpg"}, | ||
{"name": "proteintech", "url": "https://www.ptglab.com/", "image": f"{common_file_path_for_partners_image_data}/proteintech.jpg"}, | ||
{"name": "biocell", "url": "https://bxcell.com/", "image": f"{common_file_path_for_partners_image_data}/biocell.jpg"}, | ||
{"name": "chromotek", "url": "http://www.chromotek.com/home-of-alpaca-antibodies/", "image": f"{common_file_path_for_partners_image_data}/chromotek.jpg"}, | ||
{"name": "jesselllab", "url": "https://jesselllab.com/", "image": f"{common_file_path_for_partners_image_data}/jesselllab.jpg"}, | ||
{"name": "encorbio", "url": "https://encorbio.com/", "image": f"{common_file_path_for_partners_image_data}/encorbio.jpg"}, | ||
{"name": "biolegend", "url": "https://www.biolegend.com/", "image": f"{common_file_path_for_partners_image_data}/biolegend.jpg"}, | ||
{"name": "leinco", "url": "https://www.leinco.com/", "image": f"{common_file_path_for_partners_image_data}/leinco.jpg"}, | ||
{"name": "jacksonimmuno", "url": "https://www.jacksonimmuno.com/", "image": f"{common_file_path_for_partners_image_data}/jacksonimmuno.jpg"}, | ||
{"name": "dshb", "url": "http://dshb.biology.uiowa.edu/", "image": f"{common_file_path_for_partners_image_data}/dshb.jpg"}, | ||
{"name": "immunostar", "url": "http://immunostar.com/", "image": f"{common_file_path_for_partners_image_data}/immunostar.jpg"}, | ||
{"name": "neuromab", "url": "http://neuromab.ucdavis.edu/", "image": f"{common_file_path_for_partners_image_data}/neuromab.jpg"}, | ||
{"name": "sysy", "url": "https://www.sysy.com/", "image": f"{common_file_path_for_partners_image_data}/sysy.jpg"}, | ||
{"name": "atlasantibodies", "url": "https://atlasantibodies.com/", "image": f"{common_file_path_for_partners_image_data}/atlasantibodies.jpg"}, | ||
{"name": "frontier", "url": "https://www.frontier-institute.com/wp/antibodies/?lang=en", "image": f"{common_file_path_for_partners_image_data}/frontier.jpg"}, | ||
{"name": "aeonianbiotech", "url": "https://aeonianbiotech.com/", "image": f"{common_file_path_for_partners_image_data}/aeonianbiotech.jpg"}, | ||
{"name": "bdbiosciences", "url": "http://www.bdbiosciences.com/us/home", "image": f"{common_file_path_for_partners_image_data}/bdbiosciences.jpg"}, | ||
{"name": "miltenyibiotec", "url": "https://www.miltenyibiotec.com/US-en/", "image": f"{common_file_path_for_partners_image_data}/miltenyibiotec.jpg"}, | ||
{"name": "revmab", "url": "https://www.revmab.com/", "image": f"{common_file_path_for_partners_image_data}/revmab.jpg"}, | ||
{"name": "southernbiotech", "url": "https://www.southernbiotech.com/", "image": f"{common_file_path_for_partners_image_data}/southernbiotech.jpg"}, | ||
{"name": "wagner", "url": "http://gwagner.med.harvard.edu/", "image": f"{common_file_path_for_partners_image_data}/wagner.jpg"}, | ||
{"name": "zebrafish", "url": "https://zebrafish.org/home/guide.php", "image": f"{common_file_path_for_partners_image_data}/zebrafish.jpg"}, | ||
{"name": "genetex", "url": "https://www.genetex.com/", "image": f"{common_file_path_for_partners_image_data}/genetex.jpg"}, | ||
{"name": "licor", "url": "https://www.licor.com/bio", "image": f"{common_file_path_for_partners_image_data}/LICORbio.png"}, | ||
{"name": "hytest", "url": "https://www.hytest.fi/home", "image": f"{common_file_path_for_partners_image_data}/hytest.jpg" }, | ||
{"name": "Ansh Labs", "url": "https://www.anshlabs.com/", "image": f"{common_file_path_for_partners_image_data}/anshlabs.png"}, | ||
{"name": "Oasis Biofarm", "url": "https://www.oasisbiofarm.net", "image": f"{common_file_path_for_partners_image_data}/oasis.png"}, | ||
{"name": "Nittobo Medical", "url": "https://www.nittobo.co.jp/", "image": f"{common_file_path_for_partners_image_data}/Nittobo.png"}, | ||
{"name": "SICGEN", "url": "https://sicgen.pt/", "image": f"{common_file_path_for_partners_image_data}/Sicgen_antibodies.png"}, | ||
{"name": "Sino Biological", "url": "https://www.sinobiological.com/", "image": f"{common_file_path_for_partners_image_data}/Sino-Biological.png"}, | ||
{"name": "Niels Danbolt University of Oslo", "url": "https://www.uio.no/", "image": f"{common_file_path_for_partners_image_data}/University_of_Oslo.png"}, | ||
{"name": "NIH", "url": "https://www.nhpreagents.org/", "image": f"{common_file_path_for_partners_image_data}/NIH.png"}, | ||
{"name": "ichorbio", "url": "https://ichor.bio/", "image": f"{common_file_path_for_partners_image_data}/ichorbio.png"}, | ||
{"name": "Antibodies Incorporated", "url": "https://www.antibodiesinc.com/", "image": f"{common_file_path_for_partners_image_data}/antibodies_incorporated.jpg"}, | ||
{"name": "HUABIO", "url": "https://www.huabio.com/", "image": f"{common_file_path_for_partners_image_data}/HUABIO.png"}, | ||
{"name": "NanoTag", "url": "https://nano-tag.com/", "image": f"{common_file_path_for_partners_image_data}/NanoTag.jpg"}, | ||
{"name": "Institute for Protein Innovation", "url": "https://proteininnovation.org/", "image": f"{common_file_path_for_partners_image_data}/Institute_for_Protein_Innovation.png"}, | ||
{"name": "Fujirebio", "url": "https://www.fujirebio.com/en", "image": f"{common_file_path_for_partners_image_data}/Fujirebio.jpeg"}, | ||
{"name": "Boster Biological Technology", "url": "https://www.bosterbio.com/", "image": f"{common_file_path_for_partners_image_data}/Boster_Biological-logo.png"}, | ||
{"name": "Fujifilm Wako USA", "url": "https://wakousa.com/", "image": f"{common_file_path_for_partners_image_data}/fujifilm-wako-chemicals-usa-corporation-logo-vector.png"}, | ||
{"name": "Active Motif", "url": "https://www.activemotif.com/", "image": f"{common_file_path_for_partners_image_data}/Active-Motif.jpg"}, | ||
{"name": "Life Canvas Technologies", "url": "https://lifecanvastech.com/", "image": f"{common_file_path_for_partners_image_data}/LifeCanvas.jpeg"}, | ||
{"name": "AdipoGen Life Sciences", "url": "https://adipogen.com/", "image": f"{common_file_path_for_partners_image_data}/AdipoGen_Logo_LIFE_SCIENCES_CMYK_2015_NEW_13cm_lowres.jpg"}, | ||
{"name": "Creative Biolabs", "url": "https://www.creativebiolabs.net/?utm_source=antibodyregistry&utm_medium=logo&utm_campaign=Creative+Biolabs-Recombinant+Antibody", "image": f"{common_file_path_for_partners_image_data}/biolabs.png"}, | ||
{"name": "Bio-techne", "url": "https://www.bio-techne.com/", "image": f"{common_file_path_for_partners_image_data}/bio-techne.png"}, | ||
{"name": "Bio-Rad", "url": "https://www.bio-rad.com/", "image": f"{common_file_path_for_partners_image_data}/bio-rad.jpg"} | ||
] | ||
|
||
def add_partners(apps, schema_editor): | ||
Partner = apps.get_model('api', 'Partner') | ||
for partner in partners: | ||
if partner.get("image"): | ||
image_path = partner["image"] | ||
with open(image_path, 'rb') as image_file: | ||
Partner.objects.create( | ||
name=partner["name"], | ||
url=partner["url"], | ||
image=File(image_file, name=os.path.basename(image_path)) | ||
) | ||
else: | ||
Partner.objects.create( | ||
name=partner["name"], | ||
url=partner["url"] | ||
) | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0015_add_partner_model"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(add_partners), | ||
] |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+3.65 KB
applications/portal/backend/api/migrations/data/partners/activemotif.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.04 KB
applications/portal/backend/api/migrations/data/partners/aeonianbiotech.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added
BIN
+4.63 KB
applications/portal/backend/api/migrations/data/partners/atlasantibodies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.4 KB
applications/portal/backend/api/migrations/data/partners/bdbiosciences.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.04 KB
applications/portal/backend/api/migrations/data/partners/bethysfortis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+7.59 KB
applications/portal/backend/api/migrations/data/partners/biolegend.jpg
Oops, something went wrong.
Binary file added
BIN
+7.51 KB
applications/portal/backend/api/migrations/data/partners/chromotek.jpg
Oops, something went wrong.
Binary file added
BIN
+8.86 KB
applications/portal/backend/api/migrations/data/partners/cytoskeleton.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+8.57 KB
applications/portal/backend/api/migrations/data/partners/encorbio.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+4.97 KB
applications/portal/backend/api/migrations/data/partners/frontier.jpg
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+4.44 KB
applications/portal/backend/api/migrations/data/partners/immunostar.jpg
Oops, something went wrong.
Binary file added
BIN
+6.62 KB
applications/portal/backend/api/migrations/data/partners/jacksonimmuno.jpg
Oops, something went wrong.
Binary file added
BIN
+6.42 KB
applications/portal/backend/api/migrations/data/partners/jesselllab.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+7.35 KB
applications/portal/backend/api/migrations/data/partners/miltenyibiotec.jpg
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+9.79 KB
applications/portal/backend/api/migrations/data/partners/neuromab.jpg
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+5.44 KB
applications/portal/backend/api/migrations/data/partners/phosphosolutions.jpg
Oops, something went wrong.
Binary file added
BIN
+8.59 KB
applications/portal/backend/api/migrations/data/partners/proteintech.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+4.81 KB
applications/portal/backend/api/migrations/data/partners/southernbiotech.jpg
Oops, something went wrong.
Binary file added
BIN
+6.12 KB
applications/portal/backend/api/migrations/data/partners/stressmarq.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+8.33 KB
applications/portal/backend/api/migrations/data/partners/thermofisher.jpg
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+12.8 KB
applications/portal/backend/api/migrations/data/partners/zebrafish.jpg
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from api.models import Partner | ||
|
||
def get_all_partners(): | ||
return Partner.objects.all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/activemotif.svg
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/aeonianbiotech.svg
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/atlasantibodies.svg
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/bdbiosciences.svg
Diff not rendered.
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/bethysfortis.svg
Diff not rendered.
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/biolegend.svg
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/chromotek.svg
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/cytoskeleton.svg
Diff not rendered.
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/encorbio.svg
Diff not rendered.
Diff not rendered.
9 changes: 0 additions & 9 deletions
9
applications/portal/frontend/src/assets/partners/frontier.svg
Diff not rendered.
Diff not rendered.
Oops, something went wrong.