Skip to content

Commit

Permalink
Merge pull request #24 from shotgunsoftware/develop
Browse files Browse the repository at this point in the history
Release v1.2.0
  • Loading branch information
staceyoue authored Oct 26, 2023
2 parents c5a5ece + bbe6afd commit a79dcc3
Show file tree
Hide file tree
Showing 86 changed files with 813 additions and 32,486 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ File location: `dist/Alias/{python_version/{alias_version}/alias_api.pyd`

### <a name="toolkit_plugin"></a>Toolkit Plugin for Alias ###

The Toolkit Plugin is used by [plugin_bootstrap.py](https://github.com/shotgunsoftware/tk-framework-alias/blob/main/python/tk_framework_alias_utils/plugin_bootstrap.py) to bootstrap the ShotGrid Alias Engine, which can be initiated by the Alias Plugin. This allows ShotGrid to be started up by Alias. See [dev](https://github.com/shotgunsoftware/tk-framework-alias/tree/main/dev#readme) for more details on how the Toolkit Plugin is built.
The Toolkit Plugin is used by [plugin_bootstrap.py](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/python/tk_framework_alias_utils/plugin_bootstrap.py) to bootstrap the ShotGrid Alias Engine, which can be initiated by the Alias Plugin. This allows ShotGrid to be started up by Alias. See [dev](https://github.com/shotgunsoftware/tk-framework-alias/tree/main/dev#readme) for more details on how the Toolkit Plugin is built.

File location: `dist/Toolkit/plugin/com.sg.basic.alias`

Expand Down Expand Up @@ -60,7 +60,7 @@ The framework can be used for any version of Alias (within the [support](#suppor
```
3. Alias loads the plugin which will embed Python to access the Python modules to initialize ShotGrid and establish communication with Alias.

The [startup utils](https://github.com/shotgunsoftware/tk-framework-alias/blob/main/python/tk_framework_alias_utils/startup.py) do all the necessary set up to ensure that Alias can load the plugin to initialize ShotGrid. See the main start up function [ensure_plugin_ready](https://github.com/shotgunsoftware/tk-framework-alias/blob/main/python/tk_framework_alias_utils/startup.py#L536) for more details.
The [startup utils](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/python/tk_framework_alias_utils/startup.py) do all the necessary set up to ensure that Alias can load the plugin to initialize ShotGrid. See the main start up function [ensure_plugin_ready](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/python/tk_framework_alias_utils/startup.py#L536) for more details.

Due to major changes to Alias starting in 2024.0, the framework essentially operates in two different modes. For Alias versions prior to 2024.0:

Expand All @@ -80,7 +80,7 @@ For Alias 2024.0 and later:
- The Alias Engine will establish a connection to the Alias Python API server to interact with the data in Alias
- the Alias Engine will create a Qt Application and start its own event loop to display Toolkit UI alongside Alias

The plugin will use the [AliasBridge](https://github.com/shotgunsoftware/tk-framework-alias/blob/main/python/tk_framework_alias/server/alias_bridge.py#L33) object to manage the Alias Python API server. The [plugin_bootstrap.py](https://github.com/shotgunsoftware/tk-framework-alias/blob/main/python/tk_framework_alias_utils/plugin_bootstrap.py) script will called to bootsrap the Alias Engine. The Alias Engine will create a [client](https://github.com/shotgunsoftware/tk-framework-alias/blob/main/python/tk_framework_alias/client/socketio/client.py) to connect to the Alias Python API server.
The plugin will use the [AliasBridge](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/python/tk_framework_alias/server/alias_bridge.py#L33) object to manage the Alias Python API server. The [plugin_bootstrap.py](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/python/tk_framework_alias_utils/plugin_bootstrap.py) script will called to bootsrap the Alias Engine. The Alias Engine will create a [client](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/python/tk_framework_alias/client/socketio/client.py) to connect to the Alias Python API server.

<br/>

Expand Down
35 changes: 35 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Security Policy

## Security

At Autodesk, we know that the security of your data is critical to your studio’s
operation.
As the industry shifts to the cloud, ShotGrid knows that security and service
models are more important than ever.

The confidentiality, integrity, and availability of your content is at the top
of our priority list.
Not only do we have a team of ShotGrid engineers dedicated to platform security
and performance, we are also backed by Autodesk’s security team, also invests
heavily in the security for broad range of industries and customers.
We constantly reassess, develop, and improve our risk management program because
we know that the landscape of security is ever-changing.

If you believe you have found a security vulnerability in any ShotGrid-owned
repository, please report it to us as described below.


## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them by sending a message to
[Autodesk Trust Center](https://www.autodesk.com/trust/contact-us).

Please include as much information as you can provide such as locations,
configurations, reproduction steps, exploit code, impact, etc.


## Additional Information

Please check out the [ShotGrid Security White Paper](https://help.autodesk.com/view/SGSUB/ENU/?guid=SG_Administrator_ar_general_security_ar_security_white_paper_html).
33 changes: 30 additions & 3 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

- Windows

The framework has a couple pre-release steps:
The framework has pre-release steps:

1. Include a pre-built [Toolkit Plugin](#build_toolkit_plugin)
2. Include any necessary [embeddable Python packages](#embed_py_package)
3. Include any [required Python packages](#required-python-packages)

## <a name="build_toolkit_plugin"></a> Build the Toolkit Plugin

The framework provides the functionality to bootstrap a Toolkit engine (e.g. [tk-alias](https://github.com/shotgunsoftware/tk-alias)) using the the [ToolkitManager](https://github.com/shotgunsoftware/tk-core/blob/master/python/tank/bootstrap/manager.py). A Toolkit Plugin must be created in order to intialize the manager to bootstrap an engine. The framework provides build scripts to generate the plugin bundle; after running the build, it will create the `com.sg.basic.alias` plugin bundle in the `dist/Toolkit/plugin` folder. At runtime, the framework start up utils will install the plugin bundle to the user's `%APPDATA%` folder, where it can be accessed during the [bootstrap process](https://github.com/shotgunsoftware/tk-framework-alias/blob/init/python/tk_framework_alias_utils/plugin_bootstrap.py).
The framework provides the functionality to bootstrap a Toolkit engine (e.g. [tk-alias](https://github.com/shotgunsoftware/tk-alias)) using the the [ToolkitManager](https://github.com/shotgunsoftware/tk-core/blob/develop/python/tank/bootstrap/manager.py). A Toolkit Plugin must be created in order to intialize the manager to bootstrap an engine. The framework provides build scripts to generate the plugin bundle; after running the build, it will create the `com.sg.basic.alias` plugin bundle in the `dist/Toolkit/plugin` folder. At runtime, the framework start up utils will install the plugin bundle to the user's `%APPDATA%` folder, where it can be accessed during the [bootstrap process](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/python/tk_framework_alias_utils/plugin_bootstrap.py).

The following files are provided to build the plugin:

Expand Down Expand Up @@ -64,4 +65,30 @@ make clean

## <a name="embed_py_package"></a>Embeddable Python Package

The `get-pip.py` script is included for convenience to set up the embeddable Python packages in `dist` (see [pip installation](https://pip.pypa.io/en/stable/installation/)) The base embeddable Python packages do not come with pip, so this script can be used to make pip available to the embeddable Python, which can then be used to install any additional required Python packages. See [dist](https://github.com/shotgunsoftware/tk-framework-alias/blob/initial/dist/README.md) for more details on how to set up the embeddable Python package.
The `get-pip.py` script is included for convenience to set up the embeddable Python packages in `dist` (see [pip installation](https://pip.pypa.io/en/stable/installation/)) The base embeddable Python packages do not come with pip, so this script can be used to make pip available to the embeddable Python, which can then be used to install any additional required Python packages. See [dist](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/dist/README.md) for more details on how to set up the embeddable Python package.

## Required Python Packages

The framework requires additional Python packages to the standard package that ShotGrid Toolkit ships with. To make these packages available to the framework, they must be included in the distribution directory `dist/Python/Python<MAJOR_VERSION><MINOR_VERSION>/packages`.

### What's included?

The packages that are included are defined by the `requirements.txt` in each of the `dist/Python/Python<MAJOR_VERSION><MINOR_VERSION>` directory. The packages can be obtained by running the [update_python_packages.py](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/dev/update_python_packages.py) script that uses pip to intall them. The script will then zip of the packages and copy them to the distribution directory. Standard Python packages will be found in `pkgs.zip`, and C extension packages will be found in `c_extensions.zip`. The reason for separating these packages is because C extension packages need to be unzipped in order to allow them to be imported by the framework (while standard packages do not).

### Update the packages

Follow these steps to update the packages when needed, these steps will update the packages for Python 3.7:

1. Change the packages (add, remove, update version) by modifying the [requirements.txt](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/dist/Python/Python37/requirements.txt).
2. Using Python 3.7, run the [update_python_packages.py](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/dev/update_python_packages.py) script. This script must be run from inside the `dev` directory.
3. Check that the packages have been updated correctly [here](https://github.com/shotgunsoftware/tk-framework-alias/blob/develop/dist/Python/Python37/packages). There is a `frozen_requirements.txt` file that records the package versions that were installed.
4. Add the changes to the packages to git using `git add dist -f`.
5. Commit and push the change to git as for any change.

#### Key details about the update script

- The version of Python used to run the scripts, is the version of Python that the packages will be installed for
- The script must be run from inside the `dev` folder
- The update script will use the requirements file and pip to install the packages to a local temp directory, which are eventually copied to the `dist` folder
- C extension packages are put in their own separate zip file, to easily unzip them at run time.
- To limit the size of the packages (to not bloat the repository size), special handling is made to the PySide2 package. PySide2 functionality is limited to using a single method from the QtCore module, and it is not intended that any further PySide2 functionality is to be needed. For this reason, the minimum files are included to use only the QtCore module.
Loading

0 comments on commit a79dcc3

Please sign in to comment.