-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fff509
commit 01c54a5
Showing
4 changed files
with
150 additions
and
89 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,30 @@ | ||
# Include the README | ||
include README | ||
|
||
# Include the license file | ||
include LICENCE | ||
include THIRD.txt | ||
|
||
# Include dependencies | ||
include requirements*.txt | ||
|
||
# Include makefile | ||
include Makefile | ||
|
||
# Include docs | ||
recursive-include docs | ||
|
||
# Include Changelog | ||
include CHANGELOG | ||
|
||
# Include tests | ||
recursive-include tests/testsuites * | ||
|
||
# Include scripts | ||
recursive-include scripts * | ||
|
||
# Include tuto | ||
include tutorial/*.ipynb | ||
|
||
# Include include files | ||
include include/* |
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 @@ | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel", "Cython", "numpy"] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
[tool.poetry] | ||
name = "bbhx" | ||
version = "1.0.7" | ||
description = "A package for LISA Data Analysis" | ||
license = "GPL" | ||
classifiers = ["Programming Language :: Python :: 3", "Operating System :: OS Independent"] | ||
homepage = "https://github.com/mikekatz04/LISAanalysistools" | ||
authors = ["Michael L. Katz"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "*" | ||
# astropy = "==5.2.1" | ||
# corner = "==2.2.1" | ||
# healpy = "==1.16.2" | ||
# "ligo.skymap" = "==1.0.4" | ||
# matplotlib = "==3.6.3" | ||
# pandas = "==1.5.2" | ||
# seaborn = "==0.12.2" | ||
# tables = "==3.8.0" |
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,94 @@ | ||
import shutil | ||
import requests | ||
|
||
|
||
fps_cu_to_cpp = [ | ||
"PhenomHM", | ||
"Response", | ||
"Interpolate", | ||
"WaveformBuild", | ||
"Likelihood", | ||
] | ||
fps_pyx = ["phenomhm", "response", "interpolate", "waveformbuild", "likelihood"] | ||
|
||
for fp in fps_cu_to_cpp: | ||
shutil.copy("src/" + fp + ".cu", "src/" + fp + ".cpp") | ||
|
||
for fp in fps_pyx: | ||
shutil.copy("src/" + fp + ".pyx", "src/" + fp + "_cpu.pyx") | ||
|
||
|
||
# setup version file | ||
with open("README.md", "r") as fh: | ||
lines = fh.readlines() | ||
|
||
for line in lines: | ||
if line.startswith("Current Version"): | ||
version_string = line.split("Current Version: ")[1].split("\n")[0] | ||
|
||
with open("bbhx/_version.py", "w") as f: | ||
f.write("__version__ = '{}'".format(version_string)) | ||
|
||
|
||
initial_text_for_constants_file = """ | ||
# Collection of citations for modules in bbhx package | ||
# Copyright (C) 2020 Michael L. Katz | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
""" | ||
|
||
initial_text_for_constants_file2 = """ | ||
Constants | ||
******************************* | ||
The module :code:`bbhx.utils.constants` houses the constants used throughout the package. | ||
Constants list: | ||
""" | ||
|
||
fp_out_name = "bbhx/utils/constants.py" | ||
fp_out_name2 = "docs/source/user/constants.rst" | ||
fp_in_name = "include/constants.h" | ||
|
||
# develop few.utils.constants.py | ||
with open(fp_out_name, "w") as fp_out: | ||
with open(fp_out_name2, "w") as fp_out2: | ||
fp_out.write(initial_text_for_constants_file) | ||
fp_out2.write(initial_text_for_constants_file2) | ||
with open(fp_in_name, "r") as fp_in: | ||
lines = fp_in.readlines() | ||
for line in lines: | ||
if len(line.split()) == 3: | ||
if line.split()[0] == "#define": | ||
try: | ||
_ = float(line.split()[2]) | ||
string_out = ( | ||
line.split()[1] + " = " + line.split()[2] + "\n" | ||
) | ||
fp_out.write(string_out) | ||
fp_out2.write(f"\t* {string_out}") | ||
|
||
except ValueError as e: | ||
continue | ||
|
||
# for fp in fps_cu_to_cpp: | ||
# os.remove("src/" + fp + ".cpp") | ||
|
||
# for fp in fps_pyx: | ||
# os.remove("src/" + fp + "_cpu.pyx") |
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