Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update devel #211

Merged
merged 141 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
08dd2f5
Files added in igemRNA folder
NebulaKit Aug 24, 2022
8a0da67
small changes to metaboAnnotator
ithiele Aug 26, 2022
c198ce7
Merge branch 'opencobra:master' into master
ithiele Aug 26, 2022
42e52b4
any recent changes
ithiele Mar 1, 2023
ad0ac38
Create main.yml
AaronBrennan1 Jun 15, 2023
3a05fee
Update main.yml
AaronBrennan1 Jun 15, 2023
ba93c50
Update main.yml
AaronBrennan1 Jun 15, 2023
ed63cf7
Update main.yml
AaronBrennan1 Jun 15, 2023
96eefea
Create build.sh
AaronBrennan1 Jun 15, 2023
cddfbfb
Add files via upload
AaronBrennan1 Jun 15, 2023
f9c72bc
Update main.yml
AaronBrennan1 Jun 15, 2023
60a08e3
Update main.yml
AaronBrennan1 Jun 15, 2023
bef5a4e
Delete build.sh
AaronBrennan1 Jun 15, 2023
9e66ae6
Delete setup.sh
AaronBrennan1 Jun 15, 2023
31ad568
Add files via upload
AaronBrennan1 Jun 15, 2023
f2a341a
Create tutorial_minSpan.mlx
AaronBrennan1 Jun 15, 2023
0dc1aba
Merge branch 'master' of https://github.com/opencobra/COBRA.tutorials
AaronBrennan1 Jun 15, 2023
f530ffb
Delete analysis/test directory
AaronBrennan1 Jun 15, 2023
1b25446
Create tutorial_steadyCom.mlx
AaronBrennan1 Jun 15, 2023
971153a
test2
AaronBrennan1 Jun 15, 2023
0d1b6e9
Delete tutorial_reconToFBAmodel.mlx
AaronBrennan1 Jun 30, 2023
42de471
Create tutorial_reconToFBAmodel.mlx
AaronBrennan1 Jun 30, 2023
8346b17
Merge pull request #193 from BigDataInSilicoBiologyGroup/igemrna
rmtfleming Jul 5, 2023
408602a
Merge pull request #194 from ithiele/master
rmtfleming Jul 5, 2023
d2c66d0
Merge pull request #200 from opencobra/develop
rmtfleming Jul 5, 2023
3ea0e8b
king server test
AaronBrennan1 Jan 16, 2024
cbd0299
king test 2
AaronBrennan1 Jan 16, 2024
bb637aa
test3
AaronBrennan1 Jan 16, 2024
95344bf
cobratoolbox CI test
AaronBrennan1 Jan 19, 2024
7d4b623
test3
AaronBrennan1 Jan 21, 2024
a68b78b
test4
AaronBrennan1 Jan 21, 2024
40c7d45
Update build.sh
AaronBrennan1 Jan 22, 2024
c956938
test5
AaronBrennan1 Jan 22, 2024
3385516
Merge branch 'master' of https://github.com/opencobra/COBRA.tutorials
AaronBrennan1 Jan 22, 2024
97a95ec
Update build.sh
AaronBrennan1 Jan 22, 2024
51fa48f
Update build.sh
AaronBrennan1 Jan 22, 2024
3a8bbff
Update main.yml
AaronBrennan1 Jan 22, 2024
7639240
test6
AaronBrennan1 Jan 22, 2024
3ea40b2
Merge branch 'master' of https://github.com/opencobra/COBRA.tutorials
AaronBrennan1 Jan 22, 2024
3bd01a8
Update main.yml
AaronBrennan1 Jan 23, 2024
6438e12
Update build.sh
AaronBrennan1 Jan 23, 2024
7a56caa
Update setup.sh
AaronBrennan1 Jan 23, 2024
8939b72
Update build.sh
AaronBrennan1 Jan 23, 2024
b6b7e0d
test7
AaronBrennan1 Jan 23, 2024
eb9e82a
Update build.sh
AaronBrennan1 Jan 23, 2024
9e0b7ab
Update build.sh
AaronBrennan1 Jan 23, 2024
eca465d
test8
AaronBrennan1 Jan 23, 2024
08516e0
Update build.sh
AaronBrennan1 Jan 23, 2024
28bbf7d
test9
AaronBrennan1 Jan 23, 2024
15086eb
Update build.sh
AaronBrennan1 Jan 23, 2024
19479a4
Update build.sh
AaronBrennan1 Jan 23, 2024
55670fb
test 10
AaronBrennan1 Jan 23, 2024
1125492
Update build.sh
AaronBrennan1 Jan 23, 2024
9ea67d4
test11
AaronBrennan1 Jan 23, 2024
a83402f
test12
AaronBrennan1 Jan 23, 2024
a94a754
test13
AaronBrennan1 Jan 23, 2024
aa1aae7
test14
AaronBrennan1 Jan 23, 2024
71565fa
test15
AaronBrennan1 Jan 23, 2024
9a559cc
test16
AaronBrennan1 Jan 23, 2024
451243c
test17
AaronBrennan1 Jan 23, 2024
a45afd4
test18
AaronBrennan1 Jan 23, 2024
0bb309e
test19
AaronBrennan1 Jan 23, 2024
ef9327e
test20
AaronBrennan1 Jan 23, 2024
2c45a5e
test21
AaronBrennan1 Jan 23, 2024
fabeeb4
test22
AaronBrennan1 Jan 23, 2024
ee304be
test23
AaronBrennan1 Jan 24, 2024
5643e2c
test24
AaronBrennan1 Jan 24, 2024
a884461
test25
AaronBrennan1 Jan 24, 2024
eca6853
test26
AaronBrennan1 Jan 25, 2024
86b2306
test27
Jan 25, 2024
be43c42
test28
Jan 25, 2024
8f4767d
test29
AaronBrennan1 Jan 25, 2024
471866f
test30
AaronBrennan1 Jan 25, 2024
6639ccf
test31
AaronBrennan1 Jan 25, 2024
60bc428
test32
AaronBrennan1 Jan 25, 2024
3f42942
test33
AaronBrennan1 Jan 25, 2024
5b3ddf7
34
AaronBrennan1 Jan 25, 2024
e9fc345
35
AaronBrennan1 Jan 25, 2024
9e8c8e3
36
AaronBrennan1 Jan 25, 2024
70a12ad
37
AaronBrennan1 Jan 25, 2024
3d204ae
38
AaronBrennan1 Jan 25, 2024
0d5becf
39
AaronBrennan1 Jan 25, 2024
48ce1d7
test40
AaronBrennan1 Feb 1, 2024
2d3ad44
test41
AaronBrennan1 Feb 1, 2024
05fb091
42
AaronBrennan1 Feb 1, 2024
9c8ffdd
43
AaronBrennan1 Feb 1, 2024
1272e7e
44
AaronBrennan1 Feb 1, 2024
7378114
45
AaronBrennan1 Feb 1, 2024
0907761
46
AaronBrennan1 Feb 1, 2024
f87dc50
47
AaronBrennan1 Feb 1, 2024
641bf64
48
AaronBrennan1 Feb 1, 2024
2341288
Create readme.md
ThummaratPaklao Aug 3, 2024
464454d
Add files via upload
ThummaratPaklao Aug 3, 2024
1a84f30
Add files via upload
ThummaratPaklao Aug 3, 2024
19372ef
Rename readme.md to readme.md
ThummaratPaklao Aug 13, 2024
03220ec
Rename ecoli_core_model.mat to ecoli_core_model.mat
ThummaratPaklao Aug 13, 2024
d0eb1d2
Update and rename gene_exp.csv to gene_exp.csv
ThummaratPaklao Aug 13, 2024
6bd2e1e
Rename tutorial_Icongems.mlx to tutorial_Icongems.mlx
ThummaratPaklao Aug 13, 2024
1482f35
Update build.sh
AaronBrennan1 Aug 30, 2024
a249660
s
Aaron-Magnate Aug 30, 2024
ca5bd70
new CI test
Aaron-Magnate Sep 2, 2024
c353bd1
CI test
Aaron-Magnate Sep 2, 2024
0d3ec95
CI test
Aaron-Magnate Sep 2, 2024
43e7dc8
test CI
Aaron-Magnate Sep 2, 2024
c9ee68e
test ci
Aaron-Magnate Sep 4, 2024
0072c29
test CI
Aaron-Magnate Sep 4, 2024
4997fc4
ci test
Aaron-Magnate Sep 4, 2024
b085833
CI test
Aaron-Magnate Sep 9, 2024
a852370
ci test
Aaron-Magnate Sep 9, 2024
34f3d36
Update setup.sh
AaronBrennan1 Sep 9, 2024
74789d7
ci test
Aaron-Magnate Sep 9, 2024
340dfc8
Merge branch 'master' of https://github.com/opencobra/COBRA.tutorials
Aaron-Magnate Sep 9, 2024
02374b2
ci test
Aaron-Magnate Sep 9, 2024
059534d
Update setup.sh
AaronBrennan1 Sep 9, 2024
75ec9ab
ci test
Aaron-Magnate Sep 9, 2024
6b4fe90
Merge branch 'master' of https://github.com/opencobra/COBRA.tutorials
Aaron-Magnate Sep 9, 2024
38c83e8
Create fix.sh
AaronBrennan1 Sep 9, 2024
95ae949
Update main.yml
AaronBrennan1 Sep 9, 2024
f4583c3
Update main.yml
AaronBrennan1 Sep 9, 2024
4f400e4
fix mistake
AaronBrennan1 Sep 9, 2024
3d5ace7
Update main.yml
AaronBrennan1 Sep 9, 2024
9c42acd
Delete fix.sh
AaronBrennan1 Sep 9, 2024
a756693
Update setup.sh
AaronBrennan1 Sep 9, 2024
db66cb3
Update main.yml
AaronBrennan1 Sep 9, 2024
2f5f24c
Update build.sh
AaronBrennan1 Sep 9, 2024
c403b2c
Update setup.sh
AaronBrennan1 Sep 10, 2024
98c0b28
test60
AaronBrennan1 Sep 10, 2024
c1694b2
Update build.sh
AaronBrennan1 Sep 10, 2024
664a04a
ci test
AaronBrennan1 Sep 10, 2024
cdeec2e
Merge branch 'master' of https://github.com/opencobra/COBRA.tutorials
AaronBrennan1 Sep 10, 2024
4d20a0d
Update setup.sh
AaronBrennan1 Sep 10, 2024
8fc1ace
Update build.sh
AaronBrennan1 Sep 10, 2024
efe4983
ci test
AaronBrennan1 Sep 10, 2024
03d4be5
Update build.sh
AaronBrennan1 Sep 10, 2024
aeb8fc5
Update build.sh
AaronBrennan1 Sep 10, 2024
c00420e
ci test
AaronBrennan1 Sep 10, 2024
cdb6d09
ci test
AaronBrennan1 Sep 10, 2024
2385dc4
CI Test
AaronBrennan1 Sep 11, 2024
7ab561f
Create readme.md
AaronBrennan1 Sep 13, 2024
dcc4c67
Merge pull request #207 from ThummaratPaklao/addfile_tutorial_icongems
rmtfleming Oct 6, 2024
9e5cd66
Merge pull request #210 from opencobra/develop
rmtfleming Oct 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Sync MLX Files

