Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python binding for Scaphandre. #184

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/python_build.yml
@@ -0,0 +1,69 @@
name: python_build

on:
push:
branches: [main]
pull_request:
branches: [main]

defaults:
run:
working-directory: ./python

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Check Python
run: |
pip install black isort mypy
make check-python
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: stable
override: true
- name: Check Rust
run: make check-rust

test:
name: Python Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v1

- uses: actions/setup-python@v3
with:
python-version: "3.7"

- name: Build and install scaphandre
run: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
make develop

- name: Run tests
run: |
source venv/bin/activate
make unit-test

- name: Build Sphinx documentation
run: |
source venv/bin/activate
make build-documentation
18 changes: 18 additions & 0 deletions python/.gitignore
@@ -0,0 +1,18 @@
# venv
venv

# Byte-compiled / optimized / DLL files
__pycache__/
/target

# Unit test / coverage reports
.coverage
.pytest_cache/

# mypy
.mypy_cache/

# sphinx build directory
docs/build

*.so