Recommended .gitignore file?

Hey guys,

Do you have a recommended .gitignore for development?
I don’t want missing something clonning the repo in another device

Thanks

Any update on this post?
I’m also looking forward to save my
.config/rhasspy/profiles/en folder in a git repo. Will this be a problem?

1 Like

i’m not 100% sure but in the .gitignore of Rhasspy repo there’s some lines that make sense to me.

This actually depends on the project you’re developing. For example, if your build script is creating files in a directory build or downloads files in download, these directories should go into your .gitignore. Temporary files, virtual environments you create (.venv) and cache files (such as __pycache__) too.

@Mondmonarch are you saying that you want to put your Rhasspy profiles directory in the directory you downloaded from Rhasspy’s Git repository? As long as the repository doesn’t have a directory with the same name and you don’t accidentally add the directory to a commit for a pull request to the project, I don’t see any problem. But I don’t see much use for it either. It’s cleaner to keep your configuration/data separate from the project itself.

Thanks @koan, would you explain more about keep separate configuration/data with some project developed with Rhasspy? and what would be a good way to recreate/replicate a project with Rhasspy using a github repo?

In my case, I already did what @Mondmonarch say here:

But I also don’t see much use to keep all the files in profiles, that was the cause of my question.

This repo is only a integration with home assistant that (for now) only reply to voices commands

I would really leave your profile directory in your home directory, ~/.config/rhasspy/profiles/es instead of putting it in your Git repository. Except of course if you want every user of your project to use the same profile as you.

@koan At the moment I just need a way to save my configuration files like sentences.ini etc. in case my sd card will break (that’s why I thought about backing that up in a git repo).
Maybe you have some further advice on how to save Rhasspy’s current setup or rather configuration, beside a whole sd card image/backup.
I’m just wondering if there is a better way to install Rhasspy on new sd card and speed up the installation process

Oh right, when it’s for a backup, you can definitely save the profile directory in a Git repository (possibly a private one). Or you can just copy it to another computer or a NAS.

I personally backup all my configs (not just for rhasspy) on git aswell, since I want to see what I change over time aswell. For deployment I usually use ansible, even though I am the first to admit, that I often spend more time writing these automations, than I save by using them :upside_down_face:

2 Likes

I’m trying to generate the Rhasspy container copying only sentences.ini, profile.json, language_model.txt, dictionary.txt, and unkwown_words.txt in the rhasspy/profiles/es folder, and it looks to work, in the initial window where Rhasspy downloads the models also downloads the preferred wake word i’m using.

Do you think am I forgetting other important file? That would mean that every other file and folder in the rhasspy/profiles/es can be added into the .gitignore.

At first sight I don’t see anything that you’re forgetting, but the best way to know is just trying it :slight_smile:

In order to push the code to git I had to change the owner and group of the home/pi/.config/rhasspy/profiles/en from root to pi. Do you think this will cause any issues due to permissions?

Otherwise the upload worked fine :slight_smile: