Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This is the simplest configuration for developers to start with.
### Run Application
1. Run the following commands in three separate VSCode built-in-terminals:
1. `./manage.py runserver_plus 0.0.0.0:8000`
1. `uv run celery --app dandiapi.celery worker --loglevel INFO --without-heartbeat -Q celery,calculate_sha256,ingest_zarr_archive,manifest-worker -B`
1. `uv run celery --app dandiapi.celery worker --loglevel INFO --without-mingle --without-heartbeat --without-gossip --queues celery,calculate_sha256,ingest_zarr_archive,manifest-worker --beat`
1. `cd web/ && npm install && npm run dev`
1. Access the site, starting at http://localhost:8000/admin/
1. When finished, use `Ctrl+C`
Expand Down Expand Up @@ -82,7 +82,7 @@ but allows developers to run Python code on their native system.
1. Run the Celery app
1. Start a new terminal
1. Run `export UV_ENV_FILE=./dev/.env.docker-compose-native`
1. `uv run celery --app dandiapi.celery worker --loglevel INFO --without-heartbeat -Q celery,calculate_sha256,ingest_zarr_archive,manifest-worker -B`
1. `uv run celery --app dandiapi.celery worker --loglevel INFO --without-mingle --without-heartbeat --without-gossip -Q celery,calculate_sha256,ingest_zarr_archive,manifest-worker -B`
1. When finished, run `docker compose stop`

## Testing
Expand Down
4 changes: 2 additions & 2 deletions Procfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ web: gunicorn --config gunicorn.conf.py dandiapi.wsgi
# This is OK for now because of how lightweight all high priority tasks currently are,
# but we may need to switch back to a dedicated worker in the future.
# The queue `celery` is the default queue.
worker: REMAP_SIGTERM=SIGQUIT celery --app dandiapi.celery worker --loglevel INFO -Q celery -B --without-gossip --without-mingle
worker: REMAP_SIGTERM=SIGQUIT celery --app dandiapi.celery worker --loglevel INFO --without-mingle --without-heartbeat --without-gossip --queues celery --beat
# The checksum-worker calculates blob checksums and updates zarr checksum files
checksum-worker: REMAP_SIGTERM=SIGQUIT celery --app dandiapi.celery worker --loglevel INFO -Q calculate_sha256,ingest_zarr_archive --without-gossip --without-mingle
checksum-worker: REMAP_SIGTERM=SIGQUIT celery --app dandiapi.celery worker --loglevel INFO --without-mingle --without-heartbeat --without-gossip --queues calculate_sha256,ingest_zarr_archive
15 changes: 12 additions & 3 deletions dandiapi/api/templates/api/account/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
transform: translate(-50%, -50%);
}
.input-field {
margin-top: 10%;
margin-bottom: 10%;
margin-top: 8%;
margin-bottom: 8%;
}
.logo-container {
padding-left: 2%;
Expand All @@ -31,15 +31,24 @@
height: 40px;
margin-top: 10px;
}
.logo-title {
font-size: 1.3rem;
}
a {
color: rgb(183, 28, 28) !important;
}
.btn {
background-color: rgb(245, 124, 0);
}
</style>
</head>

<body>
<nav style="background-color: #f5f5f5;">
<div class="nav-wrapper logo-container">
<a href="{{ dandi_web_app_url }}" class="brand-logo">
EMBER-DANDI
<img src="https://raw.githubusercontent.com/aplbrain/dandi-archive/prod/web/src/assets/ember-logo.png" class="logo">
<span class="logo-title"><b>EMBER-DANDI</b></span>
</a>
</div>
</nav>
Expand Down
8 changes: 7 additions & 1 deletion dandiapi/api/templates/api/account/questionnaire_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
{% block body %}
<h5>Welcome to EMBER-DANDI! Please take a moment to fill out this form.</h5>
<h6><b>Note:</b> No account is necessary to access public data!</h6>

<form method="POST" class="col s12">
{% csrf_token %}
{{ form }}
<div class="row">
<div class="col s12">
<b>
Please note that setting your primary email address in GitHub to an academic email (.edu) may enable faster approval.
</b>
</div>
<div class="col m6 offset-m3 s12">
{% for question in questions %}
<div class="input-field">
Expand All @@ -24,7 +30,7 @@ <h6><b>Note:</b> No account is necessary to access public data!</h6>
</b></i>
</div>

<button id="btn" class="btn waves-effect waves-light blue" type="submit" disabled>
<button id="btn" class="btn waves-effect waves-light" type="submit" disabled>
<span>Submit</span>
<i class="material-icons right">send</i>
</button>
Expand Down
14 changes: 9 additions & 5 deletions dandiapi/api/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ def auth_token_view(request: AuthenticatedRequest) -> HttpResponseBase:
QUESTIONS = [
{'question': 'First Name', 'max_length': 100},
{'question': 'Last Name', 'max_length': 100},
{'question': 'Affiliation(s)', 'max_length': 1000},
{'question': 'Academic Affiliation(s)', 'max_length': 1000},
{'question': 'Lab/project website', 'max_length': 1000},
{
'question': 'Please describe how your research project will utilize DANDI resources.',
'question': 'Please describe how your research project will utilize EMBER-DANDI resources.',
'max_length': 1000,
},
{
'question': 'If your research is funded by NIH, NSF, or another U.S. institution, please provide the relevant funding identifier(s).', # noqa: E501
'max_length': 1000,
},
]
Expand Down Expand Up @@ -135,9 +139,9 @@ def user_questionnaire_form_view(request: AuthenticatedRequest) -> HttpResponse:
'@alleninstitute.org',
'@nih.gov',
'@janelia.hhmi.org',
'@ccf.org',
'.ac.uk',
'.mcgill.ca',
'@ccf.org', # Cleveland Clinic
# '.ac.uk',
# '.mcgill.ca',
]
)

Expand Down
2 changes: 2 additions & 0 deletions dandiapi/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@
CELERY_BROKER_HEARTBEAT = 20
# Allow this to be configurable, but keep the default as the number of CPU cores
CELERY_WORKER_CONCURRENCY: int | None = env.int('DJANGO_CELERY_WORKER_CONCURRENCY', default=None)
# Work around https://github.com/celery/kombu/issues/2237
CELERY_WORKER_ENABLE_REMOTE_CONTROL = False

_dandi_log_level: str = env.str('DJANGO_DANDI_LOG_LEVEL', default='INFO')
# Configure the logging level on all DANDI loggers.
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ services:
"--app", "dandiapi.celery",
"worker",
"--loglevel", "INFO",
"--without-mingle",
"--without-heartbeat",
"-Q", "celery,calculate_sha256,ingest_zarr_archive,manifest-worker",
"-B"
"--without-gossip",
"--queues", "celery,calculate_sha256,ingest_zarr_archive,manifest-worker",
"--beat"
]
# Docker Compose does not set the TTY width, which causes Celery errors
tty: false
Expand Down
Loading