-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from spglib/refactor-stub
Separate stub files
- Loading branch information
Showing
11 changed files
with
339 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
changelog: | ||
categories: | ||
- title: 🛠 Breaking Changes | ||
labels: | ||
- Semver-Major | ||
- breaking-changes | ||
- title: 🎉 New Features | ||
labels: | ||
- Semver-Minor | ||
- enhancement | ||
- title: ⚠️ Deprecation | ||
labels: | ||
- deprecation | ||
- title: 🐞 Bug fixes | ||
labels: | ||
- bug | ||
- title: 📔 Documentation | ||
labels: | ||
- documentation | ||
- title: Other changes | ||
labels: | ||
- '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -359,6 +359,7 @@ lcov.info | |
!**/assets/*.json | ||
.env | ||
*.png | ||
*.cif | ||
|
||
docs/note/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class Cell: | ||
def __init__( | ||
self, | ||
basis: list[list[float]], | ||
positions: list[list[float]], | ||
numbers: list[int], | ||
): ... | ||
@property | ||
def basis(self) -> list[list[float]]: ... | ||
@property | ||
def positions(self) -> list[list[float]]: ... | ||
@property | ||
def numbers(self) -> list[int]: ... | ||
def serialize_json(self) -> str: ... | ||
@classmethod | ||
def deserialize_json(cls, json_str: str) -> Cell: ... | ||
|
||
class Operations: | ||
@property | ||
def rotations(self) -> list[list[list[float]]]: ... | ||
@property | ||
def translations(self) -> list[list[float]]: ... | ||
@property | ||
def num_operations(self) -> int: ... | ||
def __len__(self) -> int: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from moyopy._base import Operations | ||
|
||
class Setting: | ||
"""Preference for the setting of the space group.""" | ||
@classmethod | ||
def spglib(cls) -> Setting: | ||
"""The setting of the smallest Hall number.""" | ||
@classmethod | ||
def standard(cls) -> Setting: | ||
"""Unique axis b, cell choice 1 for monoclinic, hexagonal axes for rhombohedral, | ||
and origin choice 2 for centrosymmetric space groups.""" | ||
@classmethod | ||
def hall_number(cls, hall_number: int) -> Setting: | ||
"""Specific Hall number from 1 to 530.""" | ||
|
||
class Centering: ... | ||
|
||
class HallSymbolEntry: | ||
"""An entry containing space-group information for a specified hall_number.""" | ||
def __init__(self, hall_number: int): ... | ||
@property | ||
def hall_number(self) -> int: | ||
"""Number for Hall symbols (1 - 530).""" | ||
@property | ||
def number(self) -> int: | ||
"""ITA number for space group types (1 - 230).""" | ||
@property | ||
def arithmetic_number(self) -> int: | ||
"""Number for arithmetic crystal classes (1 - 73).""" | ||
@property | ||
def setting(self) -> Setting: | ||
"""Setting.""" | ||
@property | ||
def hall_symbol(self) -> str: | ||
"""Hall symbol.""" | ||
@property | ||
def hm_short(self) -> str: | ||
"""Hermann-Mauguin symbol in short notation.""" | ||
@property | ||
def hm_full(self) -> str: | ||
"""Hermann-Mauguin symbol in full notation.""" | ||
@property | ||
def centering(self) -> Centering: | ||
"""Centering.""" | ||
|
||
def operations_from_number(number: int, setting: Setting) -> Operations: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.