diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..4b6230e3182754ebd1f246bf2c6920d3c1e4194e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,55 @@
+# Official language image. Look for the different tagged releases at:
+# https://hub.docker.com/r/library/python/tags/
+image: python
+
+# Change pip's cache directory to be inside the project directory since we can
+# only cache local items.
+variables:
+  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+
+# Pip's cache doesn't store the python packages
+# https://pip.pypa.io/en/stable/reference/pip_install/#caching
+#
+# If you want to also cache the installed packages, you have to install
+# them in a virtualenv and cache it as well.
+cache:
+  paths:
+    - .cache/pip
+
+stages:
+  - Build Env and Test
+before_script:
+  - pip install -e .[dev]
+
+flake8:
+  image: python:3.8
+  tags:
+    - passoft
+  stage: Build Env and Test
+  script:
+    - flake8 sohstationviewer
+    - flake8 tests
+
+python3.7:
+  image: python:3.7
+  tags:
+    - passoft
+  stage: Build Env and Test
+  script:
+    - python -m unittest
+
+python3.8:
+  image: python:3.8
+  tags:
+    - passoft
+  stage: Build Env and Test
+  script:
+    - python -m unittest
+
+python3.9:
+  image: python:3.9
+  tags:
+    - passoft
+  stage: Build Env and Test
+  script:
+    - python -m unittest
diff --git a/HISTORY.rst b/HISTORY.rst
new file mode 100644
index 0000000000000000000000000000000000000000..d05085b2916c2cc1e64549f49f7129afd0710665
--- /dev/null
+++ b/HISTORY.rst
@@ -0,0 +1,8 @@
+=======
+History
+=======
+
+2021.xxx
+--------
+
+* First release
diff --git a/README.md b/README.md
deleted file mode 100644
index af22036a9bc1bfc9d6229eca88d5f9c46c5dae32..0000000000000000000000000000000000000000
--- a/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-### Description
-
-SOHStationViewer is a tool to visualize State-of-Health packets from raw data recorded by different type of dataloggers.
-
-
-### Directory Structure
-
-````
-sohstationviewer/
-    model/
-        lib/
-    view/
-        lib/
-        ui/
-    controller/
-        lib/
-tests/
-````
-
-### Directory Description
-
-#### sohstationviewer/
-
-All codes for running sohstationviewer.
-
-
-#### model/
-
-Codes for reading data from raw files and reading setting data from config files.
-
-**lib/** Core codes to be used for reading data.
-
-
-#### view/
-
-Codes for Graphical User Interface (GUI).
-
-**lib/** Core GUI like plotting widget, common used GUI like log/message/error forms.
-
-**ui/** ui files from QtDesigner.
-
-
-#### controller/
-
-Codes for logical processes.
-
-**lib/** Core codes to be used for logical processes.
-
-
-#### tests/
-
- Unittest files for the codes. (GUI will not be included)
\ No newline at end of file
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000000000000000000000000000000000000..f0608f35edf51fb14e380f11fa4feb8a658ce3a8
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,50 @@
+================
+SOHStationViewer
+================
+
+Description
+-----------
+
+  Visualize State-of-Health packets from raw data recorded by different type of dataloggers.
+
+
+Directory Structure
+-------------------
+
+    sohstationviewer/
+        model/
+            core/
+        view/
+            core/
+            ui/
+        controller/
+            core/
+
+    tests/
+
+
+Directory Description
+---------------------
+
+  **sohstationviewer/**
+     All codes for running sohstationviewer.
+
+  **sohstationviewer/model/**
+     Codes for reading data from raw files and setting data from config files.
+
+  **sohstationviewer/view/**
+     Codes for Graphical User Interface (GUI).
+
+  **sohstationviewer/view/ui/**
+     ui files from QtDesigner.
+
+  **sohstationviewer/controller/**
+     Codes for logical processes.
+
+  **tests/**
+     Unittest files for the codes. (GUI will not be tested)
+
+
+License
+-------
+  GNU General Public License v3 (GPLv3)
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000000000000000000000000000000000000..f014dc613435121fe9e96fbf02c31020a1abe0d4
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""The setup script."""
+
+from setuptools import setup, find_packages
+
+with open('README.rst', 'rt') as readme_file:
+    readme = readme_file.read()
+
+with open('HISTORY.rst', 'rt') as history_file:
+    history = history_file.read()
+
+
+setup(
+    author="IRIS PASSCAL",
+    author_email='software-support@passcal.nmt.edu',
+    classifiers=[
+        'Development Status :: 5 - Production/Stable',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved ::  GNU General Public License v3 (GPLv3)',
+        'Natural Language :: English',
+        'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
+    ],
+    description="Visualize State-of-Health packets from raw data recorded by "
+                "different type of dataloggers.",
+    entry_points={
+        'console_scripts': [
+            'sohstationviewer=sohstationviewer.sohstationviewer:main',
+        ],
+    },
+    install_requires=['obspy',
+                      'PySide2'],
+    setup_requires=[],
+    extras_require={
+        'dev': [
+            'flake8'
+        ]
+    },
+    license="GNU General Public License v3",
+    long_description=readme + '\n\n' + history,
+    include_package_data=True,
+    keywords='sohstationviewer',
+    name='sohstationviewer',
+    packages=find_packages(include=['sohstationviewer']),
+    url='https://git.passcal.nmt.edu/passoft/sohstationviewer',
+    version='2021.167',
+    zip_safe=False,
+)
diff --git a/sohstationviewer/sohstationviewer.py b/sohstationviewer/sohstationviewer.py
new file mode 100644
index 0000000000000000000000000000000000000000..d0c9153db95f19821308220463d5f97cf7ed16b1
--- /dev/null
+++ b/sohstationviewer/sohstationviewer.py
@@ -0,0 +1,12 @@
+import sys
+from PySide2 import QtWidgets
+
+
+def main():
+    app = QtWidgets.QApplication()
+    # gui = MainGUI
+    sys.exit(app.exec_())
+
+
+if __name__ == '__main__':
+    main()