Skip to content

Commit

Permalink
Merge pull request #2 from brunchstudio/docs
Browse files Browse the repository at this point in the history
Improvements before release
  • Loading branch information
jhenrybrunch authored Mar 21, 2024
2 parents 4221f33 + 71ce9c1 commit ff49169
Show file tree
Hide file tree
Showing 38 changed files with 1,013 additions and 242 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ jobs:
version: 1.7.0

- name: Installing dependencies...
run: poetry install --with dev,test
run: poetry install --no-interaction --with dev,test

- name: Formatting check
if: always()
run: poetry run black --check .

- name: Type checking
run: poetry run mypy .

- name: Linting
if: always()
run: poetry run ruff .

- name: Type checking
if: always()
run: poetry run mypy .
6 changes: 3 additions & 3 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Publish documentation

on:
push:
branches:
- main
tags:
- "*"

permissions:
contents: write
Expand Down Expand Up @@ -37,5 +37,5 @@ jobs:
restore-keys: |
mkdocs-material-
- run: poetry install --with docs
- run: poetry install --no-interaction --with docs
- run: poetry run mkdocs gh-deploy --force
23 changes: 23 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish package to PyPi

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install Poetry Action
uses: snok/[email protected]
with:
version: 1.7.0

- name: Publish to PyPi
run: poetry publish --build --username __token__ --password ${{ secrets.PYPI_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Unit tests

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
unit-tests:
runs-on: self-hosted

concurrency:
group: uses-tvpaint
cancel-in-progress: true

strategy:
fail-fast: true
max-parallel: 1
matrix:
python-version: [python39, python310, python311, python312]

env:
VENV_PATH: ${{ github.workspace }}/env_${{ matrix.python-version }}
PYTHON_EXE: C:/Users/usermuster/scoop/apps/${{ matrix.python-version }}/current/python.exe

steps:
- uses: actions/checkout@v4

- name: Setup Poetry in venv
run: |
${{ env.PYTHON_EXE }} -m venv ${{ env.VENV_PATH }}
${{ env.VENV_PATH }}/Scripts/pip.exe install --quiet poetry
- name: Installing dependencies with Poetry...
env:
POETRY_EXE: ${{ env.VENV_PATH }}/Scripts/poetry.exe
POETRY_VENV: ${{ github.workspace }}/.venv
shell: powershell
run: |
if (test-path ${{ env.POETRY_VENV }}) { rm -r ${{ env.POETRY_VENV }} }
${{ env.POETRY_EXE }} config virtualenvs.in-project true
${{ env.POETRY_EXE }} install --no-interaction --with test
- name: Pytest with coverage
run: ${{ env.VENV_PATH }}/Scripts/poetry.exe run pytest --maxfail 5 --cov=pytvpaint
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
# Pytvpaint 🐍 → 🦋
# PyTVPaint 🐍 → 🦋

[![](https://img.shields.io/github/actions/workflow/status/brunchstudio/pytvpaint/docs-deploy.yml?label=docs)](https://brunchstudio.github.io/pytvpaint/)
[![](https://img.shields.io/github/license/brunchstudio/pytvpaint)](https://github.com/brunchstudio/pytvpaint/blob/main/LICENSE.md)
[![](https://img.shields.io/pypi/v/pytvpaint)](https://pypi.org/project/pytvpaint/)
[![Downloads](https://static.pepy.tech/badge/pytvpaint/month)](https://pepy.tech/project/pytvpaint)
[![](https://img.shields.io/pypi/pyversions/pytvpaint)](https://pypi.org/project/pytvpaint/)
[![](https://custom-icon-badges.demolab.com/badge/custom-11.5+-blue.svg?logo=butterfly_1f98b&label=TVPaint)](https://www.tvpaint.com/doc/tvp11/)

<p align="center">
<img src="https://raw.githubusercontent.com/brunchstudio/pytvpaint/main/docs/assets/pytvpaint_code_banner.png" width=700 />
</p>

**Pytvpaint** is a type-safe Python library that wraps the George programming language commands in order to interact with the 2D animation software TVPaint.
**PyTVPaint** is a type-safe Python library that wraps the George programming language commands in order to interact with the 2D animation software TVPaint.

It communicates through WebSocket to a [custom C++ plugin](https://github.com/brunchstudio/tvpaint-rpc) running in an opened TVPaint instance.

You can check the [documentation](https://brunchstudio.github.io/pytvpaint/) for more details.

## Installation

First install the [TVPaint RPC plugin](https://brunchstudio.github.io/pytvpaint/installation/#tvpaint-plugin-installation).
### Requirements

Then install the package with Pip:
- Windows (for now, see [this](https://brunchstudio.github.io/pytvpaint/limitations/#windows-only))
- Python v3.9+
- TVPaint v11.5+
- TVPaint RPC plugin (install instructions [here](https://brunchstudio.github.io/pytvpaint/installation/#tvpaint-plugin-installation))

Install the package with Pip:

```console
pip install pytvpaint
Expand Down Expand Up @@ -59,12 +65,24 @@ project.close()
Pull requests are welcome. For major changes, please [open an issue](https://github.com/brunchstudio/pytvpaint/issues/new/choose) first
to discuss what you would like to change.

Please make sure to update tests as appropriate.
Please make sure to [update tests](https://brunchstudio.github.io/pytvpaint/contributing/developer_setup/#unit-tests) as appropriate.

## Disclaimer

PyTVPaint is a project created at BRUNCH Studio to facilitate our developer experience with George. The API is targeted at experienced developers and is by no means a replacement for TVPaint or George but simply builds on it.

We are not affiliated with the TVPaint development team and therefore can't fix any bugs in the software or the George API.

Please direct your issues appropriately; any issues with PyTVPaint should be submitted as [an issue in this repository](https://github.com/brunchstudio/pytvpaint/issues) or the [C++ plugin's repository](https://github.com/brunchstudio/tvpaint-rpc), any issues with TVPaint the software should be addressed to the [tvp support team](https://tvpaint.odoo.com/en_US/contactus).

For any questions on the limitations of our API, please head to [this page](https://brunchstudio.github.io/pytvpaint/limitations/).

## License

[MIT](./LICENSE.md)

<hr>

Made with ❤️ at [BRUNCH Studio](https://brunchstudio.tv/) 🥐🍳
Made with ❤️ at

[<img src='https://raw.githubusercontent.com/brunchstudio/pytvpaint/docs/docs/assets/logo_brunch_black.svg' width='110'>](https://brunchstudio.tv/)
1 change: 1 addition & 0 deletions docs/assets/logo_brunch_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ff49169

Please sign in to comment.