Skip to content

Commit fc6847e

Browse files
authored
Merge pull request #24 from relic-se/contributing
Add contributing guide
2 parents a7c385c + df1b5eb commit fc6847e

File tree

2 files changed

+84
-6
lines changed

2 files changed

+84
-6
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ python build/build.py
1717
```
1818

1919
The project bundle should be found within `./dist` as a `.zip` file with the same name as your repository.
20+
21+
## Contributing
22+
23+
Interested in adding your Fruit Jam application to the library database? You can do so by following [this guide](database/CONTRIBUTING.md).

database/CONTRIBUTING.md

Lines changed: 80 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,82 @@
11
# Contributing
22

3-
> TODO
4-
> - Setup repo
5-
> - metadata (Fruit_Jam_Application as example)
6-
> - Fork
7-
> - Appending repo to appropriate category list of `applications.json`
8-
> - Create Pull Request
3+
So, you've built a Fruit Jam application and you're ready to share it with the world? That's great! This guide will walk you through the steps of setting up your GitHub code repository, appending it to the library database, and creating a pull request to get the database updated.
4+
5+
## 1. Setup your application's GitHub repository
6+
7+
GitHub is imperative to the operation of the library. All application assets are queried and downloaded from public GitHub repositories. If you would like your application included in the library, you will need to publish it within a public git repository.
8+
9+
### Optional: Create your first release!
10+
11+
The library can pull source code directly from your code repository, but if your application requires libraries which aren't included with Fruit Jam OS or you want to have better versioning control of your application, it's recommend that you utilize GitHub's release system.
12+
13+
If you've followed the actions format in the [Fruit_Jam_Application](https://github.com/relic-se/Fruit_Jam_Application) template and [enabled GitHub Actions on your repository](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository), it will automatically package your application for the latest CircuitPython versions with all included libraries determined by `requirements.txt`.
14+
15+
## 2. Create your own fork of Fruit_Jam_Library
16+
17+
Unless you already have a fork of this repository within your GitHub account, follow [this guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) to create your own fork.
18+
19+
Once you've got your fork created, you'll want to clone it onto your local machine so that you can begin working within the repository. You can do this by following [this guide](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
20+
21+
## 4. Create a new branch within your fork
22+
23+
So now that you have your copy of the library, you'll want to split out into your own branch. There are a number of ways to do this depending on your environment, but we'll cover the CLI implementation here:
24+
25+
``` bash
26+
cd Fruit_Jam_Library
27+
git checkout -b {YOUR_BRANCH_NAME}
28+
```
29+
30+
This should create a new branch with your specified name (it's recommended that you use a variant of your application's name) and switch over to it in one fell swoop.
31+
32+
## 3. Add your repository to the applications database
33+
34+
The database, found at [database/applications.json](applications.json) is formatted as a JSON file and sorted into categories. At this time, there are 4 categories: Games, Music, Utilities, and Video. If you feel that your application doesn't fit into any of the available categories, you can add a new category object key to the top level with your application in a new array.
35+
36+
_Note: Try to keep your application organized alphabetically by title!_
37+
38+
## 4. Update the database README
39+
40+
The library has a system in place to automatically provide updated details on each application within the [database README](README.md). So, it isn't required (nor recommended) for you manually update the database listing for your application.
41+
42+
In order to run the build script, you will need to have [Python 3](https://www.python.org/) with PIP support configured on your system. Then, you should be able to follow the following script to install all dependencies and rebuild the database listings:
43+
44+
``` bash
45+
cd Fruit_Jam_Library
46+
pip3 -r database/requirements.txt
47+
python3 database/build.py
48+
```
49+
50+
## 5. Commit your changes
51+
52+
In order to update your branch with your latest changes, you'll need to commit those changes. We'll demonstrate the way to do this via the git CLI here, but it's recommended to use an application such as [Github Desktop](https://desktop.github.com/) to have a better visualization of the process.
53+
54+
``` bash
55+
git status
56+
git add --all
57+
git commit -m "Added {YOUR_APPLICATION_NAME}"
58+
```
59+
60+
## 6. Publish your branch
61+
62+
You may have noticed that your changes aren't visible on your fork on GitHub just yet. That's because we need to publish your new branch and push all of the committed changes you've made. This is easy to do with a single command:
63+
64+
``` bash
65+
git push --set-upstream origin {YOUR_BRANCH_NAME}
66+
```
67+
68+
Now, if you view your repository on GitHub, it should show your new branch and the commit that you published.
69+
70+
## 7. Create your pull request
71+
72+
In order to merge your changes with the main repository so that your application is visible to all users, you will need to create a pull request from your branch into `relic-se/Fruit_Jam_Application` which will then undergo review before being accepted into the library.
73+
74+
You can follow [this guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to learn how to use GitHub's interfaces to create the pull request.
75+
76+
Don't worry too much about the description of the pull request. It doesn't hurt to talk a little about your application and any special considerations which may need to be made, but that isn't necessary.
77+
78+
## You're done!
79+
80+
Just wait for final review of your pull request. A moderator may request additional changes before final acceptance.
81+
82+
Once again, thank you for your interest in sharing your application with the library!

0 commit comments

Comments
 (0)