RAIMAD

Adding your (public) package to RAIDEX

This page is for TIFUUN collaborators. If you're an external user who wants to add your package to RAIDEX, you should contact the RAIDEX maintainer instead.

For this guide we assume that your code is hosted on a public github repo, so that your code is available for the world to read. Do you have a private github repo? Then go to the guide for private packages

Are your components part of the rai_compos_pub or rai_compos_priv packages? Then you do not need to do anything; those repos are already configured for RAIDEX. Check the README files for more info.

So, you've set up your package and want to add it to RAIDEX. Good!

Add your package to the requirements file

Clone the RAIDEX repository. Then, open the file deploy/raidex-packages.txt and add a line for your package in the following format format:

git+https://github.com/<user-or-org>/<repo-name>.git

So, for example, if the HTTP url to your package is https://github.com/tifuun/rai_smiley, then you would add git+https://github.com/tifuun/rai-smiley.git

Once you are done, commit your changes and push.

Since you have write access to the RAIDEX repository, it is easy for you to exfiltrate the RAIDEX private key, which you can use to read other people's private repositories.

We trust that you do not do this.

We also trust that you follow good cybersecurity practices and keep your github account safe.

Debugging your package deployment

Once you've pushed your changes to raidex, a runner should pick up the updated workflow file and rebuild raidex. You can check on how it is going in the "Actions" tab of the raidex repository on github. If something goes wrong, you can also read the error log there.

If your commit results in a failed build, do not panic. The last good version of raidex will still be available to everyone else. Read the error message, fix it, and push again.

Optional: publish to PyPI

If you want to make it easier for others to install your package, you should publish it to PyPI. Python's official documentation goes in-depth on how to do this. But generally, it boils down to the following steps:

  1. Create a PyPI account
  2. Create an API token for your account
  3. Install twine
  4. Inside of your package:
    1. python -m build
    2. python -m twine upload dist/rai_yourpackage-x.x.x*
  5. Verify that it worked: pip install rai_yourpackage

Once you have your package on pypi, you can replace your line in the raidex-packages.txt file with the name of your package.