DnaChisel
DnaChisel copied to clipboard
suggestion: put builtin_specification to Specification folder and split it into sub folders by specification type
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
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.
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.
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.