on:
push:
branches: [ master ]
paths:
- '**.mlx'

jobs:
copy-changes:
runs-on: self-hosted
steps:
- name: Checkout Source Repo
uses: actions/checkout@v2
with:
repository: 'openCOBRA/COBRA.tutorials'
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Get All Changed Files
id: files
uses: jitterbit/get-changed-files@v1

- name: Find changed files
id: getfile
run: |
files=$(echo "${{ steps.files.outputs.all }}" | tr ' ' '\n' | grep -E '\.mlx$')
echo "::set-output name=file::$files"


- name: Give execute permission to the script
run: chmod +x build.sh

- name: Give execute permission to the other script
run: chmod +x setup.sh


- name: Sync with Destination Repo
run: |
counter=0
for file in ${{ steps.getfile.outputs.file }}; do
if [ $counter -eq 0 ]
then
# This is the first iteration, handle the file differently
./setup.sh opencobra/cobratoolbox $file
./build.sh opencobra/cobratoolbox $file
else
./build.sh openCOBRA/cobratoolbox $file
fi
counter=$((counter+1))
done
if: steps.getfile.outputs.file != ''
107 changes: 107 additions & 0 deletions .github/workflows/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## Continuous Integration of Tutorials:
### High level Overview
The whole idea of the continuous integration of the tutorials is that whenever a user contributes a tutorial in the format of a .mlx file on the [tutorials repo](https://github.com/opencobra/COBRA.tutorials) it should be converted to html and then rendered accordingly on the Cobratoolbox website in the [tutorials section](https://opencobra.github.io/cobratoolbox/stable/tutorials/index.html). This involves using MATLAB on a self-hosted server (King server) to generate the html file. This html is then pushed to the websites codebase repository which is the [gh-pages branch](https://github.com/opencobra/cobratoolbox/tree/gh-pages) of the main cobratoolbox repository.

GitHub actions is used to detect when a push (specifically .mlx push) is made to the tutorials repo. Then once the .mlx has been converted it is pushed to the gh-branch of the main repo. Again, GitHub actions can detect this push and configures the website to incorporate the extra tutorial.

### Detailed Documentation
**Step 1: Pushing MLX files to the tutorials repository:**
To understand GitHub actions you need to look for the github workflow folder where you will find a .yml which contains all the details about the github action. The worflows can be found by navigating to ./.github/workflows/ . In the tutorials repo you will find a ‘[main.yml](https://github.com/opencobra/COBRA.tutorials/blob/master/.github/workflows/main.yml)’ file.

**What does main.yml do?**
Here is an explanation of each section of the .yml file. Pictures of the sections are added and an explanation is given beneath the picture.

```
on:
push:
branches: [ master ]
paths:
- '**.mlx'
```


This section of code basically means it will only run when a push is made to the master branch and one of the file types is a .mlx file. If not .mlx files are pushed, we don’t continue.

```
jobs:
copy-changes:
runs-on: self-hosted
steps:
- name: Checkout Source Repo
uses: actions/checkout@v2
with:
repository: 'openCOBRA/COBRA.tutorials'
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
```


- Next, we have a series of ‘jobs’ to compute.
- The ‘runs-on’ parameter indicates where these jobs are computed. Here I specify it runs on ‘self-hosted’ because we need Matlab on King to run the .mlx to html. Generally, I would avoid using a self-hosted server but since Matlab is not an opensource programming language it needs to be ran a computer which has Matlab installed with a license.
- There are several steps to do in the jobs section. Here the first step is to checkout the source repo i.e. get all the details about the repo and the pushes made to the repo.

```
- name: Get All Changed Files
id: files
uses: jitterbit/get-changed-files@v1

- name: Find changed files
id: getfile
run: |
files=$(echo "${{ steps.files.outputs.all }}" | tr ' ' '\n' | grep -E '\.mlx$')
echo "::set-output name=file::$files"
```


- Here we have two more steps. The first step in this picture is used to find all the files that have been changed based on the most recent push.
- The next step is then used to find all the .mlx files that were pushed to the repository.

```
- name: Give execute permission to the script
run: chmod +x build.sh

- name: Give execute permission to the other script
run: chmod +x setup.sh
```


The chmod command just makes the .sh files executable.

**Quick note on setup.sh and build.sh:**

• The setup.sh script automates the process of synchronizing .mlx files to the ghpages branch of the cobratoolbox GitHub repository. It requires three inputs: the repository identifier in owner/name format, a token for authentication, and the file path of the .mlx files to be synchronized. Upon execution, the script clones the cobratoolbox repository, configures git for automated operations, and targets aspecific directory within stable/tutorials/ to update. It clears this directory and copies the new .mlx files into it, ensuring that any changes are committed and pushed. This operation keeps the gh-pages branch of the cobratoolbox repository consistently updated with the latest .mlx files for documentation or tutorials.

• The build.sh script is designed for converting .mlx files to .html format and synchronizing them with the gh-pages branch of the cobratoolbox repository,. It takes three arguments: the repository identifier, a token for authentication, and the path of the .mlx file to be converted. Initially, the script converts the .mlx file to .html using MATLAB commands, assuming MATLAB is installed and accessible in the PATH. It then clones the target repository, sets up git with predefined user details, and switches to the gh-pages branch. The script creates a target directory within stable/tutorials/, copies the converted .html file into this directory, and finalizes by committing and pushing the changes.

• Both files can be found on the tutorial’s repository. Here are the links to [setup.sh](https://github.com/opencobra/COBRA.tutorials/blob/master/setup.sh) and [build.sh](https://github.com/opencobra/COBRA.tutorials/blob/master/build.sh)

```
- name: Sync with Destination Repo
run: |
counter=0
for file in ${{ steps.getfile.outputs.file }}; do
if [ $counter -eq 0 ]
then
# This is the first iteration, handle the file differently
./setup.sh opencobra/cobratoolbox ${{ secrets.DEST_REPO_TOKEN }} $file
./build.sh opencobra/cobratoolbox ${{ secrets.DEST_REPO_TOKEN }} $file
else
./build.sh openCOBRA/cobratoolbox ${{ secrets.DEST_REPO_TOKEN }}
fi
counter=$((counter+1))
done
if: steps.getfile.outputs.file != ''
```

Here is the code to run the setup.sh and build.sh. We loop through all the .mlx files that were pushed. If it is the first file we are looking at we also run setup.sh to create the folder locations in the cobratoolbox – ghpages branch repository. Then afterwards build,sh is ran to convert the file to html and push to the created folder location

### Configuring the King Server

Go to this page of the repo to create a new self-hosted runner:

![image](https://github.com/opencobra/cobratoolbox/assets/68754265/05535af0-9ccf-4c38-9e79-512f738cc0f0)


By pressing the green new runner button, you are given easy instructions on how to set it up. You should have access to a terminal on King for this. To run the self-hosted runner nagivate to the folder you created it in and run ./run.sh to run the self-hosted runner.

You also need to make sure you have Matlab downloaded and working on the king server also. In the ‘[build.sh](https://github.com/opencobra/COBRA.tutorials/blob/master/build.sh)’ file the location of matlab is currently in my directory but you can add Matlab to another location and change the link to the location in the build.sh file.
Binary file added analysis/ICONGEMs/ecoli_core_model.mat
Binary file not shown.
Loading
Loading