pype -> openpype in tools and scripts

This commit is contained in:
Ondrej Samohel 2021-04-01 15:02:44 +02:00
parent a6dc83aa13
commit 69cafcddda
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
26 changed files with 289 additions and 321 deletions

View file

@ -1,11 +1,12 @@
<#
.SYNOPSIS
Helper script to build Pype.
Helper script to build OpenPype.
.DESCRIPTION
This script will detect Python installation, create venv and install
all necessary packages from `requirements.txt` needed by Pype to be
included during application freeze on Windows.
This script will detect Python installation, and build OpenPype to `build`
directory using existing virtual environment created by Poetry (or
by running `/tools/create_venv.ps1`). It will then shuffle dependencies in
build folder to optimize for different Python versions (2/3) in Python host.
.EXAMPLE
@ -75,14 +76,11 @@ function Install-Poetry() {
$art = @"
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
.---= [ by Pype Club ] =---.
https://openpype.io
"@
@ -93,28 +91,28 @@ Write-Host $art -ForegroundColor DarkGreen
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
Set-Location -Path $openpype_root
$version_file = Get-Content -Path "$($pype_root)\pype\version.py"
$version_file = Get-Content -Path "$($openpype_root)\pype\version.py"
$result = [regex]::Matches($version_file, '__version__ = "(?<version>\d+\.\d+.\d+.*)"')
$pype_version = $result[0].Groups['version'].Value
if (-not $pype_version) {
$openpype_version = $result[0].Groups['version'].Value
if (-not $openpype_version) {
Write-Host "!!! " -ForegroundColor yellow -NoNewline
Write-Host "Cannot determine Pype version."
Write-Host "Cannot determine OpenPype version."
Exit-WithCode 1
}
# Create build directory if not exist
if (-not (Test-Path -PathType Container -Path "$($pype_root)\build")) {
New-Item -ItemType Directory -Force -Path "$($pype_root)\build"
if (-not (Test-Path -PathType Container -Path "$($openpype_root)\build")) {
New-Item -ItemType Directory -Force -Path "$($openpype_root)\build"
}
Write-Host "--- " -NoNewline -ForegroundColor yellow
Write-Host "Cleaning build directory ..."
try {
Remove-Item -Recurse -Force "$($pype_root)\build\*"
Remove-Item -Recurse -Force "$($openpype_root)\build\*"
}
catch {
Write-Host "!!! " -NoNewline -ForegroundColor Red
@ -124,8 +122,8 @@ catch {
}
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Building Pype [ " -NoNewline -ForegroundColor white
Write-host $pype_version -NoNewline -ForegroundColor green
Write-Host "Building OpenPype [ " -NoNewline -ForegroundColor white
Write-host $openpype_version -NoNewline -ForegroundColor green
Write-Host " ] ..." -ForegroundColor white
Write-Host ">>> " -NoNewline -ForegroundColor green
@ -167,31 +165,31 @@ if (-not (Test-Path -PathType Container -Path "$($env:USERPROFILE)\.poetry\bin")
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Cleaning cache files ... " -NoNewline
Get-ChildItem $pype_root -Filter "*.pyc" -Force -Recurse | Remove-Item -Force
Get-ChildItem $pype_root -Filter "*.pyo" -Force -Recurse | Remove-Item -Force
Get-ChildItem $pype_root -Filter "__pycache__" -Force -Recurse | Remove-Item -Force -Recurse
Get-ChildItem $openpype_root -Filter "*.pyc" -Force -Recurse | Remove-Item -Force
Get-ChildItem $openpype_root -Filter "*.pyo" -Force -Recurse | Remove-Item -Force
Get-ChildItem $openpype_root -Filter "__pycache__" -Force -Recurse | Remove-Item -Force -Recurse
Write-Host "OK" -ForegroundColor green
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Building Pype ..."
Write-Host "Building OpenPype ..."
$out = & poetry run python setup.py build 2>&1
if ($LASTEXITCODE -ne 0)
{
Set-Content -Path "$($pype_root)\build\build.log" -Value $out
Set-Content -Path "$($openpype_root)\build\build.log" -Value $out
Write-Host "!!! " -NoNewLine -ForegroundColor Red
Write-Host "Build failed. Check the log: " -NoNewline
Write-Host ".\build\build.log" -ForegroundColor Yellow
Exit-WithCode $LASTEXITCODE
}
Set-Content -Path "$($pype_root)\build\build.log" -Value $out
& poetry run python "$($pype_root)\tools\build_dependencies.py"
Set-Content -Path "$($openpype_root)\build\build.log" -Value $out
& poetry run python "$($openpype_root)\tools\build_dependencies.py"
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "restoring current directory"
Set-Location -Path $current_dir
Write-Host "*** " -NoNewline -ForegroundColor Cyan
Write-Host "All done. You will find Pype and build log in " -NoNewLine
Write-Host "All done. You will find OpenPype and build log in " -NoNewLine
Write-Host "'.\build'" -NoNewline -ForegroundColor Green
Write-Host " directory."

View file

@ -5,13 +5,12 @@
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -93,7 +92,7 @@ detect_python () {
###############################################################################
clean_pyc () {
local path
path=$pype_root
path=$openpype_root
echo -e "${BIGreen}>>>${RST} Cleaning pyc at [ ${BIWhite}$path${RST} ] ... \c"
find "$path" -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
echo -e "${BIGreen}DONE${RST}"
@ -136,16 +135,16 @@ main () {
detect_python || return 1
# Directories
pype_root=$(dirname $(dirname "$(realpath ${BASH_SOURCE[0]})"))
pushd "$pype_root" > /dev/null || return > /dev/null
openpype_root=$(dirname $(dirname "$(realpath ${BASH_SOURCE[0]})"))
pushd "$openpype_root" > /dev/null || return > /dev/null
version_command="import os;exec(open(os.path.join('$pype_root', 'pype', 'version.py')).read());print(__version__);"
pype_version="$(python3 <<< ${version_command})"
version_command="import os;exec(open(os.path.join('$openpype_root', 'openpype', 'version.py')).read());print(__version__);"
openpype_version="$(python3 <<< ${version_command})"
echo -e "${BIYellow}---${RST} Cleaning build directory ..."
rm -rf "$pype_root/build" && mkdir "$pype_root/build" > /dev/null
rm -rf "$openpype_root/build" && mkdir "$openpype_root/build" > /dev/null
echo -e "${BIGreen}>>>${RST} Building Pype ${BIWhite}[${RST} ${BIGreen}$pype_version${RST} ${BIWhite}]${RST}"
echo -e "${BIGreen}>>>${RST} Building OpenPype ${BIWhite}[${RST} ${BIGreen}$openpype_version${RST} ${BIWhite}]${RST}"
echo -e "${BIGreen}>>>${RST} Cleaning cache files ..."
clean_pyc
@ -159,11 +158,11 @@ main () {
fi
echo -e "${BIGreen}>>>${RST} Building ..."
poetry run python3 "$pype_root/setup.py" build > "$pype_root/build/build.log" || { echo -e "${BIRed}!!!${RST} Build failed, see the build log."; return; }
poetry run python3 "$pype_root/tools/build_dependencies.py"
poetry run python3 "$openpype_root/setup.py" build > "$openpype_root/build/build.log" || { echo -e "${BIRed}!!!${RST} Build failed, see the build log."; return; }
poetry run python3 "$openpype_root/tools/build_dependencies.py"
echo -e "${BICyan}>>>${RST} All done. You will find Pype and build log in \c"
echo -e "${BIWhite}$pype_root/build${RST} directory."
echo -e "${BICyan}>>>${RST} All done. You will find OpenPype and build log in \c"
echo -e "${BIWhite}$openpype_root/build${RST} directory."
}
main

View file

@ -101,8 +101,8 @@ for d in libs_dir.iterdir():
to_delete.append(d)
_print(f"found {d}", 3)
# add pype and igniter in libs too
to_delete.append(libs_dir / "pype")
# add openpype and igniter in libs too
to_delete.append(libs_dir / "openpype")
to_delete.append(libs_dir / "igniter")
# delete duplicates

View file

@ -1,11 +1,11 @@
<#
.SYNOPSIS
Helper script create virtual env.
Helper script create virtual environment using Poetry.
.DESCRIPTION
This script will detect Python installation, create venv and install
all necessary packages from `requirements.txt` needed by Pype to be
included during application freeze on Windows.
This script will detect Python installation, create venv with Poetry
and install all necessary packages from `poetry.lock` or `pyproject.toml`
needed by OpenPype to be included during application freeze on Windows.
.EXAMPLE
@ -82,20 +82,17 @@ print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
Set-Location -Path $openpype_root
$art = @"
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
.---= [ by Pype Club ] =---.
https://openpype.io
"@
@ -104,18 +101,18 @@ Write-Host $art -ForegroundColor DarkGreen
# Enable if PS 7.x is needed.
# Show-PSWarning
$version_file = Get-Content -Path "$($pype_root)\pype\version.py"
$version_file = Get-Content -Path "$($openpype_root)\openpype\version.py"
$result = [regex]::Matches($version_file, '__version__ = "(?<version>\d+\.\d+.\d+.*)"')
$pype_version = $result[0].Groups['version'].Value
if (-not $pype_version) {
$openpype_version = $result[0].Groups['version'].Value
if (-not $openpype_version) {
Write-Host "!!! " -ForegroundColor yellow -NoNewline
Write-Host "Cannot determine Pype version."
Write-Host "Cannot determine OpenPype version."
Set-Location -Path $current_dir
Exit-WithCode 1
}
Write-Host ">>> " -NoNewline -ForegroundColor Green
Write-Host "Found Pype version " -NoNewline
Write-Host "[ $($pype_version) ]" -ForegroundColor Green
Write-Host "Found OpenPype version " -NoNewline
Write-Host "[ $($openpype_version) ]" -ForegroundColor Green
Test-Python
@ -129,7 +126,7 @@ if (-not (Test-Path -PathType Container -Path "$($env:USERPROFILE)\.poetry\bin")
Write-Host "OK" -ForegroundColor Green
}
if (-not (Test-Path -PathType Leaf -Path "$($pype_root)\poetry.lock")) {
if (-not (Test-Path -PathType Leaf -Path "$($openpype_root)\poetry.lock")) {
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Installing virtual environment and creating lock."
} else {
@ -145,4 +142,4 @@ if ($LASTEXITCODE -ne 0) {
}
Set-Location -Path $current_dir
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Virtual environment created. "
Write-Host "Virtual environment created."

View file

@ -1,19 +1,17 @@
#!/usr/bin/env bash
# This script will detect Python installation, and create virtual environment
# for Pype to run or build.
# This script will detect Python installation, create venv with Poetry
# and install all necessary packages from `poetry.lock` or `pyproject.toml`
# needed by OpenPype to be included during application freeze on unix.
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -117,7 +115,7 @@ install_poetry () {
###############################################################################
clean_pyc () {
local path
path=$pype_root
path=$openpype_root
echo -e "${BIGreen}>>>${RST} Cleaning pyc at [ ${BIWhite}$path${RST} ] ... \c"
find "$path" -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
echo -e "${BIGreen}DONE${RST}"
@ -144,8 +142,8 @@ main () {
detect_python || return 1
# Directories
pype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$pype_root" > /dev/null || return > /dev/null
openpype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$openpype_root" > /dev/null || return > /dev/null
echo -e "${BIGreen}>>>${RST} Reading Poetry ... \c"
if [ -f "$HOME/.poetry/bin/poetry" ]; then
@ -156,7 +154,7 @@ main () {
install_poetry || { echo -e "${BIRed}!!!${RST} Poetry installation failed"; return; }
fi
if [ -f "$pype_root/poetry.lock" ]; then
if [ -f "$openpype_root/poetry.lock" ]; then
echo -e "${BIGreen}>>>${RST} Updating dependencies ..."
else
echo -e "${BIGreen}>>>${RST} Installing dependencies ..."

View file

@ -1,11 +1,12 @@
<#
.SYNOPSIS
Helper script create distributable Pype zip.
Helper script create distributable OpenPype zip.
.DESCRIPTION
This script will detect Python installation, create venv and install
all necessary packages from `requirements.txt` needed by Pype to be
included during application freeze on Windows.
This script will detect Python installation and run OpenPype to create
zip. It needs mongodb running. I will create zip from current source code
version and copy it top `%LOCALAPPDATA%/pypeclub/pype` if `--path` or `-p`
argument is not used.
.EXAMPLE
@ -35,19 +36,16 @@ function Show-PSWarning() {
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $openpype_root
$art = @"
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
.---= [ by Pype Club ] =---.
https://openpype.io
"@
@ -56,12 +54,12 @@ Write-Host $art -ForegroundColor DarkGreen
# Enable if PS 7.x is needed.
# Show-PSWarning
$version_file = Get-Content -Path "$($pype_root)\pype\version.py"
$version_file = Get-Content -Path "$($openpype_root)\openpype\version.py"
$result = [regex]::Matches($version_file, '__version__ = "(?<version>\d+\.\d+.\d+.*)"')
$pype_version = $result[0].Groups['version'].Value
if (-not $pype_version) {
$openpype_version = $result[0].Groups['version'].Value
if (-not $openpype_version) {
Write-Host "!!! " -ForegroundColor yellow -NoNewline
Write-Host "Cannot determine Pype version."
Write-Host "Cannot determine OpenPype version."
Exit-WithCode 1
}
@ -95,5 +93,5 @@ Write-Host "Generating zip from current sources ..."
Write-Host "... " -NoNewline -ForegroundColor Magenta
Write-Host "arguments: " -NoNewline -ForegroundColor Gray
Write-Host $ARGS -ForegroundColor White
& poetry run python "$($pype_root)\start.py" generate-zip $ARGS
& poetry run python "$($openpype_root)\start.py" generate-zip $ARGS
Set-Location -Path $current_dir

View file

@ -1,17 +1,18 @@
#!/usr/bin/env bash
# Helper script to create Pype zip.
# This script will detect Python installation and run OpenPype to create
# zip. It needs mongodb running. I will create zip from current source code
# version and copy it top `~/.local/share/pype` if `--path` or `-p`
# argument is not used.
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -91,7 +92,7 @@ detect_python () {
###############################################################################
clean_pyc () {
local path
path=$pype_root
path=$openpype_root
echo -e "${BIGreen}>>>${RST} Cleaning pyc at [ ${BIWhite}$path${RST} ] ... \c"
find "$path" -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
echo -e "${BIGreen}DONE${RST}"
@ -118,11 +119,11 @@ main () {
detect_python || return 1
# Directories
pype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$pype_root" > /dev/null || return > /dev/null
openpype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$openpype_root" > /dev/null || return > /dev/null
echo -e "${BIGreen}>>>${RST} Generating zip from current sources ..."
poetry run python3 "$pype_root/start.py" generate-zip "$@"
poetry run python3 "$openpype_root/start.py" generate-zip "$@"
}
main "$@"

View file

@ -1,9 +1,9 @@
<#
.SYNOPSIS
Helper script to update Pype Sphinx sources.
Helper script to update OpenPype Sphinx sources.
.DESCRIPTION
This script will run apidoc over Pype sources and generate new source rst
This script will run apidoc over OpenPype sources and generate new source rst
files for documentation. Then it will run build_sphinx to create test html
documentation build.
@ -15,33 +15,31 @@ PS> .\make_docs.ps1
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $openpype_root
$art = @"
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
.---= [ by Pype Club ] =---.
https://openpype.io
"@
Write-Host $art -ForegroundColor DarkGreen
Write-Host "This will not overwrite existing source rst files, only scan and add new."
Set-Location -Path $pype_root
Set-Location -Path $openpype_root
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Running apidoc ..."
& poetry run sphinx-apidoc -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$($pype_root)\docs\source" igniter
& poetry run sphinx-apidoc.exe -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$($pype_root)\docs\source" pype vendor, pype\vendor
& poetry run sphinx-apidoc -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$($openpype_root)\docs\source" igniter
& poetry run sphinx-apidoc.exe -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$($openpype_root)\docs\source" openpype vendor, openpype\vendor
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Building html ..."
& poetry run python "$($pype_root)\setup.py" build_sphinx
& poetry run python "$($openpype_root)\setup.py" build_sphinx
Set-Location -Path $current_dir

View file

@ -1,18 +1,17 @@
#!/usr/bin/env bash
# Make Pype documentation
# This script will run apidoc over OpenPype sources and generate new source rst
# files for documentation. Then it will run build_sphinx to create test html
# documentation build.
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -71,15 +70,15 @@ main () {
echo -e "${RST}"
# Directories
pype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$pype_root" > /dev/null || return > /dev/null
openpype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$openpype_root" > /dev/null || return > /dev/null
echo -e "${BIGreen}>>>${RST} Running apidoc ..."
poetry run sphinx-apidoc -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$pype_root/docs/source" igniter
poetry run sphinx-apidoc -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$pype_root/docs/source" pype vendor, pype\vendor
poetry run sphinx-apidoc -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$openpype_root/docs/source" igniter
poetry run sphinx-apidoc -M -e -d 10 --ext-intersphinx --ext-todo --ext-coverage --ext-viewcode -o "$openpype_root/docs/source" openpype vendor, openpype\vendor
echo -e "${BIGreen}>>>${RST} Building html ..."
poetry run python3 "$pype_root/setup.py" build_sphinx
poetry run python3 "$openpype_root/setup.py" build_sphinx
}
main

View file

@ -13,14 +13,11 @@ PS> .\run_mongo.ps1
$art = @"
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
.---= [ by Pype Club ] =---.
https://openpype.io
"@
@ -80,13 +77,13 @@ function Find-Mongo {
}
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
$openpype_root = (Get-Item $script_dir).parent.FullName
# mongodb port
$port = 2707
# path to database
$dbpath = (Get-Item $pype_root).parent.FullName + "\mongo_db_data"
$dbpath = (Get-Item $openpype_root).parent.FullName + "\mongo_db_data"
Find-Mongo
$mongo = Get-Command "mongod" | Select-Object -ExpandProperty Definition

View file

@ -6,13 +6,12 @@
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -72,11 +71,11 @@ main () {
echo -e "${RST}"
# Directories
pype_root=$(dirname $(realpath $(dirname $(dirname "${BASH_SOURCE[0]}"))))
pushd "$pype_root" > /dev/null || return > /dev/null
openpype_root=$(dirname $(realpath $(dirname $(dirname "${BASH_SOURCE[0]}"))))
pushd "$openpype_root" > /dev/null || return > /dev/null
mongo_port=2707
dbpath="$(dirname $pype_root)/mongo_db_data"
dbpath="$(dirname $openpype_root)/mongo_db_data"
echo -e "${BIGreen}>>>${RST} Running mongodb ..."
mongod --dbpath "$dbpath" --port $mongo_port

View file

@ -1,9 +1,9 @@
<#
.SYNOPSIS
Helper script to Pype Settings UI
Helper script to OpenPype Settings UI
.DESCRIPTION
This script will run Pype and open Settings UI.
This script will run OpenPype and open Settings UI.
.EXAMPLE
@ -13,7 +13,7 @@ PS> .\run_settings.ps1
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
& poetry run python "$($pype_root)\start.py" settings --dev
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $openpype_root
& poetry run python "$($openpype_root)\start.py" settings --dev
Set-Location -Path $current_dir

View file

@ -1,17 +1,16 @@
#!/usr/bin/env bash
# Run Pype Settings GUI
# Run OpenPype Settings GUI
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -91,7 +90,7 @@ detect_python () {
###############################################################################
clean_pyc () {
local path
path=$pype_root
path=$oepnpype_root
echo -e "${BIGreen}>>>${RST} Cleaning pyc at [ ${BIWhite}$path${RST} ] ... \c"
find "$path" -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
echo -e "${BIGreen}DONE${RST}"
@ -118,11 +117,11 @@ main () {
detect_python || return 1
# Directories
pype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$pype_root" > /dev/null || return > /dev/null
openpype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$openpype_root" > /dev/null || return > /dev/null
echo -e "${BIGreen}>>>${RST} Generating zip from current sources ..."
poetry run python3 "$pype_root/start.py" settings --dev
poetry run python3 "$openpype_root/start.py" settings --dev
}
main

View file

@ -1,11 +1,9 @@
<#
.SYNOPSIS
Helper script to build Pype.
Helper script to run tests for OpenPype.
.DESCRIPTION
This script will detect Python installation, create venv and install
all necessary packages from `requirements.txt` needed by Pype to be
included during application freeze on Windows.
This will use virtual environment and pytest to run test for OpenPype.
.EXAMPLE
@ -34,14 +32,11 @@ function Show-PSWarning() {
$art = @"
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
.---= [ by Pype Club ] =---.
https://openpype.io
"@
@ -52,22 +47,22 @@ Write-Host $art -ForegroundColor DarkGreen
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
Set-Location -Path $openpype_root
$version_file = Get-Content -Path "$($pype_root)\pype\version.py"
$version_file = Get-Content -Path "$($openpype_root)\openpype\version.py"
$result = [regex]::Matches($version_file, '__version__ = "(?<version>\d+\.\d+.\d+.*)"')
$pype_version = $result[0].Groups['version'].Value
if (-not $pype_version) {
$openpype_version = $result[0].Groups['version'].Value
if (-not $openpype_version) {
Write-Host "!!! " -ForegroundColor yellow -NoNewline
Write-Host "Cannot determine Pype version."
Write-Host "Cannot determine OpenPype version."
Exit-WithCode 1
}
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Building Pype [ " -NoNewline -ForegroundColor white
Write-host $pype_version -NoNewline -ForegroundColor green
Write-Host "Building OpenPype [ " -NoNewline -ForegroundColor white
Write-host $openpype_version -NoNewline -ForegroundColor green
Write-Host " ] ..." -ForegroundColor white
Write-Host ">>> " -NoNewline -ForegroundColor green
@ -97,15 +92,15 @@ Write-Host "OK [ $p ]" -ForegroundColor green
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Cleaning cache files ... " -NoNewline
Get-ChildItem $pype_root -Filter "*.pyc" -Force -Recurse | Remove-Item -Force
Get-ChildItem $pype_root -Filter "__pycache__" -Force -Recurse | Remove-Item -Force -Recurse
Get-ChildItem $openpype_root -Filter "*.pyc" -Force -Recurse | Remove-Item -Force
Get-ChildItem $openpype_root -Filter "__pycache__" -Force -Recurse | Remove-Item -Force -Recurse
Write-Host "OK" -ForegroundColor green
Write-Host ">>> " -NoNewline -ForegroundColor green
Write-Host "Testing Pype ..."
Write-Host "Testing OpenPype ..."
$original_pythonpath = $env:PYTHONPATH
$env:PYTHONPATH="$($pype_root);$($env:PYTHONPATH)"
& poetry run pytest -x --capture=sys --print -W ignore::DeprecationWarning "$($pype_root)/tests"
$env:PYTHONPATH="$($openpype_root);$($env:PYTHONPATH)"
& poetry run pytest -x --capture=sys --print -W ignore::DeprecationWarning "$($openpype_root)/tests"
$env:PYTHONPATH = $original_pythonpath
Write-Host ">>> " -NoNewline -ForegroundColor green

View file

@ -1,17 +1,16 @@
#!/usr/bin/env bash
# Run tests for Pype
# Run tests for OpenPype
# This will use virtual environment and pytest to run test for OpenPype.
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -87,7 +86,7 @@ detect_python () {
###############################################################################
clean_pyc () {
local path
path=$pype_root
path=$openpype_root
echo -e "${BIGreen}>>>${RST} Cleaning pyc at [ ${BIWhite}$path${RST} ] ... \c"
find "$path" -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
echo -e "${BIGreen}DONE${RST}"
@ -114,13 +113,13 @@ main () {
detect_python || return 1
# Directories
pype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$pype_root" || return > /dev/null
openpype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$openpype_root" || return > /dev/null
echo -e "${BIGreen}>>>${RST} Testing Pype ..."
echo -e "${BIGreen}>>>${RST} Testing OpenPype ..."
original_pythonpath=$PYTHONPATH
export PYTHONPATH="$pype_root:$PYTHONPATH"
poetry run pytest -x --capture=sys --print -W ignore::DeprecationWarning "$pype_root/tests"
export PYTHONPATH="$openpype_root:$PYTHONPATH"
poetry run pytest -x --capture=sys --print -W ignore::DeprecationWarning "$openpype_root/tests"
PYTHONPATH=$original_pythonpath
}

View file

@ -1,6 +1,6 @@
<#
.SYNOPSIS
Helper script Pype Tray.
Helper script OpenPype Tray.
.DESCRIPTION
@ -12,8 +12,8 @@ PS> .\run_tray.ps1
#>
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $openpype_root
& poetry run python "$($pype_root)\start.py" tray --debug
& poetry run python "$($openpype_root)\start.py" tray --debug
Set-Location -Path $current_dir

View file

@ -1,17 +1,16 @@
#!/usr/bin/env bash
# Run Pype Tray
# Run OpenPype Tray
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
https://openpype.io
EOF
}
@ -92,7 +91,7 @@ detect_python () {
###############################################################################
clean_pyc () {
local path
path=$pype_root
path=$openpype_root
echo -e "${BIGreen}>>>${RST} Cleaning pyc at [ ${BIWhite}$path${RST} ] ... \c"
find "$path" -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
echo -e "${BIGreen}DONE${RST}"
@ -119,11 +118,11 @@ main () {
detect_python || return 1
# Directories
pype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$pype_root" > /dev/null || return > /dev/null
openpype_root=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
pushd "$openpype_root" > /dev/null || return > /dev/null
echo -e "${BIGreen}>>>${RST} Running Pype Tray with debug option ..."
poetry run python3 "$pype_root/start.py" tray --debug
echo -e "${BIGreen}>>>${RST} Running OpenPype Tray with debug option ..."
poetry run python3 "$openpype_root/start.py" tray --debug
}
main

View file

@ -1,26 +1,20 @@
<#
.SYNOPSIS
Helper script to run mongodb.
.DESCRIPTION
This script will detect mongodb, add it to the PATH and launch it on specified port and db location.
Helper script to update submodules.
.EXAMPLE
PS> .\run_mongo.ps1
PS> .\update_submodules.ps1
#>
$art = @"
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
.---= [ by Pype Club ] =---.
https://openpype.io
"@
@ -37,9 +31,9 @@ function Exit-WithCode($exitcode) {
$current_dir = Get-Location
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$pype_root = (Get-Item $script_dir).parent.FullName
$openpype_root = (Get-Item $script_dir).parent.FullName
Set-Location -Path $pype_root
Set-Location -Path $openpype_root
git submodule update --recursive --remote

View file

@ -1,17 +1,15 @@
#!/usr/bin/env bash
# Run Pype Tray
# Run OpenPype Tray
art () {
cat <<-EOF
____________
/\\ ___ \\
\\ \\ \\/_\\ \\
\\ \\ _____/ ______ ___ ___ ___
\\ \\ \\___/ /\\ \\ \\ \\\\ \\\\ \\
\\ \\____\\ \\ \\_____\\ \\__\\\\__\\\\__\\
\\/____/ \\/_____/ . PYPE Club .
▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀
▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░
▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄
.---= [ by Pype Club ] =---.
EOF
}