Skip to content

Commit

Permalink
Merge pull request #18 from nishitomo206/develop
Browse files Browse the repository at this point in the history
v0.1
  • Loading branch information
nishitomo206 authored Apr 15, 2023
2 parents c79cdda + 70aac55 commit fa58b88
Show file tree
Hide file tree
Showing 7 changed files with 804 additions and 303 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# pyopentd
# pyopentd v0.1

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

(開発中)

Expand Down Expand Up @@ -30,7 +32,7 @@ Thermal DesktopのAPIであるOpenTDをpythonで触るためのライブラリ
```
2. ./pyopentd/src/pyopentd/ディレクトリにある、\_\_init\_\_.pyを除く全pythonファイルの"/OpenTDv62/v4.0_6.2.0.7__65e6d95ed5c2e178/"の行を自分のものに変更する。
3. windows powershellを開いて元のディレクトリ(README.mdと同じ階層)に移動。
3. windows powershellを開いてルートディレクトリ(README.mdと同じ階層)に移動。
``` PowerShell
cd pyopentd
Expand All @@ -45,3 +47,7 @@ Thermal DesktopのAPIであるOpenTDをpythonで触るためのライブラリ
## サンプルを実行
./sample/sample.ipynb がサンプルファイルになっているので、ファイルを開いて実行してみて下さい。
## 質問、問い合わせ、その他なんでも
お気軽に nishitomo206@gmail.com にお問い合わせください。
24 changes: 13 additions & 11 deletions sample/sample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"# orbit.Case Set 2 以外は動かないので注意。\n",
"group_name = 'orbit'\n",
"caseset_name = 'Case Set 2'\n",
"case = td.GetCaseSet(caseset_name, group_name)"
"case = td.get_caseset(caseset_name, group_name)"
]
},
{
Expand Down Expand Up @@ -243,7 +243,7 @@
],
"source": [
"# 軌道情報の取得\n",
"orbit_name = pt.get_orbit_name_from_caseset(case)\n",
"orbit_name = case.get_orbit_name()\n",
"print(orbit_name)\n",
"df_orbit = td.get_orbit(orbit_name)\n",
"df_orbit.head()"
Expand All @@ -256,7 +256,7 @@
"outputs": [],
"source": [
"# 実行\n",
"case.Run()"
"case.run()"
]
},
{
Expand All @@ -280,7 +280,7 @@
}
],
"source": [
"sav_name = case.SindaOptions.SaveFilename\n",
"sav_name = case.origin.SindaOptions.SaveFilename\n",
"print(sav_name)"
]
},
Expand All @@ -301,7 +301,7 @@
}
],
"source": [
"sav_path = f'./td_model/{case.UserDirectory}/{sav_name}'\n",
"sav_path = f'./td_model/{case.origin.UserDirectory}/{sav_name}'\n",
"sav_path"
]
},
Expand Down Expand Up @@ -360,7 +360,7 @@
"df_orbit_modify = get_attitude(savefile.times, df_orbit)\n",
"# df_orbit_modify\n",
"df_time = pd.DataFrame(savefile.times, columns=['Times'])\n",
"df_case = pd.DataFrame([f'{case.GroupName}.{case.Name}']*len(savefile.times), columns=['case'])"
"df_case = pd.DataFrame([f'{case.origin.GroupName}.{case.origin.Name}']*len(savefile.times), columns=['case'])"
]
},
{
Expand Down Expand Up @@ -773,11 +773,8 @@
}
],
"metadata": {
"interpreter": {
"hash": "c3623eeadeff90687f25f628eb47808eede64c694dd73d054ce108ebd32f6903"
},
"kernelspec": {
"display_name": "Python 3.8.10 ('.venv_py38')",
"display_name": "Python 3.8.10 ('.venv_py38': venv)",
"language": "python",
"name": "python3"
},
Expand All @@ -793,7 +790,12 @@
"pygments_lexer": "ipython3",
"version": "3.8.10"
},
"orig_nbformat": 4
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "c3623eeadeff90687f25f628eb47808eede64c694dd73d054ce108ebd32f6903"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
Expand Down
55 changes: 27 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,52 @@
# License: MIT License

from setuptools import setup, find_packages

# import src.pyopentd
from src import pyopentd

DESCRIPTION = ""
NAME = 'pyopentd'
AUTHOR = 'Tomoki Nishikawa'
AUTHOR_EMAIL = 'nishitomo206@gmail.com'
URL = 'https://github.com/nishitomo206/pyopentd'
LICENSE = 'MIT License'
DOWNLOAD_URL = 'https://github.com/nishitomo206/pyopentd'
NAME = "pyopentd"
AUTHOR = "Tomoki Nishikawa"
AUTHOR_EMAIL = "nishitomo206@gmail.com"
URL = "https://github.com/nishitomo206/pyopentd"
LICENSE = "MIT License"
DOWNLOAD_URL = "https://github.com/nishitomo206/pyopentd"
VERSION = pyopentd.__version__
# PYTHON_REQUIRES = ">=3.6"

INSTALL_REQUIRES = [
]
INSTALL_REQUIRES = []

EXTRAS_REQUIRE = {
}
EXTRAS_REQUIRE = {}

# PACKAGES = [
# 'pyopentd'
# ]

CLASSIFIERS = [
]
CLASSIFIERS = []

# with open('README.rst', 'r') as fp:
# readme = fp.read()
# with open('CONTACT.txt', 'r') as fp:
# contacts = fp.read()
# long_description = readme + '\n\n' + contacts

setup(name=NAME,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
maintainer=AUTHOR,
maintainer_email=AUTHOR_EMAIL,
description=DESCRIPTION,
setup(
name=NAME,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
maintainer=AUTHOR,
maintainer_email=AUTHOR_EMAIL,
description=DESCRIPTION,
# long_description=long_description,
license=LICENSE,
url=URL,
version=VERSION,
download_url=DOWNLOAD_URL,
license=LICENSE,
url=URL,
version=VERSION,
download_url=DOWNLOAD_URL,
# python_requires=PYTHON_REQUIRES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
packages=find_packages(where='src'),
package_dir={'': 'src'},
classifiers=CLASSIFIERS
)
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
packages=find_packages(where="src"),
package_dir={"": "src"},
classifiers=CLASSIFIERS,
)
2 changes: 1 addition & 1 deletion src/pyopentd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .result import *
from .utils import *

__version__ = '0.0.1'
__version__ = "0.1"
Loading

0 comments on commit fa58b88

Please sign in to comment.