mirror of
https://github.com/Findus23/rebound-stubs.git
synced 2024-09-08 02:23:48 +02:00
update for rebound 3.18.0
This commit is contained in:
parent
3623b3e2e5
commit
f721b3f974
5 changed files with 25 additions and 22 deletions
|
@ -5,7 +5,7 @@ install:
|
|||
- git clone https://github.com/hannorein/rebound rebound-src
|
||||
- pip install mypy matplotlib
|
||||
- pip install git+https://github.com/Findus23/retype.git@skip-setters
|
||||
script:
|
||||
script:
|
||||
# stub-dir, output dir, src dir
|
||||
- retype -p rebound -t retyped/rebound rebound-src/rebound
|
||||
- cd retyped && mypy rebound || true
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from typing import Optional, Union
|
||||
|
||||
from . import Particle
|
||||
|
||||
|
||||
def api_request(particle: str, datestart: Union[str, datetime], dateend: Union[str, datetime], plane: str) -> str:
|
||||
...
|
||||
|
||||
|
||||
def getParticle(particle: Optional[str] = ..., m: Optional[float] = ..., x: Optional[float] = ...,
|
||||
y: Optional[float] = ..., z: Optional[float] = ..., vx: Optional[float] = ...,
|
||||
vy: Optional[float] = ..., vz: Optional[float] = ..., primary: Optional[float] = ...,
|
||||
a: Optional[float] = ..., anom: Optional[float] = ..., e: Optional[float] = ...,
|
||||
omega: Optional[float] = ..., inc: Optional[float] = ..., Omega: Optional[float] = ...,
|
||||
MEAN: Optional[float] = ..., date: Optional[str|datetime] = ..., plane: str = ...,
|
||||
MEAN: Optional[float] = ..., date: Optional[Union[str, datetime]] = ..., plane: str = ...,
|
||||
hash: int = ...) -> Particle: ...
|
||||
|
|
|
@ -100,10 +100,10 @@ class reb_simulation_integrator_saba(Structure):
|
|||
keep_unsynchronized: IntBoolean
|
||||
|
||||
@property
|
||||
def type(self) -> str: ...
|
||||
def type(self) -> Union[str, int]: ...
|
||||
|
||||
@type.setter
|
||||
def type(self, value: str) -> None: ...
|
||||
def type(self, value: Union[str, int]) -> None: ...
|
||||
|
||||
|
||||
class reb_simulation_integrator_whfast(Structure):
|
||||
|
@ -124,16 +124,16 @@ class reb_simulation_integrator_whfast(Structure):
|
|||
def __repr__(self) -> str: ...
|
||||
|
||||
@property
|
||||
def coordinates(self) -> str: ...
|
||||
def coordinates(self) -> Union[int, str]: ...
|
||||
|
||||
@coordinates.setter
|
||||
def coordinates(self, value: str) -> None: ...
|
||||
def coordinates(self, value: Union[int, str]) -> None: ...
|
||||
|
||||
@property
|
||||
def kernel(self) -> str: ...
|
||||
def kernel(self) -> Union[int, str]: ...
|
||||
|
||||
@kernel.setter
|
||||
def kernel(self, value: str) -> None: ...
|
||||
def kernel(self, value: Union[int, str]) -> None: ...
|
||||
|
||||
|
||||
class Orbit(Structure):
|
||||
|
@ -290,7 +290,7 @@ class Simulation(Structure):
|
|||
def simulationarchive_snapshot(self, filename: str, deletefile: bool = ...) -> None: ...
|
||||
|
||||
@property
|
||||
def simulationarchive_filename(self) -> str: ...
|
||||
def simulationarchive_filename(self) -> bytes: ...
|
||||
|
||||
def process_messages(self) -> None: ...
|
||||
|
||||
|
@ -373,25 +373,25 @@ class Simulation(Structure):
|
|||
def N_real(self) -> int: ...
|
||||
|
||||
@property
|
||||
def integrator(self) -> str: ...
|
||||
def integrator(self) -> Union[int, str]: ...
|
||||
|
||||
@integrator.setter
|
||||
def integrator(self, value: Union[int, str]) -> None: ...
|
||||
|
||||
@property
|
||||
def boundary(self) -> str: ...
|
||||
def boundary(self) -> Union[int, str]: ...
|
||||
|
||||
@boundary.setter
|
||||
def boundary(self, value: Union[int, str]) -> None: ...
|
||||
|
||||
@property
|
||||
def gravity(self) -> str: ...
|
||||
def gravity(self) -> Union[int, str]: ...
|
||||
|
||||
@gravity.setter
|
||||
def gravity(self, value: Union[int, str]) -> None: ...
|
||||
|
||||
@property
|
||||
def collision(self) -> str: ...
|
||||
def collision(self) -> Union[int, str]: ...
|
||||
|
||||
@collision.setter
|
||||
def collision(self, value: Union[int, str]) -> None: ...
|
||||
|
@ -411,7 +411,7 @@ class Simulation(Structure):
|
|||
def convert_particle_units(self, *args: Any) -> None: ...
|
||||
|
||||
def add_variation(self, order: int = ..., first_order: Optional[Variation] = ...,
|
||||
first_order_2: Optional[Variation] = ..., testparticle: int = ...)->Variation: ...
|
||||
first_order_2: Optional[Variation] = ..., testparticle: int = ...) -> Variation: ...
|
||||
|
||||
def init_megno(self, seed: Optional[int] = ...) -> None: ...
|
||||
|
||||
|
@ -434,9 +434,8 @@ class Simulation(Structure):
|
|||
|
||||
def add_particles_ascii(self, s: str) -> None: ...
|
||||
|
||||
def calculate_orbits(self, primary: Optional[Particle] = ..., jacobi_masses: bool = ...,
|
||||
heliocentric: Optional[bool] = ..., barycentric: Optional[bool] = ...
|
||||
) -> Orbit: ...
|
||||
def calculate_orbits(self, primary: Optional[Particle] = ..., jacobi_masses: bool = ...
|
||||
) -> List[Orbit]: ...
|
||||
|
||||
def calculate_com(self, first: int = ..., last: Optional[int] = ...) -> Particle: ...
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from ctypes import c_uint32
|
||||
from typing import Dict, Sequence
|
||||
from typing import Dict, Sequence, Optional
|
||||
|
||||
from . import Particle
|
||||
|
||||
|
||||
def hash_to_unit(hash: c_uint32) -> str: ...
|
||||
def hash_to_unit(hash: c_uint32) -> Optional[str]: ...
|
||||
|
||||
|
||||
G_SI: float
|
||||
|
|
4
setup.py
4
setup.py
|
@ -18,11 +18,11 @@ setup(
|
|||
maintainer_email="rebound-stubs@lw1.at",
|
||||
description="type stubs for Rebound",
|
||||
license="GPL",
|
||||
version="3.16.0",
|
||||
version="3.18.0",
|
||||
packages=["rebound-stubs"],
|
||||
# PEP 561 requires these
|
||||
install_requires=[
|
||||
"rebound>=3.16.0",
|
||||
"rebound>=3.18.0",
|
||||
],
|
||||
package_data=find_stubs("rebound-stubs"),
|
||||
zip_safe=False,
|
||||
|
|
Loading…
Reference in a new issue