comparison HowTo.md @ 4:ae4c301919c4 draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit 2af2c8a0ca9665e1117bb7810bffc105ed39c4f5
author metexplore
date Thu, 17 Nov 2022 07:57:52 +0000
parents
children 7a6f2380fc1d
comparison
equal deleted inserted replaced
3:6bd9aad9626d 4:ae4c301919c4
1 # How to build wrappers for new met4j-toolbox apps?
2
3 ## Install planemo
4
5 ```console
6 virtualenv --python=/usr/bin/python3.8 .venv;
7 source .venv/bin/activate
8 pip install planemo
9 ```
10
11 ## Install singularity
12
13 Doc [Here](https://github.com/sylabs/singularity/blob/main/INSTALL.md).
14
15 ## Create new wrappers
16
17 1. Create a branch (e.g. newFeature) (or a new release) in met4j and develop your apps
18 2. Push the branch
19 3. If this branch is not master or develop, launch manually the
20 building of the singularity image in the met4j CI-CD (this singularity image will be downloaded by the galaxy instance)
21 4. Create a branch with the same name in met4j-galaxy (e.g. newFeature)
22 5. Use the GenerateGalaxyFiles of the met4j-toolbox (be careful, it must be the version of the new branch) to generate the wrappers for the new met4j apps. Or you can use the singularity image created in the third step.
23
24 ```console
25 met4j-toolbox.sif GenerateGalaxyFiles \
26 -o /path/to/met4j-galaxy/tools \
27 -v newFeature
28
29 ```
30
31 Where newFeature is the name of the new branch.
32
33 6. Edit manually the wrappers where the tests are lacking.
34
35 [Here](https://docs.galaxyproject.org/en/latest/dev/schema.html#tool-tests) is the documentation about tests in galaxy
36
37 Put the test files in a test-data directory in the tool directory.
38 If the file is used in several tests, put it in the data directory at the root of the project and create a symbolic link in the test-data directory.
39
40 7. Check the syntax of the wrappers
41
42 ```console
43 source .venv/bin/activate
44 planemo shed_lint --tools \
45 --ensure_metadata \
46 --urls \
47 --report_level warn \
48 --fail_level error \
49 --recursive tools
50 ```
51
52 8. Launch the tests
53
54 Launching all the tests can be very time consuming.
55
56 You can launch the test for one tool (here convert.Sbml2Graph):
57
58 ```console
59 source .venv/bin/activate
60 planemo test \
61 --galaxy_source https://github.com/galaxyproject/galaxy \
62 --galaxy_branch release_22.01 \
63 --job_config_file config/job_conf.xml \
64 tools/convert/Sbml2Graph/
65 ```
66
67 or for an entire package (here convert):
68
69 ```console
70 source .venv/bin/activate
71 planemo test \
72 --galaxy_source https://github.com/galaxyproject/galaxy \
73 --galaxy_branch release_22.01 \
74 --job_config_file config/job_conf.xml \
75 tools/convert/Sbml2Graph/
76 ```
77
78 If you want to test all the tools:
79
80 ```console
81 source .venv/bin/activate
82 planemo test \
83 --galaxy_source https://github.com/galaxyproject/galaxy \
84 --galaxy_branch release_22.01 \
85 --job_config_file config/job_conf.xml
86 ```
87
88 The results of the tests can be read in tool_test_output.html.
89
90 9. If all the tests are ok, merge the new met4j branch in develop
91 10. Create a new met4j release and finish the release: it will create a new singularity image for this version
92 11. Launch once again GenerateGalaxyFiles
93
94 ```console
95 met4j-toolbox.sif GenerateGalaxyFiles \
96 -o /path/to/met4j-galaxy/tools \
97 -v 1.1.1
98 ```
99
100 where 1.1.1 is the number of the new release
101
102 12. In met4j-galaxy, launch planemo lint to check if there is app without test and if everything is ok
103 13. Test all the tools
104 14. Merge on develop, create a new release, and push
105
106 This will test again all the tools on the gitlab CI/CD. If it's ok, a new version of met4j-galaxy will be pushed on the galaxy toolshed. The instance in usegalaxy.fr will be updated the next monday.