Skip to content

Commit

Permalink
cleanup for v0.14.2 release (wip) (#1861)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Mar 14, 2024
1 parent 863b1b8 commit e6bde4a
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 35 deletions.
4 changes: 2 additions & 2 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
env = environ.Env()

# .env file, should load only in development environment
READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False)
READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', False)

if READ_DOT_ENV_FILE:
# Operating System Environment variables have precedence over variables
Expand Down Expand Up @@ -157,7 +157,7 @@
# See: https://docs.djangoproject.com/en/3.2/ref/settings/#databases
# Uses django-environ to accept uri format
# See: https://django-environ.readthedocs.io/en/latest/#supported-types
DATABASES = {'default': env.db('DATABASE_URL', default='postgres:///sodar')}
DATABASES = {'default': env.db('DATABASE_URL', 'postgres:///sodar')}
DATABASES['default']['ATOMIC_REQUESTS'] = False

# Set default auto field (for Django 3.2+)
Expand Down
4 changes: 2 additions & 2 deletions config/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bool('DJANGO_DEBUG', default=True)
DEBUG = env.bool('DJANGO_DEBUG', True)
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG

# SECRET CONFIGURATION
Expand Down Expand Up @@ -53,7 +53,7 @@

# django-debug-toolbar
# ------------------------------------------------------------------------------
ENABLE_DEBUG_TOOLBAR = env.bool('ENABLE_DEBUG_TOOLBAR', default=True)
ENABLE_DEBUG_TOOLBAR = env.bool('ENABLE_DEBUG_TOOLBAR', True)

if ENABLE_DEBUG_TOOLBAR:
MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware']
Expand Down
8 changes: 4 additions & 4 deletions config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@
SECURE_HSTS_SECONDS = 60

SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool(
'DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS', default=True
'DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS', True
)
SECURE_CONTENT_TYPE_NOSNIFF = env.bool(
'DJANGO_SECURE_CONTENT_TYPE_NOSNIFF', default=True
'DJANGO_SECURE_CONTENT_TYPE_NOSNIFF', True
)
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True
SECURE_SSL_REDIRECT = env.bool('DJANGO_SECURE_SSL_REDIRECT', default=True)
SECURE_SSL_REDIRECT = env.bool('DJANGO_SECURE_SSL_REDIRECT', True)
SECURE_REDIRECT_EXEMPT = env.list(
'DJANGO_SECURE_REDIRECT_EXEMPT',
default=['/taskflow/', r'^irodsbackend/api/auth$'],
)
CSRF_COOKIE_SECURE = True
CSRF_COOKIE_HTTPONLY = True
CSRF_TRUSTED_ORIGINS = env.list('DJANGO_CSRF_TRUSTED_ORIGINS', default=[])
CSRF_COOKIE_DOMAIN = env.str('DJANGO_CSRF_COOKIE_DOMAIN', default=None)
CSRF_COOKIE_DOMAIN = env.str('DJANGO_CSRF_COOKIE_DOMAIN', None)

X_FRAME_OPTIONS = 'DENY'

Expand Down
4 changes: 2 additions & 2 deletions docs_manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# -- Project information -----------------------------------------------------

project = 'SODAR'
copyright = '2018-2023, BIH Core Unit Bioinformatics'
copyright = '2018-2024, BIH Core Unit Bioinformatics'
author = 'BIH Core Unit Bioinformatics'

# The full version, including alpha/beta/rc tags
release = '0.14.2-WIP'
release = '0.14.2'


# -- General configuration ---------------------------------------------------
Expand Down
6 changes: 1 addition & 5 deletions landingzones/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,7 @@ def submit_delete(self, zone):
if zone_exists: # Submit with taskflow
flow_name = 'landing_zone_delete'
flow_data = self.get_flow_data(
zone,
flow_name,
{
'zone_uuid': str(zone.sodar_uuid),
},
zone, flow_name, {'zone_uuid': str(zone.sodar_uuid)}
)
taskflow.submit(
project=project,
Expand Down
16 changes: 5 additions & 11 deletions samplesheets/templates/samplesheets/samplesheet_import_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,11 @@ <h3>
href="{% url 'samplesheets:project_sheets' project=project.sodar_uuid %}">
<i class="iconify" data-icon="mdi:arrow-left-circle"></i> Cancel
</a>
{% if replace_sheets %}
<button type="submit" class="btn btn-primary sodar-btn-submit-once"
id="sodar-ss-btn-import-submit">
<i class="iconify" data-icon="mdi:refresh"></i> Replace
</button>
{% else %}
<button type="submit" class="btn btn-primary sodar-btn-submit-once"
id="sodar-ss-btn-import-submit">
<i class="iconify" data-icon="mdi:upload"></i> Import
</button>
{% endif %}
<button type="submit" class="btn btn-primary sodar-btn-submit-once"
id="sodar-ss-btn-import-submit">
<i class="iconify" data-icon="mdi:upload"></i>
{% if replace_sheets %}Replace{% else %}Import{% endif %}
</button>
</div>
</div>
</form>
Expand Down
8 changes: 2 additions & 6 deletions samplesheets/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,12 +1472,8 @@ def get_context_data(self, *args, **kwargs):
def get_form_kwargs(self):
"""Pass kwargs to form"""
kwargs = super().get_form_kwargs()
kwargs.update(
{
'project': self.get_project(),
'sheet_tpl': self._get_sheet_template(),
}
)
kwargs['project'] = self.get_project()
kwargs['sheet_tpl'] = self._get_sheet_template()
return kwargs

def form_valid(self, form):
Expand Down
3 changes: 1 addition & 2 deletions samplesheets/vueapp/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,7 @@ export default {
groupId = cols[startIdx].originalParent.groupId
// Update newRow for source cells
for (let i = 1; i < startIdx; i++) {
const value = rowNode.data[cols[i].colId]
value.newRow = false
rowNode.data[cols[i].colId].newRow = false
}
}
Expand Down
2 changes: 1 addition & 1 deletion taskflowbackend/flows/landing_zone_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def build(self, force_fail=False):
inject={'path': zone_path},
)
)
# Set zone status to DELETING
# Set zone status to DELETED
self.add_task(
lz_tasks.SetLandingZoneStatusTask(
name='Set landing zone status to DELETED',
Expand Down

0 comments on commit e6bde4a

Please sign in to comment.