Skip to content
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

Ticket/28441 hide template projects by default #79

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nemoDreamer
Copy link
Contributor

We're adding Project.is_template in v6.0.0 to support multiple template projects. Unlike include_archived_projects (which defaults to True), the new include_template_projects CRUD flag defaults to False.

  • I did some refactoring as I felt dirty copy/pasting ensure_include_archived_projects
  • The rest is IF statements copied from existing include_archived_flag support w/ the logic reversed
  • Moved the flag tests into their own file, to avoid needing to run the gargantuan test_api.py

@nemoDreamer
Copy link
Contributor Author

Questions: why is the test-suite so insanely slow locally? The Travis test passed much faster. Is it something to do w/ us hitting our puny VM? Does setUp run before every test, or only once per test class? Because the majority of these don't need a full DB reset.


def _version_str(version):
"""Converts a tuple of int's to a '.' separated str"""
return '.'.join(map(str, version))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't believe that Python's join is called on the separator... It should be a functionality of an enumerable, not a string... Weird...!

@nemoDreamer
Copy link
Contributor Author

Ran the entire suite on 5.4, then 6.0, then 6.0-28441, just to make sure all was coming out green. But took aaaaaaages 😆

@nemoDreamer
Copy link
Contributor Author

Note: see shotgunsoftware/shotgun#1119 for CRUD changes.

@nemoDreamer nemoDreamer force-pushed the ticket/28441_hide_template_projects_by_default branch 3 times, most recently from 9477d11 to 4157455 Compare March 19, 2015 16:21
@nemoDreamer
Copy link
Contributor Author

CRUD does not currently seem to handle the new flag correctly when coming from an API call, so tests are failing "correctly".

We're putting this on the back-burner, since at least like this, we're not breaking existing API functionality (running the old API agains a new site comes up green).

@nemoDreamer nemoDreamer added this to the Shotgun v6.0.1 milestone Mar 19, 2015
@nemoDreamer nemoDreamer force-pushed the ticket/28441_hide_template_projects_by_default branch from 4157455 to dbb23e9 Compare March 24, 2015 20:00
if not self.version or self.version < (2, 4, 0):
raise ShotgunError("JSON API requires server version 2.4 or "\
"higher, server is %s" % (self.version,))
:param feature: dict supported version and human label { 'version': (int, int, int), 'label': str }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the documentation.

@nemoDreamer nemoDreamer force-pushed the ticket/28441_hide_template_projects_by_default branch from dbb23e9 to 6a74c73 Compare April 3, 2015 14:14
@manneohrstrom
Copy link
Contributor

@nemoDreamer can this be closed?

@nemoDreamer
Copy link
Contributor Author

No idea, @manneohrstrom : it's 3 years old, and I have no idea if it's still wanted.

@carlos-villavicencio-adsk carlos-villavicencio-adsk marked this pull request as draft May 28, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants