Skip to content

style, structure, and tests #1

Open
@chadrik

Description

@chadrik

Hi folks,
First of all, thanks for the really cool package.
Before people start forking this project it would be good to address a few issues which will end up causing merge conflicts if you try to deal with them later.

first, you should probably convert tabs to space-tabs (this is part of the python PEP 8 style guide, and is at this point very standard for python code). one of your 2 forks has already done precisely this, which means their code won't merge with your other forks. that's why it's important to do this now.

second, it would be good restructure the code into a python package and get some standard root folders setup. something like this:

dependsworkflow/
  bin/  <-- executables go here
  depends/   <-- this is the root of your python package
    __init__.py  <-- typically no code goes in here
    ui/
      __init__.py  <-- typically no code goes in here
      scene_graph_widget.py
      main_window.py
      etc...
    core/
      __init__.py  <-- typically no code goes in here
      dag.py  <-- remove the depends_ prefix
      node.py
      data_package.py
      etc...
    utils/
      __init__.py  <-- typically no code goes in here
      etc...
  tests/
  examples/

being completely honest, it's a little scary seeing a project with so much code that is not organized into a python package, since this is a pretty fundamental concept. getting your code organized with instill confidence and gain contributors. again, making these structural changes will mean other peoples forks won't merge cleanly, so it's best to take care of soon.

tests would also be great to add, particularly for the core (testing qt ui is possible, but not as important). you have some options for creating and running tests. the unittest module comes in the python standard library. there's a backport of the python 3 version called unittest2 that has a few more features. also, there are tools to help ease the discovery of tests, which include nose and tox.

thanks, and keep up the good work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions