aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--fg21sim/__init__.py1
-rw-r--r--fg21sim/core.py9
-rw-r--r--fg21sim/helpers.py0
-rw-r--r--requirements.txt2
-rwxr-xr-xsetup.py23
-rw-r--r--tests/__init__.py0
-rw-r--r--tests/context.py8
-rw-r--r--tests/test_advanced.py16
-rw-r--r--tests/test_basic.py16
10 files changed, 85 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..23ecffa
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+# Makefile for "fg21sim"
+#
+# 2016-09-20
+#
+
+init:
+ pip3 install --user -r requirements.txt
+
+test:
+ nosetests tests
diff --git a/fg21sim/__init__.py b/fg21sim/__init__.py
new file mode 100644
index 0000000..f4633fa
--- /dev/null
+++ b/fg21sim/__init__.py
@@ -0,0 +1 @@
+from .core import hmm \ No newline at end of file
diff --git a/fg21sim/core.py b/fg21sim/core.py
new file mode 100644
index 0000000..2cea5dc
--- /dev/null
+++ b/fg21sim/core.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+
+def get_hmm():
+ """Get a thought."""
+ return 'hmmm...'
+
+def hmm():
+ """Contemplation..."""
+ print get_hmm() \ No newline at end of file
diff --git a/fg21sim/helpers.py b/fg21sim/helpers.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/fg21sim/helpers.py
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..b118ad0
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+nose
+sphinx
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..dc40675
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+with open('README.rst') as f:
+ readme = f.read()
+
+with open('LICENSE') as f:
+ license = f.read()
+
+setup(
+ name='fg21sim',
+ version='0.0.1',
+ description='Realistic Foregrounds Simulation for EoR 21cm Signal Detection',
+ long_description=readme,
+ author='Weitian LI',
+ author_email='liweitianux@live.com',
+ url='https://github.com/liweitianux/fg21sim',
+ license=license,
+ packages=find_packages(exclude=('tests', 'docs'))
+)
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/__init__.py
diff --git a/tests/context.py b/tests/context.py
new file mode 100644
index 0000000..352a47b
--- /dev/null
+++ b/tests/context.py
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+
+import sys
+import os
+
+sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
+
+import fg21sim
diff --git a/tests/test_advanced.py b/tests/test_advanced.py
new file mode 100644
index 0000000..1ae151c
--- /dev/null
+++ b/tests/test_advanced.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+from .context import fg21sim
+
+import unittest
+
+
+class AdvancedTestSuite(unittest.TestCase):
+ """Advanced test cases."""
+
+ def test_thoughts(self):
+ sample.hmm()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_basic.py b/tests/test_basic.py
new file mode 100644
index 0000000..ea50cf3
--- /dev/null
+++ b/tests/test_basic.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+from .context import fg21sim
+
+import unittest
+
+
+class BasicTestSuite(unittest.TestCase):
+ """Basic test cases."""
+
+ def test_absolute_truth_and_meaning(self):
+ assert True
+
+
+if __name__ == '__main__':
+ unittest.main()