If you're interested in contributing to the UpTrain repository, we'd love to have you!
This document has two parts:
- Development: To contribute to the codebase
- Documentation: To contribute to the documentation
Here's a more detailed guide on how to get started:
-
First, fork the repository to your own GitHub account. This will create a copy of the repository that you can make changes to.
-
Next, navigate to the repository on your own account. This is where you'll make your changes and additions. But first you need to clone the repository to your local system using (replacing "YOUR_GITHUB_USERNAME" with your actual GitHub username)
git clone https://github.com/YOUR_GITHUB_USERNAME/uptrain
- Run
cd uptrain
to change your current working directory and run the following command to create a new branch:
git checkout -b YOUR_GITHUB_USERNAME/somefeature
- Now it's time to make changes! You can add new files, modify existing files, or delete files that are no longer needed. To reinstall the UpTrain package with your local changes, run the following in the
uptrain
repository home folder:
pip install .
- Before you add your changes, run Black on your source files or directory. It is an automated code formatting tool that makes your code compliant to standard Python style guides. Read the documentation for detailed information.
# Install Black
pip install black black[jupyter]
# Format your source changes
black {source_file_or_directory}
# or
python -m black {source_file_or_directory}
-
Once you've made the changes you want, you'll need to add them to a commit. You can do this by running the command
git add filename
for each file name you want to add/update. This will add all changes to the next commit. -
Now you're ready to commit your changes. You'll need to provide a commit message that briefly describes the changes you've made. You can do this by running the command (replacing "Add something" with a brief description of your changes)
git commit -m 'Add something'
- Finally, you'll need to push your changes to the branch you created in step 3. You can do this by running the command (using
HEAD
will prevent you from accidentally pushing to the wrong remote branch. )
git push origin HEAD
- Once your changes are pushed, you can go back to the UpTrain repository on GitHub and make a pull request. This is where you'll describe your changes and ask for them to be reviewed and merged into the main repository.
Thank you for your interest in contributing to UpTrain! We look forward to reviewing your pull request and incorporating your changes ❤️
Follow the steps below to make changes to the documentation:
-
Fork the repository to your own GitHub account. This will create a copy of the repository that you can make changes to.
-
Clone the repository to your local system (replace "YOUR_GITHUB_USERNAME" with your GitHub username)
git clone https://github.com/YOUR_GITHUB_USERNAME/uptrain
- Run
cd uptrain
to change your current working directory and run the following command to create a new branch:
git checkout -b YOUR_GITHUB_USERNAME/somefeature
- Before you get started, you'll need to install the dependencies. You can do this by running the following commands:
npm i -g mintlify
mintlify install
- Navigate to the docs folder using
cd docs
and run the following command to start the development server:
mintlify dev
-
Now it's time to make changes! You can add new files, modify existing files, or delete files that are no longer needed and preview them in your browser at http://localhost:3000.
-
Once you've made the changes you want, you'll need to add them to a commit. You can do this by running the command
git add filename
for each file name you want to add/update. This will add all changes to the next commit. -
Now you're ready to commit your changes. You'll need to provide a commit message that briefly describes the changes you've made. (replace "Add something" with a brief description of your changes)
git commit -m 'Add something'
- Finally, you'll need to push your changes to the branch you created in step 3. You can do this by running the command (using
HEAD
will prevent you from accidentally pushing to the wrong remote branch. )
git push origin HEAD
- Once your changes are pushed, you can go back to the UpTrain repository on GitHub and make a pull request. This is where you'll describe your changes and ask for them to be reviewed and merged into the main repository.
Thank you for your interest in contributing to UpTrain! We look forward to reviewing your pull request and incorporating your changes ❤️