Skip to content

Commit

Permalink
test with from_yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
loraine-gueguen committed Aug 5, 2024
1 parent f671ecd commit 2c2fb97
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ sequenceserver_blast_db:
users: ['fbar','jsmith']
web_page_title: 'blablabla'
placeholders: [{key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'}]
conf_options: {':job_lifetime': '10080', ':databases_widget': 'tree', ':options': {':blastn': {':default': ['-task blastn', '-evalue 1e-5'], ':short-seq': ['-task blastn-short', '-evalue 1e-1']}}}
```
This is the variable used to define the BLAST databases.
Expand All @@ -54,8 +55,8 @@ Each database is defined as a dictionary of the following parameters:
- `ldap_businesscategory` Optional. Useful if the database needs restricted access. A ldap businessCategory value. LDAP users with this "businessCategory" value will have access to the database.
- `group` Optional. Useful if the database needs restricted access. An LDAP group ("gid"). LDAP users who are member of this group will have access to the database.
- `web_page_title` Optional. The title displayed at the top of the web page. If not provided, the default title is "BLAST server for `name`".
- `placeholders` Optional. A list of placeholder dictionaries `{key: 'key_item', value: 'value_item'}` that are used to customize top or bottom supplementary HTML code (see `sequenceserver_top_web_page_html_path` and `sequenceserver_bottom_web_page_html_path`). For example `placeholders: [{key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'}]`.
- `conf_options` Optional. A list of supplementary SequenceServer configuration options dictionaries `{key: 'key_item', value: 'value_item'}` (see [SequenceServer documentation](https://sequenceserver.com/doc/#basics)). For example `conf_options: [{key: 'job_lifetime', value: '10080'}, {key: 'databases_widget', value: 'tree'}]`.
- `placeholders` Optional. A list of placeholder dictionaries `{'key': 'key_item', 'value': 'value_item'}` that are used to customize top or bottom supplementary HTML code (see `sequenceserver_top_web_page_html_path` and `sequenceserver_bottom_web_page_html_path`). For example `placeholders: [{key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'}]`.
- `conf_options` Optional. A list of supplementary SequenceServer configuration options (in JSON dictionary format) `{key: 'key_item', value: 'value_item'}` (see [SequenceServer documentation](https://sequenceserver.com/doc/#basics)). For example `conf_options: {':job_lifetime': '10080', ':databases_widget': 'tree'`. **Note the leading `:` character at the start of each option key.**
Unique `name` and `port` are mandatory for each database.
`users`, `ldap_businesscategory` and `group` are optional and can be used to add an authentication layer with the nginx-auth-ldap module. Choose one single authentication mode for each database.
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
port: '4567'
path: '/tmp/test-data'
placeholders: [{key: 'key_string', value: 'value1'}, {key: 'key_link', value: '<a href="http://testplaceholder.com">my favorite link</a>'}]
conf_options: {':job_lifetime:': '10080', ':databases_widget:': 'tree', ':options:': {':blastn:': {':default:': ["-task blastn", "-evalue 1e-5"], ':short-seq:': ["-task blastn-short", "-evalue 1e-1"]}}}
conf_options: {':job_lifetime': '10080', ':databases_widget': 'tree', ':options': {':blastn': {':default': ['-task blastn', '-evalue 1e-5'], ':short-seq': ['-task blastn-short', '-evalue 1e-1']}}}
sequenceserver_top_web_page_html_path: "/tmp/top_web_page.html"
sequenceserver_bottom_web_page_html_path: "/tmp/bottom_web_page.html"
sequenceserver_home_url: "http://myfavoritewebsite.com"
Expand Down
2 changes: 1 addition & 1 deletion templates/sequenceserver.conf.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:port: '{{ item.port }}'
:database_dir: '{{ item.path }}'
{% if item.conf_options is defined and item.conf_options %}
{{ conf_options | to_yaml }}
{{ item.conf_options | from_yaml }}
{% endif %}

0 comments on commit 2c2fb97

Please sign in to comment.