Skip to content

Commit 1057ebb

Browse files
authored
SG-22787: Shotgun to ShotGrid (#245)
Rebranded to ShotGrid.
1 parent 0f00451 commit 1057ebb

File tree

10 files changed

+45
-67
lines changed

10 files changed

+45
-67
lines changed

.travis.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,16 @@
1010

1111
language: python
1212

13-
# We need to test on multiple distros, since python 2.6 is not supported in xenial
14-
# and 3.7 is not supported in trusty. For now just use trusty to test 2.6, and use
15-
# the more modern xenial for 2.7 and 3.7.
16-
1713
matrix:
1814
include:
1915

20-
# Use trusty dist for python 2.6, since the built-in xenial distro (default)
21-
# does not support Python 2.6
22-
# See https://docs.travis-ci.com/user/reference/xenial/#python-support
23-
24-
# Python 2.6, Server #1
25-
- dist: trusty
26-
python: "2.6"
27-
# flake8 does not support python 2.6, so only run it on 2.7+
28-
env:
29-
- RUN_FLAKE=false
30-
31-
# Test python 2.7 and 3.7 on Xenial.
32-
33-
# Python 2.7, Server #1
16+
# Python 2.7
3417
- dist: xenial
3518
python: "2.7"
3619
env:
3720
- RUN_FLAKE=true
3821

39-
# Python 3.7, Server #1
22+
# Python 3.7
4023
- dist: xenial
4124
python: "3.7"
4225
env:

HISTORY.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,61 +37,61 @@ v3.1.2 (2019 Sept 17)
3737
methods ``schema_entity_read()``, ``schema_field_read()``, and ``schema_read()``.
3838

3939
v3.1.1 (2019 August 29)
40-
=====================
40+
=======================
4141
- Fixes a regression on Python 2.7.0-2.7.9 on Windows with the mimetypes module.
4242

4343
v3.1.0 (2019 July 29)
4444
=====================
4545
- Adds support for Python 3.7
4646

4747
v3.0.41 (2019 June 28)
48-
=====================
48+
======================
4949
- Adds an optional sleep between retries specified via the `SHOTGUN_API_RETRY_INTERVAL` environment variable, or by setting `sg.config.rpc_attempt_interval`.
5050

5151
v3.0.40 (2019 March 13)
52-
=====================
52+
=======================
5353
- Updates encoding method to use shutil when uploading, to avoid memory and overflow errors when reading large files. (contributed by @eestrada)
5454

5555
v3.0.39 (2019 February 20)
56-
=====================
56+
==========================
5757
- Ensures the certificates packaged with the API and those specified via the `SHOTGUN_API_CACERTS` environment variable
5858
are used when uploading a file.
5959

6060
v3.0.38 (2019 February 7)
61-
=====================
61+
=========================
6262
- Upgrades the version of ``httplib2`` to ``0.12.0``, which fixes SNI issues. Note this
6363
version contains a more recent list of certificate authorities. If you are running Shotgun locally and have
6464
signed your https certificate with an outdated certificate authority, the Shotgun connection will be rejected.
6565

6666
v3.0.37 (2018 July 19)
67-
=====================
67+
======================
6868

6969
- Proper support added for unicode and utf-8 string paths given to upload methods, and a sane error is raised when an unusable string encoding is used.
7070
- Adds support for querying preferences from Shotgun via the new preferences_read method.
7171
- Under-the-hood changes to add support for direct to s3 uploads to Shotgun. This change should be transparent to users.
7272

7373
v3.0.36 (2018 April 3)
74-
=====================
74+
======================
7575

7676
- Fixes an error where ``connect=False`` during ``__init__`` would still connect to Shotgun.
7777
- Adds support for ``SHOTGUN_API_CACERTS`` when uploading and downloading files.
7878
- Properly handles failed downloads due to malware scanning.
7979

8080
v3.0.35 (2017 December 8)
81-
=====================
81+
=========================
8282

8383
- Add exception UserCredentialsNotAllowedForSSOAuthenticationFault.
8484
Triggered when attempting to initiate a connection with a username/password
8585
pair on an SSO-enabled Shotgun site.
8686

8787
v3.0.34 (2017 September 18)
88-
=====================
88+
===========================
8989

9090
- Optimized pagination strategy for Shotgun 7.4+
9191
- Switched from a hard-coded value of 500 for "records_per_page" to a server-defined value. We will be experimenting with higher values with the goal of increasing performance for large result sets.
9292

9393
v3.0.33 (2017 July 18)
94-
=====================
94+
======================
9595

9696
- Raise an exception when uploading an empty file using :meth:`upload`, :meth:`upload_thumbnail`
9797
or :meth:`upload_filmstrip_thumbnail` before calling out to the server.
@@ -105,7 +105,7 @@ v3.0.32 (2016 Sep 22)
105105
- Optimized import speed of the API on Python 2.7.
106106
- Integrated the latest fixes to the ``mimetypes`` module.
107107
- Added ``nav_expand()`` method as an experimental, internal method for querying SG hierarchy.
108-
- Ported all documentation to sphinx. See http://developer.shotgunsoftware.com/python-api.
108+
- Ported all documentation to sphinx. See http://developer.shotgridsoftware.com/python-api.
109109
- Moved Changelog to dedicated HISTORY file.
110110

111111
v3.0.31 (2016 May 18)

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
[![VFX Platform](https://img.shields.io/badge/vfxplatform-2020-blue.svg)](http://www.vfxplatform.com/)
2-
[![Python 2.6 2.7 3.7](https://img.shields.io/badge/python-2.6%20%7C%202.7%20%7C%203.7-blue.svg)](https://www.python.org/)
3-
[![Reference Documentation](http://img.shields.io/badge/doc-reference-blue.svg)](http://developer.shotgunsoftware.com/python-api)
2+
[![Python 2.7 3.7](https://img.shields.io/badge/python-2.7%20%7C%203.7-blue.svg)](https://www.python.org/)
3+
[![Reference Documentation](http://img.shields.io/badge/doc-reference-blue.svg)](http://developer.shotgridsoftware.com/python-api)
44
[![Build Status Linux](https://secure.travis-ci.org/shotgunsoftware/python-api.svg?branch=master)](http://travis-ci.org/shotgunsoftware/python-api)
55
[![Build status Windows](https://ci.appveyor.com/api/projects/status/slvw7u4jatvdly98/branch/master?svg=true
66
)](https://ci.appveyor.com/project/jfboismenu/python-api/branch/master)
77
[![Coverage Status](https://coveralls.io/repos/github/shotgunsoftware/python-api/badge.svg?branch=master)](https://coveralls.io/github/shotgunsoftware/python-api?branch=master)
88

99
# Shotgun Python API
1010

11-
Shotgun provides a simple Python-based API for accessing Shotgun and integrating with other tools. This is the official API that is maintained by Shotgun Software ([email protected])
11+
ShotGrid provides a simple Python-based API for accessing ShotGrid and integrating with other tools. This is the official API that is maintained by ShotGrid Software ([email protected])
1212

1313
The latest version can always be found at http://github.com/shotgunsoftware/python-api
1414

1515
## Minimum Requirements
1616

17-
* Shotgun server v2.4.12+.
18-
* Python v2.6 - v2.7 or v3.7
17+
* ShotGrid server v2.4.12+.
18+
* Python v2.7 or v3.7
1919

2020
## Documentation
21-
Tutorials and detailed documentation about the Python API are available at http://developer.shotgunsoftware.com/python-api).
21+
Tutorials and detailed documentation about the Python API are available at http://developer.shotgridsoftware.com/python-api).
2222

2323
Some useful direct links:
2424

25-
* [Installing](http://developer.shotgunsoftware.com/python-api/installation.html)
26-
* [Tutorials](http://developer.shotgunsoftware.com/python-api/cookbook/tutorials.html)
27-
* [API Reference](http://developer.shotgunsoftware.com/python-api/reference.html)
28-
* [Data Types](http://developer.shotgunsoftware.com/python-api/reference.html#data-types)
29-
* [Filter Syntax](http://developer.shotgunsoftware.com/python-api/reference.html#filter-syntax)
25+
* [Installing](http://developer.shotgridsoftware.com/python-api/installation.html)
26+
* [Tutorials](http://developer.shotgridsoftware.com/python-api/cookbook/tutorials.html)
27+
* [API Reference](http://developer.shotgridsoftware.com/python-api/reference.html)
28+
* [Data Types](http://developer.shotgridsoftware.com/python-api/reference.html#data-types)
29+
* [Filter Syntax](http://developer.shotgridsoftware.com/python-api/reference.html#filter-syntax)
3030

3131
## Changelog
3232

33-
You can see the [full history of the Python API on the documentation site](http://developer.shotgunsoftware.com/python-api/changelog.html).
33+
You can see the [full history of the Python API on the documentation site](http://developer.shotgridsoftware.com/python-api/changelog.html).
3434

3535
## Updating HTTPLib2
3636

@@ -108,8 +108,8 @@ Integration and unit tests are provided.
108108
- A `tests/config` file (you can copy an example from `tests/example_config`).
109109
- Tests can be run individually like this: `nosetests --config="nose.cfg" tests/test_client.py`
110110
- Make sure to not forget the `--config="nose.cfg"` option. This option tells nose to use our config file. This will exclude python 2- and 3-specific files in the `/lib` directory, preventing a failure from being reported by nose for compilation due to incompatible syntax in those files.
111-
- `test_client` and `tests_unit` use mock server interaction and do not require a Shotgun instance to be available (no modifications to `tests/config` are necessary).
112-
- `test_api` and `test_api_long` *do* require a Shotgun instance, with a script key available for the tests. The server and script user values must be supplied in the `tests/config` file. The tests will add test data to your server based on information in your config. This data will be manipulated by the tests, and should not be used for other purposes.
111+
- `test_client` and `tests_unit` use mock server interaction and do not require a ShotGrid instance to be available (no modifications to `tests/config` are necessary).
112+
- `test_api` and `test_api_long` *do* require a ShotGrid instance, with a script key available for the tests. The server and script user values must be supplied in the `tests/config` file. The tests will add test data to your server based on information in your config. This data will be manipulated by the tests, and should not be used for other purposes.
113113
- To run all of the tests, use the shell script `run-tests`.
114114

115115
## Release process

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ environment:
2424
secure: 0/BofzMkXtzwtRqzC94FHt3lcyMBG0rr2w0rUropeT4=
2525
SG_SCRIPT_NAME: python-api-test
2626
SG_API_KEY:
27-
secure: Zjz4JgVnT8npR4By6HZDJNJFjDDBFLW+7pOc/eD5kqQ=
27+
secure: 8bHvvT/83p+3wHyQh4qsfXP3aBENRzk0DbXosKC/cuc=
2828
SG_PROJECT_NAME: SG unittest project for AppVeyor
2929

3030
build: off

docs/cookbook/examples/ami_version_packager.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ It is intended to be used in conjunction with the script dicussed in :ref:`ami_h
2727

2828
It uses the example ActionMenu Python class also located in our docs for parsing the ActionMenuItem
2929
POST variables. For more information about it and accessing the variables in the ActionMenuItem POST request,
30-
See: http://developer.shotgunsoftware.com/python-api/examples/ami_handler
30+
See: http://developer.shotgridsoftware.com/python-api/examples/ami_handler
3131

3232
The purpose of this script is to download attachment files from Shotgun, create an archive of them
3333
and copy them to a specified directory. You can invoke it with the following minimal example to connect

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Minimum Requirements
99
- Shotgun server v5.4.14 or higher for API v3.0.16+.
1010
- Shotgun server v2.4.12 or higher for API v3.0.8.
1111
- Shotgun server v1.8 or higher for API v3.0.7.
12-
- Python 2.6 - 2.7 or Python 3.7
12+
- Python 2.7 or Python 3.7
1313

1414
.. note::
1515
Some features of the API are only supported by more recent versions of the Shotgun server.

shotgun_api3/lib/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ The version of `six` bundled should be updated manually, however its version is
4141

4242
### mockgun
4343

44-
Mockgun is a Shotgun API mocker. It's a class that has got *most* of the same
45-
methods and parameters that the Shotgun API has got. Mockgun is essentially a
46-
Shotgun *emulator* that (for basic operations) looks and feels like Shotgun.
44+
Mockgun is a ShotGrid API mocker. It's a class that has got *most* of the same
45+
methods and parameters that the ShotGrid API has got. Mockgun is essentially a
46+
ShotGrid *emulator* that (for basic operations) looks and feels like ShotGrid.
4747

4848
The primary purpose of Mockgun is to drive unit test rigs where it becomes
49-
too slow, cumbersome or non-practical to connect to a real Shotgun. Using a
49+
too slow, cumbersome or non-practical to connect to a real ShotGrid. Using a
5050
Mockgun for unit tests means that a test can be rerun over and over again
5151
from exactly the same database state. This can be hard to do if you connect
52-
to a live Shotgun instance.
52+
to a live ShotGrid instance.
5353

5454
## Lib `requirements.txt`
5555

shotgun_api3/lib/mockgun/mockgun.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def __init__(self,
201201
if schema_path is None or schema_entity_path is None:
202202
raise MockgunError("Cannot create Mockgun instance because no schema files have been defined. "
203203
"Before creating a Mockgun instance, please call Mockgun.set_schema_paths() "
204-
"in order to specify which Shotgun schema Mockgun should operate against.")
204+
"in order to specify which ShotGrid schema Mockgun should operate against.")
205205

206206
self._schema, self._schema_entity = SchemaFactory.get_schemas(schema_path, schema_entity_path)
207207

@@ -503,7 +503,7 @@ def _validate_entity_data(self, entity_type, data):
503503
"url": dict}[sg_type]
504504
except KeyError:
505505
raise ShotgunError(
506-
"Field %s.%s: Handling for Shotgun type %s is not implemented" %
506+
"Field %s.%s: Handling for ShotGrid type %s is not implemented" %
507507
(entity_type, field, sg_type)
508508
)
509509

shotgun_api3/shotgun.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ def __init__(self, host, meta):
219219
except AttributeError:
220220
self.version = None
221221
if not self.version:
222-
raise ShotgunError("The Shotgun Server didn't respond with a version number. "
222+
raise ShotgunError("The ShotGrid Server didn't respond with a version number. "
223223
"This may be because you are running an older version of "
224-
"Shotgun against a more recent version of the Shotgun API. "
225-
"For more information, please contact Shotgun Support.")
224+
"ShotGrid against a more recent version of the ShotGrid API. "
225+
"For more information, please contact ShotGrid Support.")
226226

227227
if len(self.version) > 3 and self.version[3] == "Dev":
228228
self.is_dev = True
@@ -774,9 +774,6 @@ def info(self):
774774
>>> sg.info()
775775
{'full_version': [8, 2, 1, 0], 'version': [8, 2, 1], 'user_authentication_method': 'default', ...}
776776
777-
Tokens and values
778-
-----------------
779-
780777
::
781778
782779
Token Value
@@ -2730,13 +2727,11 @@ def get_attachment_download_url(self, attachment):
27302727
.. note::
27312728
Support for passing in an int representing the Attachment ``id`` is deprecated
27322729
2733-
.. todo::
2734-
Support for a standard entity hash should be removed: #22150
2735-
27362730
:returns: the download URL for the Attachment or ``None`` if ``None`` was passed to
27372731
``attachment`` parameter.
27382732
:rtype: str
27392733
"""
2734+
# TODO: Support for a standard entity hash should be removed: #22150
27402735
attachment_id = None
27412736
if isinstance(attachment, int):
27422737
attachment_id = attachment
@@ -3550,7 +3545,7 @@ def _parse_http_status(self, status):
35503545
if status[0] >= 300:
35513546
headers = "HTTP error from server"
35523547
if status[0] == 503:
3553-
errmsg = "Shotgun is currently down for maintenance or too busy to reply. Please try again later."
3548+
errmsg = "ShotGrid is currently down for maintenance or too busy to reply. Please try again later."
35543549
raise ProtocolError(self.config.server,
35553550
error_code,
35563551
errmsg,
@@ -3636,12 +3631,12 @@ def _response_errors(self, sg_response):
36363631
raise UserCredentialsNotAllowedForSSOAuthenticationFault(
36373632
sg_response.get("message",
36383633
"Authentication using username/password is not "
3639-
"allowed for an SSO-enabled Shotgun site")
3634+
"allowed for an SSO-enabled ShotGrid site")
36403635
)
36413636
elif sg_response.get("error_code") == ERR_OXYG:
36423637
raise UserCredentialsNotAllowedForOxygenAuthenticationFault(
36433638
sg_response.get("message", "Authentication using username/password is not "
3644-
"allowed for an Autodesk Identity enabled Shotgun site")
3639+
"allowed for an Autodesk Identity enabled ShotGrid site")
36453640
)
36463641
else:
36473642
# raise general Fault

tests/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Base class for Shotgun API tests."""
1+
"""Base class for ShotGrid API tests."""
22
import os
33
import re
44
import unittest

0 commit comments

Comments
 (0)