Skip to content

Commit 5465685

Browse files
authored
Merge pull request #41 from AU-Biocommons/dev
Terms update and maintenance site
2 parents 1fbe153 + ebdd76d commit 5465685

21 files changed

Lines changed: 702 additions & 31 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""Dump model data to CSV file."""
2+
3+
import csv
4+
from django.apps import apps
5+
from django.core.management.base import BaseCommand
6+
7+
8+
class Command(BaseCommand):
9+
help = 'Export data from Genome models in CSV format'
10+
11+
def add_arguments(self, parser):
12+
parser.add_argument('model_name', type=str,
13+
help='Name of the model to export')
14+
parser.add_argument('-o', '--outfile', type=str,
15+
help='Output file path')
16+
17+
def handle(self, *args, **kwargs):
18+
model_name = kwargs['model_name']
19+
Model = apps.get_model('genomes', model_name.capitalize())
20+
filename = kwargs.get('outfile', f'{model_name}.csv')
21+
field_names = [field.name for field in Model._meta.fields]
22+
23+
with open(filename, 'w', newline='') as csvfile:
24+
writer = csv.writer(csvfile)
25+
writer.writerow(field_names)
26+
for obj in Model.objects.all():
27+
writer.writerow([getattr(obj, field) for field in field_names])
28+
29+
self.stdout.write(
30+
self.style.SUCCESS(
31+
f'Data from {model_name} exported successfully to {filename}.'
32+
)
33+
)

app/home/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
from captcha.fields import ReCaptchaField
55
from django import forms
6+
from django.utils.safestring import mark_safe
67
from .fields import OtherChoiceField
78
from . import choices, notify, validators, widgets
89

@@ -26,7 +27,7 @@ class HoneypotSpamFilterMixin(forms.Form):
2627
# Named to avoid spam bot detection:
2728
HONEYPOT_FIELD_NAME = 'institution_hp'
2829
institution_hp = forms.CharField(required=False)
29-
honeypot_field = (
30+
honeypot_field = mark_safe(
3031
f'<input type="text" name="{HONEYPOT_FIELD_NAME}"'
3132
f' id="id_{HONEYPOT_FIELD_NAME}" required />\n'
3233
'<script type="text/javascript">\n'

app/home/static/home/css/faq.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@
1111
}
1212
#faq-accordion .btn-link:hover {
1313
color: black;
14+
background-color: transparent;
1415
text-decoration: none;
1516
}
17+
#faq-accordion .btn-link:focus {
18+
text-decoration: none;
19+
outline: none;
20+
box-shadow: none;
21+
}
1622
#faq-accordion .btn-link::before,
1723
#faq-accordion .btn-link::after {
1824
position: absolute;

app/home/templates/home/mail/success_admin_user.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
The Principal Investigator is ultimately responsible for the hosted Apollo Instance and must ensure all users adhere to the Apollo Service Terms of Use and Policies;
3535
</li>
3636
<li>
37-
This Service is designed for the long term storage of genome assembly and annotation data. We can guarantee, that the service will be available to the current operational horizon of the Australian BioCommons (i.e. June 2023)
37+
This Service is designed for the long term storage of genome assembly and annotation data. We can guarantee that the service will be available to the current operational horizon of Australian BioCommons (i.e. June 2028)
3838
</li>
3939
<li>
4040
The Service is subject to overall storage quota limits and project administrators and users must monitor their volume of large support files (e.g. BAM) and only host these for the duration they are needed; and

app/home/templates/home/mail/success_admin_user.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ You have been nominated by {{ data.name|safe }} as a Project Administrator on th
44

55
Once your Instance has been created, you have two options for uploading data to your Apollo Instance. If your data files are greater than 2 GB, we recommend uploading data to your Instance via the command line. To provide you with access to your Instance from the command line, please provide the Apollo Service Team with your public-key. If you are unsure how to generate a public key please see the following help resource.
66

7-
Alternatively, if your data files are not more than 2 GB, you can upload your files via the Apollo (browser) Interface and you do not need a public-key for this purpose.
7+
Alternatively, if your data files are not more than 2 GB, you can upload your files via the Apollo (browser) Interface and you do not need a public-key for this purpose.
88

99
Please read and familiarise yourself with the Apollo Service Terms of Use and Policies. Some of the fine print:
1010

1111
The Service is fully subsidised for research groups / consortia where the Principal Investigator is employed by an Australian-based academic or research institute;
1212
The Principal Investigator is ultimately responsible for the hosted Apollo Instance and must ensure all users adhere to the Apollo Service Terms of Use and Policies;
13-
This Service is designed for the long term storage of genome assembly and annotation data. We can guarantee, that the service will be available to the current operational horizon of the Australian BioCommons (i.e. June 2023)
13+
This Service is designed for the long term storage of genome assembly and annotation data. We can guarantee that the service will be available to the current operational horizon of Australian BioCommons (i.e. June 2028)
1414
The Service is subject to overall storage quota limits and project administrators and users must monitor their volume of large support files (e.g. BAM) and only host these for the duration they are needed; and
1515
The Apollo Service is not designed for hosting sensitive data.
1616
You will be notified with login details once your Instance has been created. Additional user resources are located on the Apollo Service website.

app/home/templates/home/resources/faqs.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ <h5 class="mb-0">
284284
<a href="/resources/terms"
285285
>Apollo Service Terms of Use and Policies</a
286286
>
287-
or applicable laws, the Australian BioCommons reserves the right,
287+
or applicable laws, Australian BioCommons reserves the right,
288288
without notice, to restrict or remove access.
289289
</div>
290290
</div>
@@ -318,14 +318,8 @@ <h5 class="mb-0">
318318
>National Collaborative Research Infrastructure Strategy (NCRIS)</a
319319
>
320320
investments made by
321-
<a href="https://bioplatforms.com/">Bioplatforms Australia (BPA)</a>
322-
and the
323-
<a href="https://ardc.edu.au/"
324-
>Australian Research Data Commons (ARDC)</a
325-
>
326-
(<a href="https://doi.org/10.47486/PL105"
327-
>https://doi.org/10.47486/PL105</a
328-
>), investment from the
321+
<a href="https://bioplatforms.com/">Bioplatforms Australia (BPA)</a>,
322+
investment from the
329323
<a href=" https://science.des.qld.gov.au/funding/ricf"
330324
>Queensland Government's Research Infrastructure Co-investment Fund
331325
(RICF)</a
@@ -657,7 +651,7 @@ <h5 class="mb-0">
657651
This work is supported by the Apollo Portal Service (<a
658652
href="/"
659653
>https://apollo-portal.genome.edu.au</a
660-
>) provided by the Australian Biocommons and its partners. The service
654+
>) provided by Australian BioCommons and its partners. The service
661655
receives NCRIS funding through Bioplatforms Australia and the
662656
Australian Research Data Commons (<a
663657
href="https://doi.org/10.47486/PL105"

app/home/templates/home/resources/terms.html

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h3>Apollo Portal</h3>
9090

9191
<h3>Apollo Service</h3>
9292
<p>
93-
The “Apollo Service” (the Service) is offered by the
93+
The “Apollo Service” (the Service) is offered by
9494
<a href="https://www.biocommons.org.au/">
9595
Australian BioCommons
9696
</a>
@@ -338,7 +338,7 @@ <h2>
338338
<strong>Use of service</strong>
339339
<ol>
340340
<li>
341-
The Apollo Portal and Apollo Service are part of the Australian BioCommons
341+
The Apollo Portal and Apollo Service are part of Australian BioCommons'
342342
suite of services that aim to provide fully subsidised access to publicly
343343
available services. At the discretion of an Apollo Administrator,
344344
anonymous use by Anonymous (public) Viewers of data is permitted.
@@ -804,13 +804,12 @@ <h2>
804804
</h2>
805805

806806
<p>
807-
The
808807
<a href="https://www.biocommons.org.au/">
809808
Australian BioCommons
810809
</a>
811810
(hosted by
812811
<a href="https://www.unimelb.edu.au/">
813-
The University of Melbourne
812+
the University of Melbourne
814813
</a>
815814
) operates Apollo Portal Service in collaboration with
816815
<a href="https://www.qcif.edu.au/">
@@ -820,15 +819,7 @@ <h2>
820819
<a href="https://science.des.qld.gov.au/funding/ricf">
821820
Queensland Government's Research Infrastructure Co-investment Fund (RICF)
822821
</a>
823-
, the
824-
<a href="https://ardc.edu.au/">
825-
Australian Research Data Commons
826-
</a>
827-
(
828-
<a href="https://doi.org/10.47486/PL105">
829-
https://doi.org/10.47486/PL105
830-
</a>
831-
) and
822+
and
832823
<a href="https://bioplatforms.com/">
833824
Bioplatforms Australia</a>.
834825
The Service is underpinned by computational resources provided by the
@@ -2284,9 +2275,9 @@ <h2 id="AusUni">List of Australian Research Institutions</h2>
22842275
</p>
22852276
<p>
22862277
<a id="ref_2"> [2] </a>
2287-
The Australian BioCommons initiative is hosted by
2278+
Australian BioCommons is hosted by
22882279
<a href="https://www.unimelb.edu.au/">
2289-
The University of Melbourne.
2280+
the University of Melbourne.
22902281
</a>
22912282
</p>
22922283
<p>

app/home/templates/home/signup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <h3>Acknowledgement</h3>
250250
</p>
251251

252252
<blockquote>
253-
This work was supported by the Australian Apollo Service https://apollo-portal.genome.edu.au/ provided by the Australian BioCommons and Operational Partners.
253+
This work was supported by the Australian Apollo Service https://apollo-portal.genome.edu.au/ provided by Australian BioCommons and Operational Partners.
254254
</blockquote>
255255
</section>
256256

app/home/templates/home/snippets/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<section class="footer-bottom-section">
4141
<div class="copyright">
4242
The content of this website is licensed under a <a href="https://creativecommons.org/licenses/by/3.0/au/">Creative Commons Attribution 3.0 Australia License.</a>
43-
Please review our <a href="/resources/terms">Apollo Service Terms of Use and Policies.</a> The Apollo Service is operated by QCIF and underpinned by computational resources provided by the Pawsey Supercomputing Research Centre and receives NCRIS funding through Bioplatforms Australia, as well as the Queensland Government RICF
43+
Please review our <a href="/resources/terms">Apollo Service Terms of Use and Policies.</a> The Apollo Service is operated by QCIF and underpinned by computational resources provided by the Pawsey Supercomputing Research Centre and receives NCRIS funding through Bioplatforms Australia, as well as the Queensland Government RICF.
4444
</div>
4545
</section>
4646
</div>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
server {
2+
listen 80;
3+
server_name apollo-portal.genome.edu.au apollo-portal-offline.genome.edu.au;
4+
access_log /var/log/nginx/apollo-portal.access.log;
5+
error_log /var/log/nginx/apollo-portal.error.log;
6+
7+
root /var/www/apollo-portal.genome.edu.au;
8+
index index.html;
9+
10+
location = / {
11+
try_files $uri $uri/ /index.html;
12+
}
13+
}

0 commit comments

Comments
 (0)