-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-organize directory structure (#105)
* Python SDK directory refactor * Rename Python SDK crate to `rerun_py`, located in repository root * Rename `example_dummy.py` to `example_car.py` * Added `rerun_py/justfile` for automation of the Python build/develop workflows
- Loading branch information
John Hughes
committed
Sep 23, 2022
1 parent
68911d5
commit 5b9cce7
Showing
25 changed files
with
192 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
ban-relative-imports = true | ||
docstring-convention = all | ||
extend-ignore = | ||
# Satisfy black: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8 | ||
E203, | ||
# pydocstyle: http://www.pydocstyle.org/en/stable/error_codes.html | ||
# numpy convention with a few additional lints | ||
D107, D203, D212, D401, D402, D415, D416, | ||
# TODO: Remove errors below to further improve docstring linting | ||
D1, | ||
# flake8-simplify | ||
SIM102, SIM117, | ||
|
||
extend-exclude = | ||
# Automatically generated test artifacts | ||
venv/, | ||
target/, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
!Cargo.lock | ||
.DS_Store | ||
target/ | ||
venv/ | ||
wheels/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Set up virtual environment for development | ||
develop-env: | ||
#!/usr/bin/env bash | ||
echo "Setting up Python virtual environment in venv" | ||
# set -euxo pipefail | ||
python -m venv venv | ||
venv/bin/pip install --upgrade pip | ||
venv/bin/pip install -r requirements-build.txt | ||
venv/bin/pip install -r requirements-lint.txt | ||
echo "Do 'source venv/bin/activate' to use the virtual environment!" | ||
|
||
# Build and install the package into the venv | ||
build mode="release": | ||
#!/usr/bin/env bash | ||
unset CONDA_PREFIX && \ | ||
source venv/bin/activate && \ | ||
maturin develop --extras="examples,tests" {{ if mode == "debug" { "" } else { "--release" } }} | ||
|
||
# Run autoformatting | ||
format: | ||
isort . | ||
black . | ||
blackdoc . | ||
pyupgrade --py37-plus `find rerun_sdk/ tests/ -name "*.py" -type f` | ||
cargo fmt --all | ||
|
||
# Run linting | ||
lint: | ||
mypy | ||
flake8 | ||
|
||
# Run fast unittests | ||
test: | ||
python -m pytest tests/unit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
black==22.8.0 | ||
blackdoc==0.3.6 | ||
flake8-bugbear==22.8.23 | ||
flake8-comprehensions==3.10.0 | ||
flake8-docstrings==1.6.0 | ||
flake8-simplify==0.19.3 | ||
flake8-tidy-imports==4.8.0 | ||
flake8==5.0.4 | ||
isort==5.10.1 | ||
mypy==0.971 | ||
pyupgrade==2.37.3 | ||
types-requests==2.28.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../crates/re_viewer/data/camera.glb |
Oops, something went wrong.