datajoint / element-interface

Common functions for the DataJoint Elements
https://datajoint.com/docs
MIT License
3 stars 16 forks source link

refactor: :art: streamline the code #75

Closed JaerongA closed 1 year ago

JaerongA commented 1 year ago
JaerongA commented 1 year ago
  • Fix structure of the code.

    • Remove unused import.

    • Default the regex argument to "*"

    • Comment out print statements while reading data.

    • Sort the data files alphabetically.

I didn't touch the Intan's original code a lot so hopefully there wouldn't be too many merge conflicts with @CBroz1 's PR (https://github.com/datajoint/element-interface/pull/74)

tdincer commented 1 year ago

@JaerongA

The reason why I didn't modify the first two functions is to easily compare this code with the official code. Intan is not good at maintaining their code. I agree that their code can be refactored but then it will be hard to track the difference if they make changes in the future.

dimitri-yatsenko commented 1 year ago

Just a comment, @JaerongA. What Path.glob uses is not regular expressions. It's described as the Unix-style pattern matching. It looks similar to regular expressions but differs in its purpose and capabilities.

JaerongA commented 1 year ago

Just a comment, @JaerongA. What Path.glob uses is not regular expressions. It's described as the Unix-style pattern matching. It looks similar to regular expressions but differs in its purpose and capabilities.

Thanks @dimitri-yatsenko. That's good to know.

tdincer commented 1 year ago

@dimitri-yatsenko Your last point has been addressed. Shall we merge this PR?

tdincer commented 1 year ago

Thank you @dimitri-yatsenko and @JaerongA. I'm merging this PR. I'll make a couple of tweaks when I'm pushing the code to the main branch.