Project originally built for the Bio X AI Hackathon. All about resurrecting old abandonware repos, and reducing the effort to get them up and running again.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
A project built for resurrecting the countless abandonware repos littering GitHub. The goal is to make it easier to turn any repo, no matter how old, and turn it into a working GitHub Codespace.
rescuerepo_demo_video.mp4
- Python
- NextJS
- OpenAI
- FastAPI
- React
- LangChain
- Supabase
- Docker
- GitHub Codespaces
- Postmark
- Celery
- RabbitMQ
For running this project locally, you can skip ahead to the Usage section.
To get a local copy up and running follow these simple steps:
Here is a list of prerequisites you need to install before you can start using the examples in this repo.
- python 3.9 or later
- node 14.17.0 or later
- NPX 7.19.1 or later
- First, Fork/Clone the repository.
Using HTTPS:
git clone https://github.com/matthew-mcateer/rescuerepo.git
or using the GitHub CLI:
gh repo clone matthew-mcateer/rescuerepo
- Obtain the following API keys, and put them in a
.env
file in theapi
directory of the project. You can use the api/.env.example file as a template.
your SUPABASE_URL
and SUPABASE_ANON_KEY
k from your Supabase account
export SUPABASE_URL=<your-supabase-url>
export SUPABASE_ANON_KEY=<your-supabase-anon-key>
your OpenAI API key
export OPENAI_API_KEY=<your-api-key>
your Anthropic API key
export ANTHROPIC_API_KEY=<your-api-key>
Your GitHub access token (classic) (make sure it has the codespace
and repo
scopes):
export GH_ACCESS_TOKEN=<your-api-key>
Getting your properly-scoped GitHub Access token (click to expand)
-
First, log in to your GitHub account.
-
Click on your profile photo in the upper right corner of any page.
-
From the dropdown menu, select "Settings."
-
On the settings page, find "Developer settings" at the bottom of the left-hand side menu and click it.
-
Now you should see "Personal access tokens" on the left-hand side menu, click it (click the "classic" tokens).
-
Click "Generate new token" on the Personal access tokens page.
-
In the "Note" field, enter a descriptive name for this token that will help you recognize its purpose later (e.g., "Token for forking and Codespaces").
-
To choose the required permissions, you'll need to select the following scopes:
- For forking repositories, you will need the "repo" scope which includes 'public_repo' and others.
- To create GitHub Codespaces, you will need the 'codespaces' scope which will allow "full access to managing user codespaces." Therefore, you should select both 'repo' and 'codespaces'.
-
Scroll down and click "Generate token" at the bottom of the page.
-
After you click the "Generate token" button, GitHub will display your new personal access token. Make sure you copy this token value and store it in a secure location. GitHub will not show the token to you again.
Your CELERY_BROKER_URL
:
export CELERY_BROKER_URL=<your-api-key>
Getting your CELERY_BROKER_URL
(click to expand)
If you're using RabbitMQ, you can use export CELERY_BROKER_URL=pyamqp://guest@localhost//
.
The demo version of this project is using a CloudAMQP instance from Heroku (the free "Little Lemur" tier).
Or if you're using redis, you can use docker run -d -p 6379:6379 redis && export CELERY_BROKER_URL=redis://localhost:6379/0
.
Your POSTMARK_API_KEY
:
export POSTMARK_API_KEY=<your-api-key>
Getting your POSTMARK_API_KEY
(click to expand)
Set up a https://postmarkapp.com/ account, and see the developer documentation.
- Once you've added your API keys to the file
api/.env
, you can set the environment variable with the following command:
$ export $(cat api/.env | xargs)
- Install the python dependencies.
$ python3.9 -m venv env
$ source env/bin/activate
(env)$ pip install -r requirements.txt
- Make sure that you have
npx
installed, and install the frontend dependencies:
$ npm install -g npx
$ npm install
- (OPTIONAL): Start up the Celery worker in one terminal window (separate from the one in the next step):
$ (env)$ celery --app api.tasks worker --loglevel INFO
- In a terminal window, run the NextJS front-end (which concurrently starts up the server-side FastAPI backend):
$ npm run dev
- Navigate to http://localhost:3000 to see the app running in your browser.
- (OPTIONAL): navigate to http://localhost:8000/api/docs to see the FastAPI docs.
In order to start this project locally, you'll need to start the frontend and then the backend.
First, follow the installation instructions above.
Navigate to http://localhost:3000 to see the app running in your browser.
Sign into GitHub, after which you'll be greeted with the below page.
You can enter in a GitHub repo URL of your choice. At the moment the default is https://github.com/lucidrains/progen
.
Include with this information your GitHub Access token (make sure it has the repos
and codespaces
scopes enabled), as well as your email.
This will trigger the creation of the GitHub codespace.
If you navigate to the GitHub Codespaces Dashboard, you should see it being created (will resemble the below).
And if you load the codespace, you should be able to access it through VSCode or in the browser
The scope of this project is admittedly quite large, so we've broken it down into a few phases:
- ✅ Embedding Map of Bioinformatics tools ( view here, see the notebook for its creation here )
- ✅ Setting up a workflow for generating dev environments from an arbitrary repo
- ✅ Creating a fork with a
dockerfile
,devcontainer.json
, and anything else needed for a GitHub Codespace - ✅ Automatically Generated Dev Environments using GPT-4 (or Claude 100k)
- 🚧 Get running environments built without error >50% of the time
- ✅ Creating a fork with a
- ✅ Automatically Refactoring Code using GPT-4 (or Claude 100k)
- 🚧 Translating languages using GPT-4 (or Claude 100k)
- ✅ Nextflow-to-Flyte Translaton
- 🚧 Nextflow-to-Snakemake Translaton
- 🚧 Nextflow-to-Redun Translaton
- 🚧 Nextflow-to-CWL Translaton
- 🚧 MATLAB-to-Python Translaton
- 🚧 Improving the UI/UX of the above.
See the open issues for a full list of proposed features (and known issues).
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Matthew Mcateer (Author) - @MatthewMcAteer0 - bioml@5cubelabs.us
Project Link: https://github.com/matthew-mcateer/rescuerepo
We'd like to thank everyone for their contributions to this project and the hackathon.
We would also like to thank the organizers of the Bio X AI Hackathon for putting on such a great event.