Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

3.0/feature/pype refactor start #169

Merged
merged 13 commits into from
Jun 1, 2020
Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented May 25, 2020

This PR requires avalon-core: ynput/avalon-core#132 and pype-config ynput/pype-config#27.

First step of pype's reorganization for Pype 3.

  • hosts were moved under hosts folder.
  • hodules with services were moved under modules folder.
  • modified imports of Anatomy, Logger, config, execute, project_overrides_dir_path, they are imported in and with pype.api

WARNING: imports from pypeapp which remained:

  • style (can't be imported in api due to PyQt requirements)
  • resources now used for tray will be moved to pype later
  • lib.log._bootstrap_mongo_log should be moved to pype too
  • lib.Terminal used at one place and not sure if it's necessary

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 11, in 
    sys.exit(main())
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.6/ast.py", line 253, in visit
    return visitor(node)
  File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
    self.visit(item)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.6/ast.py", line 263, in generic_visit
    self.visit(value)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

@@ -2,14 +2,14 @@
import sys
import KnobScripter

from pype.nuke.lib import (
from pype.hosts.nuke.lib import (
Copy link

Choose a reason for hiding this comment

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

'pype.hosts.nuke.lib.writes_version_sync' imported but unused

from pypeapp import config
import pype.maya.lib as mlib
from pype.api import config
import pype.hosts.maya.lib as mlib
Copy link

Choose a reason for hiding this comment

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

'pype.hosts.maya.lib as mlib' imported but unused

@@ -1,7 +1,7 @@
import pyblish.api
from avalon.nuke import lib as anlib
from pype.nuke import lib as pnlib
from pype.nuke import utils as pnutils
from pype.hosts.nuke import lib as pnlib
Copy link

Choose a reason for hiding this comment

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

'pype.hosts.nuke.lib as pnlib' imported but unused

@@ -20,7 +20,7 @@ class ValidateRigOutSetNodeIds(pyblish.api.InstancePlugin):
families = ["rig"]
hosts = ['maya']
label = 'Rig Out Set Node Ids'
actions = [pype.maya.action.SelectInvalidAction, pype.api.RepairAction]
actions = [pype.hosts.maya.action.SelectInvalidAction, pype.api.RepairAction]
Copy link

Choose a reason for hiding this comment

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

line too long (81 > 79 characters)

import pype.maya.action
from pype.maya.lib import undo_chunk
import pype.hosts.maya.action
from pype.hosts.maya.lib import undo_chunk
Copy link

Choose a reason for hiding this comment

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

'pype.hosts.maya.lib.undo_chunk' imported but unused

@@ -61,7 +61,7 @@ def process(self, instance):
except:
continue

new_context = pype.blender.plugin.create_blender_context(active=selected[0], selected=selected)
new_context = pype.hosts.blender.plugin.create_blender_context(active=selected[0], selected=selected)
Copy link

Choose a reason for hiding this comment

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

line too long (109 > 79 characters)

@@ -1,4 +1,5 @@
from pypeapp import style, Logger
from pype.api import Logger
Copy link

Choose a reason for hiding this comment

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

'pype.api.Logger' imported but unused

cmds.evalDeferred(
"from pype.maya import lib;lib.add_render_layer_change_observer()")
"from pype.hosts.maya import lib;lib.add_render_layer_change_observer()")
Copy link

Choose a reason for hiding this comment

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

line too long (85 > 79 characters)

@@ -200,11 +196,11 @@ def on_new(_):
avalon.logger.info("Running callback on new..")
with maya.suspended_refresh():
cmds.evalDeferred(
"from pype.maya import lib;lib.remove_render_layer_observer()")
"from pype.hosts.maya import lib;lib.remove_render_layer_observer()")
Copy link

Choose a reason for hiding this comment

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

line too long (81 > 79 characters)

cmds.evalDeferred(
"from pype.maya import lib;lib.add_render_layer_change_observer()")
"from pype.hosts.maya import lib;lib.add_render_layer_change_observer()")
Copy link

Choose a reason for hiding this comment

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

line too long (81 > 79 characters)

@antirotor
Copy link
Member

antirotor commented May 27, 2020

lib.Terminal used at one place and not sure if it's necessary

It is used in PypeLauncher to provide output for few pype commands and this should by moved to pypclub/pype as well. And it is necessary, providing colorized output pleases aesthetic aspects of users soul (and mine to) 🌈

@mkolar
Copy link
Member

mkolar commented May 27, 2020

providing colorized output pleases aesthetic aspects of users soul (and mine to) 🌈

weeeell this is purely geek factor feature let's be honest. bu tI agree that it is somewhat helpful to see nice highlighting in terminal

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 11, in 
    sys.exit(main())
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.6/ast.py", line 253, in visit
    return visitor(node)
  File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
    self.visit(item)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.6/ast.py", line 263, in generic_visit
    self.visit(value)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 11, in 
    sys.exit(main())
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.6/ast.py", line 253, in visit
    return visitor(node)
  File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
    self.visit(item)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.6/ast.py", line 263, in generic_visit
    self.visit(value)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/linters/.local/bin/flake8", line 11, in 
    sys.exit(main())
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/home/linters/.local/lib/python3.6/site-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.6/ast.py", line 253, in visit
    return visitor(node)
  File "/usr/lib/python3.6/ast.py", line 261, in generic_visit
    self.visit(item)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.6/ast.py", line 263, in generic_visit
    self.visit(value)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/home/linters/.local/lib/python3.6/site-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

@mkolar mkolar merged commit a2903f1 into develop Jun 1, 2020
@mkolar mkolar deleted the 3.0/feature/pype_refactor_start branch June 10, 2020 09:55
@mkolar mkolar added this to the 2.10 milestone Jun 16, 2020
Guilhemz added a commit to quadproduction/OpenPype that referenced this pull request Nov 9, 2023
BenSouchet pushed a commit to quadproduction/OpenPype that referenced this pull request Nov 10, 2023
BenSouchet added a commit to quadproduction/OpenPype that referenced this pull request Nov 13, 2023
…set-visible-in-the-publish-window-tvpaint

ynput#169: bugfixe: add missing 'enabled' attribute to allow deactivation through settings
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants