DnaChisel icon indicating copy to clipboard operation
DnaChisel copied to clipboard

suggestion: put builtin_specification to Specification folder and split it into sub folders by specification type

Open Lix1993 opened this issue 5 years ago • 3 comments

like this:

└── Specification
    ├── builtin_specifications
    │   ├── alignment_related
    │   │   ├── AvoidBlast.py
    │   │   └── AvoidMatches.py
    │   ├── codons_related
    │   ├── pattern_related
    │   │   ├── AvoidChanges.py
    │   │   ├── AvoidPattern.py
    │   │   └── EnforcePattern.py
    │   └── second_structure_related
    │       └── AvoudHairpins.py
    ├── SpecEvaluation
    ├── Specification.py
    └── SpecificationSet.py

Lix1993 avatar Dec 16 '19 07:12 Lix1993

when dealing with a specific specification, I wanna read Specification.py to understand what happens.

Putting them together make me easy to find the Specification.py file.

Lix1993 avatar Dec 16 '19 07:12 Lix1993

I am not against it but I tried it at some point but met issues, I don't remember the details but that created a weird circular import problem in the init.py files, and created lots of nesting and the builtin_specs, which could not access SequencePattern using relative imports "." or ".." anymore.

I like the classification, but I'd wait a bit and leave this issue open until there are bit more specifications to classify.

Zulko avatar Dec 16 '19 14:12 Zulko

I think the circular import problem comes from from .SequencePattern import SequencePattern

since the dir name SequencePattern is exactly same with file name SequencePattern.py using relative import here change the SequencePattern in the namespace ,

rename the dir will help, I think.

Lix1993 avatar Dec 17 '19 06:12 Lix1993