Skip to content

Commit 6fb0c84

Browse files
authored
docs(contributing,readme): update docs and workflow for contributing (#12)
Because - allow clear and concise guide on how to contribute for upcoming `hacktoberfest` This commit - make sure `make` commands all works - setup workflows for `PR` label - update `README` and `CONTRIBUTING`
1 parent 7749402 commit 6fb0c84

File tree

13 files changed

+235
-142
lines changed

13 files changed

+235
-142
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @heiruwu

.github/CONTRIBUTING.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Contributing Guidelines
2+
3+
We appreciate your contribution to this amazing project! Any form of engagement is welcome, including but not limiting to
4+
5+
- feature request
6+
- documentation wording
7+
- bug report
8+
- roadmap suggestion
9+
- ...and so on!
10+
11+
Please refer to the [community contributing section](https://github.com/instill-ai/community#contributing) for more details.
12+
13+
## Development and codebase contribution
14+
15+
Before delving into the details to come up with your first PR, please familiarise yourself with the project structure of [Instill Core](https://github.com/instill-ai/community#instill-core).
16+
17+
### Setup
18+
19+
#### Requirements
20+
21+
- Make:
22+
- macOS: `$ xcode-select --install`
23+
- Linux: [https://www.gnu.org](https://www.gnu.org/software/make)
24+
- Python:
25+
- `$ conda create -n sdk python=3.X` [https://docs.conda.io/projects/miniconda/en/latest/](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html)
26+
- Poetry: [https://python-poetry.org](https://python-poetry.org/docs/#installation)
27+
28+
To confirm these system dependencies are configured correctly:
29+
30+
```text
31+
$ make doctor
32+
```
33+
34+
#### Installation
35+
36+
Install project dependencies into a virtual environment:
37+
38+
```text
39+
$ make install
40+
```
41+
42+
### Development Tasks
43+
44+
#### Manual
45+
46+
Run the tests:
47+
48+
```text
49+
$ make test
50+
```
51+
52+
Run static analysis:
53+
54+
```text
55+
$ make check
56+
```
57+
58+
Build the documentation:
59+
60+
```text
61+
$ make docs
62+
```
63+
64+
#### Automatic
65+
66+
Keep all of the above tasks running on change:
67+
68+
```text
69+
$ make dev
70+
```
71+
72+
> In order to have OS X notifications, `brew install terminal-notifier`.
73+
74+
#### Continuous Integration
75+
76+
The CI server will report overall build status:
77+
78+
```text
79+
$ make all
80+
```
81+
82+
### Demo Tasks
83+
84+
Run the program:
85+
86+
```text
87+
$ make run
88+
```
89+
90+
Launch an IPython session:
91+
92+
```text
93+
$ make shell
94+
```
95+
96+
### Release Tasks
97+
98+
Release to PyPI:
99+
100+
```text
101+
$ make upload
102+
```
103+
104+
### Sending PRs
105+
106+
Please take these general guidelines into consideration when you are sending a PR:
107+
108+
1. **Fork the Repository:** Begin by forking the repository to your GitHub account.
109+
2. **Create a New Branch:** Create a new branch to house your work. Use a clear and descriptive name, like `<your-github-username>/<what-your-pr-about>`.
110+
3. **Make and Commit Changes:** Implement your changes and commit them. We encourage you to follow these best practices for commits to ensure an efficient review process:
111+
- Adhere to the [conventional commits guidelines](https://www.conventionalcommits.org/) for meaningful commit messages.
112+
- Follow the [7 rules of commit messages](https://chris.beams.io/posts/git-commit/) for well-structured and informative commits.
113+
- Rearrange commits to squash trivial changes together, if possible. Utilize [git rebase](http://gitready.com/advanced/2009/03/20/reorder-commits-with-rebase.html) for this purpose.
114+
4. **Push to Your Branch:** Push your branch to your GitHub repository: `git push origin feat/<your-feature-name>`.
115+
5. **Open a Pull Request:** Initiate a pull request to our repository. Our team will review your changes and collaborate with you on any necessary refinements.
116+
117+
When you are ready to send a PR, we recommend you to first open a `draft` one. This will trigger a bunch of `integration-test` [workflows](https://github.com/instill-ai/model/tree/main/.github/workflows) running a thorough test suite on multiple platforms. After the tests are done and passed, you can now mark the PR `open` to notify the codebase owners to review. We appreciate your endeavour to pass the integration test for your PR to make sure the sanity with respect to the entire scope of **Instill Core**.
118+
119+
## Last words
120+
121+
Your contributions make a difference. Let's build something amazing together!

.github/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
🗿 instill-base:
2+
- "**"

.github/workflows/add-label-to-pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Add Label to PR
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
jobs:
10+
triage:
11+
uses: instill-ai/.github/.github/workflows/add-label-to-pr.yml@main
12+
secrets:
13+
botGitHubToken: ${{ secrets.botGitHubToken }}

.github/workflows/add-pr-to-prj.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Add PR to Project
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
8+
jobs:
9+
track_pr:
10+
uses: instill-ai/.github/.github/workflows/add-to-prj.yml@main
11+
with:
12+
project_number: 5
13+
secrets:
14+
botGitHubToken: ${{ secrets.botGitHubToken }}

.tool-versions

Lines changed: 0 additions & 2 deletions
This file was deleted.

.verchew.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,3 @@ version = 3
1212

1313
cli = poetry
1414
version = 1
15-
16-
[Graphviz]
17-
18-
cli = dot
19-
cli_version_arg = -V
20-
version = 7 || 8
21-
optional = true
22-
message = This is only needed to generate UML diagrams for documentation.

CONTRIBUTING.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ dev: install .clean-test ## Continuously run CI tasks when files chanage
1313

1414
# SYSTEM DEPENDENCIES #########################################################
1515

16-
.PHONY: bootstrap
17-
bootstrap: ## Attempt to install system dependencies
18-
asdf plugin add python || asdf plugin update python
19-
asdf plugin add poetry || asdf plugin update poetry
20-
asdf install
21-
2216
.PHONY: doctor
2317
doctor: ## Confirm system dependencies are available
2418
bin/verchew
@@ -117,7 +111,7 @@ endif
117111
MKDOCS_INDEX := site/index.html
118112

119113
.PHONY: docs
120-
docs: mkdocs uml ## Generate documentation and UML
114+
docs: mkdocs ## Generate documentation
121115
ifndef CI
122116
@ eval "sleep 3; open http://127.0.0.1:8000" &
123117
poetry run mkdocs serve
@@ -129,7 +123,7 @@ $(MKDOCS_INDEX): docs/requirements.txt mkdocs.yml docs/*.md
129123
@ mkdir -p docs/about
130124
@ cd docs && ln -sf ../README.md index.md
131125
@ cd docs/about && ln -sf ../../CHANGELOG.md changelog.md
132-
@ cd docs/about && ln -sf ../../CONTRIBUTING.md contributing.md
126+
@ cd docs/about && ln -sf ../../.github/CONTRIBUTING.md contributing.md
133127
@ cd docs/about && ln -sf ../../LICENSE.md license.md
134128
poetry run mkdocs build --clean --strict
135129

@@ -138,13 +132,6 @@ docs/requirements.txt: poetry.lock
138132
@ poetry export --with dev --without-hashes | grep pygments >> $@
139133
@ poetry export --with dev --without-hashes | grep jinja2 >> $@
140134

141-
.PHONY: uml
142-
uml: install docs/*.png
143-
docs/*.png: $(MODULES)
144-
poetry run pyreverse $(PACKAGE) -p $(PACKAGE) -a 1 -f ALL -o png --ignore tests
145-
- mv -f classes_$(PACKAGE).png docs/classes.png
146-
- mv -f packages_$(PACKAGE).png docs/packages.png
147-
148135
# DEMO ########################################################################
149136

150137
.PHONY: run

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,28 @@ python sdk for Instill AI products
88
[![PyPI Version](https://img.shields.io/pypi/v/instill-python-sdk.svg)](https://pypi.org/project/instill-python-sdk)
99
[![PyPI Downloads](https://img.shields.io/pypi/dm/instill-python-sdk.svg?color=orange)](https://pypistats.org/packages/instill-python-sdk)
1010

11+
> :exclamation: **This SDK tool is under heavy development!!**
12+
> Currently there is no official wheel on `pypi`, and documentation on how to setup and tutorials will be available soon.Stay tuned!
13+
> For now, you can refer to the `Contributing Guidelines` to setup a development environment
14+
1115
## Setup
1216

1317
### Requirements
1418

15-
* Python 3.8+
19+
- Python 3.8+
1620

1721
### Installation
1822

1923
Install it directly into an activated virtual environment:
2024

2125
```text
22-
$ pip install instill-python-sdk
26+
$ pip install instill-sdk
2327
```
2428

2529
or add it to your [Poetry](https://poetry.eustace.io/) project:
2630

2731
```text
28-
$ poetry add instill-python-sdk
32+
$ poetry add instill-sdk
2933
```
3034

3135
## Usage
@@ -37,4 +41,9 @@ $ python
3741
>>> import instill_sdk
3842
>>> instill_sdk.__version__
3943
```
44+
4045
### You can find a [_notebook example_](notebooks/model_usage.ipynb) here
46+
47+
## Contributing
48+
49+
Please refer to the [Contributing Guidelines](./.github/CONTRIBUTING.md) for more details.

0 commit comments

Comments
 (0)