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

Lib from illicit part 1 #681

Merged
merged 10 commits into from
Nov 4, 2020

Conversation

iLLiCiTiT
Copy link
Member

Description

First part of my changes in pype.lib. There are more but few functions in current lib have modifications in opened PRs and not sure if should move them?

Changes

  • CustomNone - removed, never used
  • map_subsets_by_family is now static function of BuildWorkfile class (only place where was used)
  • get_project - removed, single-line function
  • get_avalon_database and set_io_database - moved to deprecated.py, they are not used in Pype 3
  • ApplicationLaunchFailed, launch_application and ApplicationAction - moved to applications.py
  • moved independent imports before dependent in lib.__init__.py

Question?

pype.lib contain a lot of functions which are specific for "avalon context", get_project was one of them, get_linked_assets, get_asset, get_hierarchy etc. Should we keep them in pype lib?

@iLLiCiTiT iLLiCiTiT self-assigned this Nov 3, 2020
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'

@iLLiCiTiT iLLiCiTiT requested a review from a team November 3, 2020 10:57
@mkolar
Copy link
Member

mkolar commented Nov 3, 2020

Those two PRs should probably be merged first, so we can keep it clean. They need some serious testing though

@mkolar mkolar added the backend label Nov 3, 2020
@kalisp kalisp linked an issue Nov 4, 2020 that may be closed by this pull request
@kalisp kalisp merged commit ba7abcb into feature/664-3-0-lib-refactor Nov 4, 2020
kalisp added a commit that referenced this pull request Nov 4, 2020
@kalisp
Copy link
Member

kalisp commented Nov 4, 2020

Manually tested replacement of get_project in Maya.
Manually tested map_subsets_by_family in Maya.

@mkolar mkolar deleted the feature/lib_from_illicit_part_1 branch November 9, 2020 22:12
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.0 lib refactor
3 participants