Skip to content

Commit b38dbbc

Browse files
committed
Merge pull request #24 from fangohr/pkg-011
Pkg 011
2 parents 21647ae + ae0d074 commit b38dbbc

File tree

8 files changed

+42
-1
lines changed

8 files changed

+42
-1
lines changed

guest_resources/fidimag_examples.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Fidimag Examples
2+
----------------
3+
4+
Fidimag example files can be found locally in::
5+
6+
`~/fidimag-examples`
7+
8+
A test suite is also available, and can be used by commanding::
9+
10+
sudo su # We need to run this as root for permissions purposes.
11+
cd /opt/fidimag
12+
make test
13+
exit

guest_resources/nmag_examples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Nmag Examples
2-
--------
2+
-------------
33

44
Nmag examples can also be run, and can be found in section 2 (Guided Tour) of
55
the manual found here:

jobs/provision_virtualmicromagnetics_fidimag.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
roles:
1212
- fidimag
13+
- fidimag_examples
1314
- xserver
1415
- { role: rst_to_html, SOURCE_PATH: "/vagrant/extra_resources/welcome/welcome_{{ vm_name }}.rst" }
1516
- add_super_user

jobs/provision_virtualmicromagnetics_full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- nmag
1919
- nmag_examples
2020
- fidimag
21+
- fidimag_examples
2122
- xserver
2223
- { role: rst_to_html, SOURCE_PATH: "/vagrant/extra_resources/welcome/welcome_{{ vm_name }}.rst" }
2324
- add_super_user

jobs/provision_virtualmicromagnetics_lite.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- nmag
1717
- nmag_examples
1818
- fidimag
19+
- fidimag_examples
1920
- xserver
2021
- { role: rst_to_html, SOURCE_PATH: "/vagrant/extra_resources/welcome/welcome_{{ vm_name }}.rst" }
2122
- add_super_user

roles/fidimag_examples/meta/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
dependencies:
3+
- { role: fidimag }
4+
- { role: rst_to_html, BUILD_DIR: "{{ EXAMPLES_DOC_FOLDER }}", SOURCE_PATH: "{{ EXAMPLES_RST_FILE }}", BUILD_NAME: "{{ EXAMPLES_OUTPUT_NAME }}" }

roles/fidimag_examples/tasks/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
# This Ansible role prepares Fidimag examples and places some documentation on
3+
# the Desktop.
4+
5+
# This task is not very robust, but I can't think of a better way of doing
6+
# this.
7+
8+
- name: Copy fidimag examples to a more accessible location.
9+
command: cp -r /opt/fidimag/examples {{ FIDIMAG_EXAMPLES_FOLDER }}
10+
creates={{ FIDIMAG_EXAMPLES_FOLDER }}
11+
sudo: yes

roles/fidimag_examples/vars/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Examples location
2+
EXAMPLES_FOLDER: /etc/skel
3+
FIDIMAG_EXAMPLES_FOLDER: "{{ EXAMPLES_FOLDER }}/fidimag-examples"
4+
5+
# Path of the RST template to generate HTML examples from.
6+
EXAMPLES_RST_FILE: /vagrant/extra_resources/fidimag_examples.rst
7+
EXAMPLES_OUTPUT_NAME: Fidimag_examples.html
8+
9+
# Location to place the HTML documentation.
10+
EXAMPLES_DOC_FOLDER: "{{ EXAMPLES_FOLDER }}/Desktop"

0 commit comments

Comments
 (0)