Skip to content

Commit

Permalink
ref: do not use symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Aug 5, 2024
1 parent bff6ec2 commit e82fe3f
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pip install setuptools wheel twine
- name: build
run: |
pipx run build --sdist
pipx run build --sdist --wheel
- name: publish
env:
TWINE_USERNAME: __token__
Expand Down
16 changes: 16 additions & 0 deletions dcor_control/inspect/config_ckan.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,22 @@ def get_expected_site_options(dcor_site_config_dir):
for key, value in cfg_d.items():
cfg["ckan.ini"].setdefault(key, value)

# Branding: Determine extra template paths
template_paths = []
for pi in cfg.get("branding_paths", []):
pp = (dcor_site_config_dir / pi).resolve() / "templates"
if pp.exists():
template_paths.append(str(pp))
if template_paths:
cfg["ckan.ini"]["extra_template_paths"] = ",".join(template_paths)

# Branding: Set favicon
for pi in reversed(cfg.get("branding_paths", [])):
pf = (dcor_site_config_dir / pi).resolve() / "favicon.ico"
if pf.exists():
cfg["ckan.ini"]["ckan.favicon"] = str(pf)
break

# Fill in template variables
update_expected_ckan_options_templates(cfg)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="page-heading">{{ _("Welcome to DCOR-med") }}</h1>
<section class="featured media-overlay hidden-xs">
{% block home_image_content %}
<a class="media-image" href="{{ h.url_for_static('/images/dcor_tiles.png') }}">
<img class="img-responsive" src="{{ h.url_for_static('/images/dcor_tiles_420.jpg') }}" alt="Placeholder" width="420" height="152" />
<img class="img-fluid" src="{{ h.url_for_static('/images/dcor_tiles_420.jpg') }}" alt="Placeholder" width="420" height="152" />
</a>
{% endblock %}
</section>
Expand Down
1 change: 0 additions & 1 deletion dcor_control/resources/dcor_defaults.ini.template
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ ckanext.dcor_depot.users_depot_name = users-<TEMPLATE:HOSTNAME>

# ckanext-dcor_schemas
ckan.extra_resource_fields = etag sha256
extra_template_paths = <TEMPLATE:DCOR_SITE_CONFIG_DIR>/templates
ckanext.dcor_schemas.allow_content_listing_for_anon = true
ckanext.dcor_schemas.allow_public_datasets = true
ckanext.dcor_schemas.json_resource_schema_dir = package
Expand Down
1 change: 0 additions & 1 deletion dcor_control/resources/site_dcor-colab/branding

This file was deleted.

1 change: 1 addition & 0 deletions dcor_control/resources/site_dcor-colab/dcor_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"requirements": {
"ip": "130.183.206.38",
"hostname": "dcor-colab"},
"branding_paths": ["../branding/mpl", "../branding/medical"],
"ckan.ini": {
"ckan.site_title": "DCOR-colab",
"ckan.site_url": "https://dcor-colab.mpl.mpg.de",
Expand Down
1 change: 0 additions & 1 deletion dcor_control/resources/site_dcor-colab/licenses.json

This file was deleted.

29 changes: 29 additions & 0 deletions dcor_control/resources/site_dcor-colab/licenses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"domain_content": false,
"domain_data": false,
"domain_software": false,
"family": "",
"id": "none",
"maintainer": "Unknown",
"od_conformance": "not approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Not specified",
"url": ""
},
{
"domain_content": false,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "patient",
"maintainer": "Unknown",
"od_conformance": "not approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Unlicensed Patient Data",
"url": ""
}
]

2 changes: 1 addition & 1 deletion dcor_control/resources/site_dcor-dev/dcor_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"requirements": {
"ip": "130.183.206.46",
"hostname": "dcor-dev-mpl"},
"branding": ["testing", "dcor"],
"branding_paths": ["../branding/mpl", "../branding/testing"],
"ckan.ini": {
"ckan.auth.create_user_via_api": "true",
"ckan.auth.create_user_via_web": "true",
Expand Down
1 change: 0 additions & 1 deletion dcor_control/resources/site_dcor-dev/templates

This file was deleted.

1 change: 1 addition & 0 deletions dcor_control/resources/site_dcor-main/dcor_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"requirements": {
"ip": "130.183.206.45",
"hostname": "dcor-mpl"},
"branding_paths": ["../branding/mpl"],
"ckan.ini": {
"ckan.auth.create_user_via_web": "true",
"ckan.site_url": "https://dcor.mpl.mpg.de",
Expand Down
2 changes: 1 addition & 1 deletion dcor_control/resources/site_dcor-med/dcor_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{"name": "medical",
"requirements": {},
"branding": ["medical"],
"branding_paths": ["../branding/medical"],
"ckan.ini": {
"ckan.site_title": "DCOR-med",
"ckan.site_url": "https://<TEMPLATE:HOSTNAME>",
Expand Down
1 change: 1 addition & 0 deletions dcor_control/resources/site_dcor-vagrant/dcor_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"requirements": {
"ip": "unknown",
"hostname": "dcor-test"},
"branding_paths": ["../branding/testing"],
"ckan.ini": {
"ckan.auth.create_user_via_api": "true",
"ckan.auth.create_user_via_web": "true",
Expand Down

0 comments on commit e82fe3f

Please sign in to comment.