diff HowTo.md @ 6:7a6f2380fc1d draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy
author metexplore
date Wed, 17 May 2023 13:26:37 +0000
parents ae4c301919c4
children 1436e9cde9c9
line wrap: on
line diff
--- a/HowTo.md	Thu Jan 12 13:45:13 2023 +0000
+++ b/HowTo.md	Wed May 17 13:26:37 2023 +0000
@@ -3,8 +3,10 @@
 ## Install planemo
 
 ```console
-virtualenv --python=/usr/bin/python3.8 .venv;
-source .venv/bin/activate
+pip install virtualenv
+python -m virtualenv planemo
+. planemo/bin/activate
+pip install --upgrade pip setuptools  
 pip install planemo
 ```
 
@@ -14,93 +16,96 @@
 
 ## Create new wrappers
 
-1. Create a branch (e.g. newFeature) (or a new release) in met4j and develop your apps
-2. Push the branch
-3. If this branch is not master or develop, launch manually the 
+- Create a branch (e.g. newFeature) (or a new release) in met4j and develop your apps
+- Push the branch
+- If this branch is not master or develop, launch manually the 
 building of the singularity image in the met4j CI-CD (this singularity image will be downloaded by the galaxy instance)
-4. Create a branch with the same name in met4j-galaxy (e.g. newFeature)
-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.
+- Create a branch with the same name in met4j-galaxy (e.g. newFeature)
+- 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.
 
 ```console
 met4j-toolbox.sif GenerateGalaxyFiles \
- -o /path/to/met4j-galaxy/tools \
- -v newFeature
-
+ -o /path/to/met4j-galaxy/tools
 ```
 
-Where newFeature is the name of the new branch.
+## Write tests
 
-6. Edit manually the wrappers where the tests are lacking.
+- Edit manually the wrappers where the tests are lacking.
 
 [Here](https://docs.galaxyproject.org/en/latest/dev/schema.html#tool-tests) is the documentation about tests in galaxy
 
 Put the test files in a test-data directory in the tool directory.
 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.
 
-7. Check the syntax of the wrappers
+## Check the syntax of the wrappers
 
 ```console
-source .venv/bin/activate
+. planemo/bin/activate
 planemo shed_lint --tools \
 --ensure_metadata \
---urls \
 --report_level warn \
 --fail_level error \
 --recursive tools
 ```
 
-8. Launch the tests
+## Find apps without tests
+
+```console
+python ./findToolsWithoutTests.py build/tools/
+```
+
+## Launch the tests
+
+### Build with a version number
+
+To test your apps, you need to fill the good version of met4j singularity in each xml wrapper. For this, use this command:
+
+```bash
+./build.sh $versionNumber
+```
+
+Where $versionNumber must correspond to the version of the met4j singularity instance created above.
+
+### Launch the tests on the built instance
 
 Launching all the tests can be very time consuming. 
 
 You can launch the test for one tool (here convert.Sbml2Graph):
 
 ```console
-source .venv/bin/activate
+. planemo/bin/activate
 planemo test \
---galaxy_source https://github.com/galaxyproject/galaxy \
---galaxy_branch release_22.01 \
 --job_config_file config/job_conf.xml \
-tools/convert/Sbml2Graph/
-```
-
-or for an entire package (here convert):
-
-```console
-source .venv/bin/activate
-planemo test \
---galaxy_source https://github.com/galaxyproject/galaxy \
---galaxy_branch release_22.01 \
---job_config_file config/job_conf.xml \
-tools/convert/Sbml2Graph/
+build/tools/Sbml2Graph/
 ```
 
 If you want to test all the tools:
 
 ```console
-source .venv/bin/activate
+. planemo/bin/activate
 planemo test \
---galaxy_source https://github.com/galaxyproject/galaxy \
---galaxy_branch release_22.01 \
---job_config_file config/job_conf.xml
+--job_config_file config/job_conf.xml \
+build/tools/*
 ```
 
 The results of the tests can be read in tool_test_output.html.
 
-9. If all the tests are ok, merge the new met4j branch in develop
-10. Create a new met4j release and finish the release: it will create a new singularity image for this version
-11. Launch once again GenerateGalaxyFiles
+## Create new release
+
+When tests are ok, you can create a new met4j release. The CI will create a new Singularity image corresponding to this version.
+
+Create a new met4j-galaxy release with the same version number as met4j. After push, the CI will test again the apps. 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.
+
+## Update met4j-galaxy-runner
 
-```console
-met4j-toolbox.sif GenerateGalaxyFiles \
- -o /path/to/met4j-galaxy/tools \
- -v 1.1.1
+Docker image to run planemo on ci.
+
+Creation du docker pour lancer galaxy et planemo :
+
+```bash
+sudo docker login
+sudo docker build -t metexplore/met4j-galaxy-runner:latest .
+sudo docker push metexplore/met4j-galaxy-runner:latest
 ```
 
-where 1.1.1 is the number of the new release
-
-12. In met4j-galaxy, launch planemo lint to check if there is app without test and if everything is ok
-13. Test all the tools 
-14. Merge on develop, create a new release, and push
-
-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.
\ No newline at end of file
+<https://hub.docker.com/r/metexplore/met4j-galaxy-runner>
\ No newline at end of file