Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @heiruwu
121 changes: 121 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Contributing Guidelines

We appreciate your contribution to this amazing project! Any form of engagement is welcome, including but not limiting to

- feature request
- documentation wording
- bug report
- roadmap suggestion
- ...and so on!

Please refer to the [community contributing section](https://github.com/instill-ai/community#contributing) for more details.

## Development and codebase contribution

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).

### Setup

#### Requirements

- Make:
- macOS: `$ xcode-select --install`
- Linux: [https://www.gnu.org](https://www.gnu.org/software/make)
- Python:
- `$ 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)
- Poetry: [https://python-poetry.org](https://python-poetry.org/docs/#installation)

To confirm these system dependencies are configured correctly:

```text
$ make doctor
```

#### Installation

Install project dependencies into a virtual environment:

```text
$ make install
```

### Development Tasks

#### Manual

Run the tests:

```text
$ make test
```

Run static analysis:

```text
$ make check
```

Build the documentation:

```text
$ make docs
```

#### Automatic

Keep all of the above tasks running on change:

```text
$ make dev
```

> In order to have OS X notifications, `brew install terminal-notifier`.

#### Continuous Integration

The CI server will report overall build status:

```text
$ make all
```

### Demo Tasks

Run the program:

```text
$ make run
```

Launch an IPython session:

```text
$ make shell
```

### Release Tasks

Release to PyPI:

```text
$ make upload
```

### Sending PRs

Please take these general guidelines into consideration when you are sending a PR:

1. **Fork the Repository:** Begin by forking the repository to your GitHub account.
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>`.
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:
- Adhere to the [conventional commits guidelines](https://www.conventionalcommits.org/) for meaningful commit messages.
- Follow the [7 rules of commit messages](https://chris.beams.io/posts/git-commit/) for well-structured and informative commits.
- 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.
4. **Push to Your Branch:** Push your branch to your GitHub repository: `git push origin feat/<your-feature-name>`.
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.

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**.

## Last words

Your contributions make a difference. Let's build something amazing together!
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
🗿 instill-base:
- "**"
13 changes: 13 additions & 0 deletions .github/workflows/add-label-to-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Add Label to PR

on:
pull_request_target:
types:
- opened
- synchronize

jobs:
triage:
uses: instill-ai/.github/.github/workflows/add-label-to-pr.yml@main
secrets:
botGitHubToken: ${{ secrets.botGitHubToken }}
14 changes: 14 additions & 0 deletions .github/workflows/add-pr-to-prj.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Add PR to Project

on:
pull_request_target:
types:
- opened

jobs:
track_pr:
uses: instill-ai/.github/.github/workflows/add-to-prj.yml@main
with:
project_number: 5
secrets:
botGitHubToken: ${{ secrets.botGitHubToken }}
2 changes: 0 additions & 2 deletions .tool-versions

This file was deleted.

8 changes: 0 additions & 8 deletions .verchew.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,3 @@ version = 3

cli = poetry
version = 1

[Graphviz]

cli = dot
cli_version_arg = -V
version = 7 || 8
optional = true
message = This is only needed to generate UML diagrams for documentation.
93 changes: 0 additions & 93 deletions CONTRIBUTING.md

This file was deleted.

17 changes: 2 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ dev: install .clean-test ## Continuously run CI tasks when files chanage

# SYSTEM DEPENDENCIES #########################################################

.PHONY: bootstrap
bootstrap: ## Attempt to install system dependencies
asdf plugin add python || asdf plugin update python
asdf plugin add poetry || asdf plugin update poetry
asdf install

.PHONY: doctor
doctor: ## Confirm system dependencies are available
bin/verchew
Expand Down Expand Up @@ -117,7 +111,7 @@ endif
MKDOCS_INDEX := site/index.html

.PHONY: docs
docs: mkdocs uml ## Generate documentation and UML
docs: mkdocs ## Generate documentation
ifndef CI
@ eval "sleep 3; open http://127.0.0.1:8000" &
poetry run mkdocs serve
Expand All @@ -129,7 +123,7 @@ $(MKDOCS_INDEX): docs/requirements.txt mkdocs.yml docs/*.md
@ mkdir -p docs/about
@ cd docs && ln -sf ../README.md index.md
@ cd docs/about && ln -sf ../../CHANGELOG.md changelog.md
@ cd docs/about && ln -sf ../../CONTRIBUTING.md contributing.md
@ cd docs/about && ln -sf ../../.github/CONTRIBUTING.md contributing.md
@ cd docs/about && ln -sf ../../LICENSE.md license.md
poetry run mkdocs build --clean --strict

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

.PHONY: uml
uml: install docs/*.png
docs/*.png: $(MODULES)
poetry run pyreverse $(PACKAGE) -p $(PACKAGE) -a 1 -f ALL -o png --ignore tests
- mv -f classes_$(PACKAGE).png docs/classes.png
- mv -f packages_$(PACKAGE).png docs/packages.png

# DEMO ########################################################################

.PHONY: run
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,28 @@ python sdk for Instill AI products
[![PyPI Version](https://img.shields.io/pypi/v/instill-python-sdk.svg)](https://pypi.org/project/instill-python-sdk)
[![PyPI Downloads](https://img.shields.io/pypi/dm/instill-python-sdk.svg?color=orange)](https://pypistats.org/packages/instill-python-sdk)

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

## Setup

### Requirements

* Python 3.8+
- Python 3.8+

### Installation

Install it directly into an activated virtual environment:

```text
$ pip install instill-python-sdk
$ pip install instill-sdk
```

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

```text
$ poetry add instill-python-sdk
$ poetry add instill-sdk
```

## Usage
Expand All @@ -37,4 +41,9 @@ $ python
>>> import instill_sdk
>>> instill_sdk.__version__
```

### You can find a [_notebook example_](notebooks/model_usage.ipynb) here

## Contributing

Please refer to the [Contributing Guidelines](./.github/CONTRIBUTING.md) for more details.
2 changes: 1 addition & 1 deletion docs/about/contributing.md
Loading