forked from rodeofx/shotgunEvents
-
Notifications
You must be signed in to change notification settings - Fork 122
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
SG-15210 Python3 port #73
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8d1fc7a
Python3 fixes. Fixed a typo and small bug that came up while testing
eshokrgozar bce8a14
Added repo to hound. Added azure_pipelines config
eshokrgozar 1b08c4f
added azure badge
eshokrgozar cdfec82
Merged master
eshokrgozar 73c3bda
Fixed iteritems and unicode issues.
eshokrgozar 4d673d9
Fixed styling
eshokrgozar 16b830e
Reverted changes left from testing
eshokrgozar 7e2da1a
added requirements file for the 'six' dependency
eshokrgozar 7c347c6
Forced pickle.dump to use protocol 2 so it's compatible with both Pyt…
eshokrgozar 603cfc6
Suppressed the imp deprecation warning
eshokrgozar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2020 Shotgun Software Inc. | ||
# | ||
# CONFIDENTIAL AND PROPRIETARY | ||
# | ||
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit | ||
# Source Code License included in this distribution package. See LICENSE. | ||
# By accessing, using, copying or modifying this work you indicate your | ||
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights | ||
# not expressly granted therein are reserved by Shotgun Software Inc. | ||
|
||
# Imports the shared Azure CI tools from the master branch of shotgunsoftware/tk-ci-tools | ||
resources: | ||
repositories: | ||
- repository: templates | ||
type: github | ||
name: shotgunsoftware/tk-ci-tools | ||
ref: refs/heads/master | ||
endpoint: shotgunsoftware | ||
|
||
# We want builds to trigger for 3 reasons: | ||
# - The master branch sees new commits | ||
# - Each PR should get rebuilt when commits are added to it. | ||
# - When we tag something | ||
trigger: | ||
branches: | ||
include: | ||
- master | ||
tags: | ||
include: | ||
- v* | ||
pr: | ||
branches: | ||
include: | ||
- "*" | ||
|
||
# This pulls in a variable group from Azure. Variables can be encrypted or not. | ||
variables: | ||
- group: deploy-secrets | ||
|
||
# Launch into the build pipeline. | ||
jobs: | ||
- template: build-pipeline.yml@templates | ||
parameters: | ||
skip_tests: true |
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,10 @@ | ||
# Copyright 2020 Autodesk, Inc. All rights reserved. | ||
# | ||
# Use of this software is subject to the terms of the Autodesk license agreement | ||
# provided at the time of installation or download, or which otherwise accompanies | ||
# this software in either electronic or hard copy form. | ||
# | ||
# List of Python packages needed by this tool | ||
|
||
# Used for Python2/3 compatibility | ||
six |
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 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 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 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 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instanceof(value, six.text_type)
is the cleaner way to check for this. When we clean up our code in the long future where Python 2 is not supported anymore finding checks for six.text_type will be super easy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about doing this. There's an inconsistency in the way the argument type validation is done across the different plugins. Most of them use the
type.__name__
like this (look at the values under thetype
key):shotgunEvents/src/examplePlugins/update_timecode_from_frames.py
Lines 62 to 66 in 6d0ec8d
shotgunEvents/src/examplePlugins/update_timecode_from_frames.py
Lines 81 to 87 in 6d0ec8d
And a couple of them use the type itself:
shotgunEvents/src/examplePlugins/update_task_template_entities.py
Lines 67 to 81 in 6d0ec8d
I decided to do the string compare to keep it consistent with the other ones. I have no problem changing it to the
isinstance
method. But I did want to point this out to see if you think we should change all the other ones to not use the string matching either.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better is the enemy of good. If this is the pattern used in the repo, let's not rock the boat.