Skip to content

Fix bugs in interface_generator and reorder imports in hetero_searching#46

Merged
tmizoguchim merged 1 commit intonmdl-mizo:developfrom
kohei-uey:feature/fix-bugs
Apr 14, 2026
Merged

Fix bugs in interface_generator and reorder imports in hetero_searching#46
tmizoguchim merged 1 commit intonmdl-mizo:developfrom
kohei-uey:feature/fix-bugs

Conversation

@kohei-uey
Copy link
Copy Markdown
Contributor

Summary

Fix syntax errors and import order bugs.

Changes

  • interface_generator l1670: remove block comments (that caused SyntaxError)
  • interface_generator l2459: fix init missing colon and instance variable assignments
  • interface_generator l2469~: add self parameter to csl_cnid_calc and find_c
  • hetero_searching: reorder imports to prevent numpy.core from overwriting interfacemaster.interface_generator.core

- interface_generator l1670: remove block comments
- interface_generator l2459: fix __init__ missing colon and instance variable assignments
- interface_generator l2469: add self parameter to csl_cnid_calc and find_c
- hetero_searchnig: reorder imports to prevent numpy.core overwriting interfacemaster.interface_generator.core
@kohei-uey kohei-uey requested a review from Copilot April 14, 2026 06:24
@kohei-uey kohei-uey added the bug Something isn't working label Apr 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Python syntax/import issues that were preventing interfacemaster modules from being imported/executed correctly, primarily by fixing broken code in interface_generator.py and adjusting import ordering in hetero_searching.py.

Changes:

  • Removes problematic empty quote blocks and attempts to repair a broken commented-out section in search_one_position_2D.
  • Fixes hetero_generator.__init__ syntax and stores constructor inputs on self; updates method signatures to include self.
  • Reorders numpy imports in hetero_searching.py to avoid name collisions with core.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
interfacemaster/interface_generator.py Fixes syntax issues in a class constructor and method definitions; adjusts a previously broken commented-out block near search_one_position_2D.
interfacemaster/hetero_searching.py Moves numpy wildcard imports earlier to prevent overwriting core imported from interface_generator.
Comments suppressed due to low confidence (1)

interfacemaster/interface_generator.py:1675

  • The commented-out #def specified_matching(...) line is at class indentation, but the following triple-quoted block is still indented, which makes it a standalone indented string at class scope and will raise an IndentationError/SyntaxError. Either fully remove this dead block, or comment out the docstring lines too, or restore a real def specified_matching(...) with correct indentation so the docstring is inside a function body.
    #def specified_matching(hkl_substrate, hkl_film, B_substrate, B_film):
        """
        lattice matching by specified indices
        
        Parameters
        ----------

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tmizoguchim
Copy link
Copy Markdown
Contributor

Thanks for the fixes. I checked the changes, and the syntax/import issues look resolved. Merging this PR.

@tmizoguchim tmizoguchim merged commit 7146f24 into nmdl-mizo:develop Apr 14, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants