Skip to content

Commit

Permalink
PR: Implement support for pyright and typing annotations. (#116)
Browse files Browse the repository at this point in the history
* Implement initial support for "pyright".

Signed-off-by: Thomas Mansencal <tmansencal@wetafx.co.nz>

* Fix initial static typing issues.

Define a good baseline without errors or warnings.

Signed-off-by: Thomas Mansencal <tmansencal@wetafx.co.nz>

* Add typing annotations to `opencolorio_config_aces.clf.discover` sub-package.

Signed-off-by: Thomas Mansencal <tmansencal@wetafx.co.nz>

---------

Signed-off-by: Thomas Mansencal <tmansencal@wetafx.co.nz>
  • Loading branch information
tmansencal committed May 3, 2024
1 parent 8f1a27b commit e19ea45
Show file tree
Hide file tree
Showing 12 changed files with 315 additions and 246 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/continuous-integration-static-type-checking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Continuous Integration - Static Type Checking

on: [push, pull_request]

jobs:
continuous-integration-static-type-checking:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: [macOS-latest]
python-version: [3.11]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Environment Variables
run: |
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install graphviz
export GRAPHVIZ_DIR="/usr/local/Cellar/graphviz/<VERSION>"
pip install pygraphviz --global-option=build_ext --global-option="-I$GRAPHVIZ_DIR/include" --global-option="-L$GRAPHVIZ_DIR/lib"
- name: Install Package Dependencies
run: |
pip install -r requirements.txt
- name: Static Type Checking
run: |
pyright --skipunannotated
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Development Dependencies
- `invoke <https://pypi.org/project/invoke>`__
- `pre-commit <https://pypi.org/project/pre-commit>`__
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
- `pyright <https://pypi.org/project/pyright>`__
- `pytest <https://pypi.org/project/pytest>`__
- `pytest-cov <https://pypi.org/project/pytest-cov>`__
- `restructuredtext-lint <https://pypi.org/project/restructuredtext-lint>`__
Expand Down
1 change: 1 addition & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Development Dependencies
- `invoke <https://pypi.org/project/invoke>`__
- `pre-commit <https://pypi.org/project/pre-commit>`__
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
- `pyright <https://pypi.org/project/pyright>`__
- `pytest <https://pypi.org/project/pytest>`__
- `pytest-cov <https://pypi.org/project/pytest-cov>`__
- `restructuredtext-lint <https://pypi.org/project/restructuredtext-lint>`__
Expand Down
1 change: 0 additions & 1 deletion opencolorio_config_aces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
"print_aces_taxonomy",
"unclassify_ctl_transforms",
"version_aces_dev",
"version_config_mapping_file",
]
__all__ += [
"DescriptionStyle",
Expand Down
Loading

0 comments on commit e19ea45

Please sign in to comment.