Skip to content
Angela Sofia Burkhart Colorado edited this page Sep 8, 2026 · 19 revisions

Developer Notes

These are general notes for anyone continuing the development and maintenance of DietMicrobeNet.

Updating databases

This repo has a user call two databases, FooDB (pre-release version 1.0) and HMDB (version 5.0), but you do not need all information found in each database.

Updating FooDB

  • Download FooDB CSV file
  • Extract 3 files: CompoundExternalDescriptor.csv, Content.csv, and Food.csv and replace them in the OneDrive that Cathy has access to named FilesToBigForGit
  • Create a new All Foods files (this is so users can use the whole database instead of picking certain foods)
    • foodb_foods_dataframe.csv: you can create file will from the Food.csv and the script found in the repo DietMicrobeNet/Data/AllFood/GetAllFoods.R, and then replace old file with new found in that same directory DietMicrobeNet/Data/AllFood/
    • food_meta.csv: to create this file use script src/dietmicrobe/comp_FooDB.R, this takes the foodb_foods_dataframe.csv you just created, Content.csv, and CompoundExternalDescriptor.csv, and replace this in the OneDrive that Cathy has access to named FilesToBigForGit

Updating HMDB

  • Download AllMetabolites.xml
  • Use script in DietMicrobeNet/src/Supplementalfunctions/subset_hmdb.py to subset the database to what is required for this package and name resulting file hmdb.csv
  • Put hmdb.csv in OneDrive that Cathy has access to named FilesToBigForGit

For Files in OneDrive

Ensure sharing links for all files permissions are set to anyone with link can edit and updated in the docs, and should looks like wget '<url>?download=1' -O <file_path>

Warning

You MUST add the ?download=1 to the url so that wget works


Versioning

The versioning in this repo follows standard conventions vMAJOR.MINOR.BUG (for example: v1.0.11)

Note

Please remember to update the VERSION file.


Updating documention (website)

The website where all documentation for this repo is located.

Changing Website Content

This website is built off of several markdown files located in the /docs-site/ directory. ONLY change markdowns in the docs-site/docs/ directory.

If you want to add images, add them to the /img/ directory and then reference them in the other markdown files using:

  • ![name of image](img/new_image.png)

Pushing Changes to Github and Deploying

The website is automatically updated with each new tag (v#.#.#).

  • Every new tag should be recorded in the docs-site/docs/CHANGELOG.md file so that a developer can reference previous versions.

Once you're ready to push to repo, do this in terminal:

git add docs-site/docs/CHANGELOG.md                                    # add updates to changelog
git commit -m "updating changelog"                                     # commit file changes
git tag -a v1.0.0 -m "decribe tag (e.g., initial stable release)"      # change version number with each tag, here tag is v1.0.0
git push origin v1.0.0                                                 # make sure to push with tag 
git pull                                                               # this is a preference, but it is recommended

You can also push changes in files and new tags at the same time:

git add file.py
git add docs-site/docs/CHANGELOG.md
git commit -m "bug fix" 
git tag -a v1.0.1 -m "decribe tag (e.g., bug fix)"      
git push origin v1.0.1                                
git pull                 

Retrieving Whole Genome usage (v1.2.0)

In version 1.2.0 of the package you can access methods to develop networks using whole genomes from KEGG. This is later deprecated and will not be maintained but you can still use the old code.

To do this:

  1. Go to the repo's documentation and click 1.2.0
  2. Where it says git clone <url> in the installation instructions, instead type git clone --branch v1.2.0 --depth 1 <repository_url>