Repository: sun-asterisk-research/table_reconstruction (language: python)

Issue:
Missing submodule when installing package manually 
## 🐛 Bug

Missing submodule when installing package manually by using command `pip install .` 

## To Reproduce

Steps to reproduce the behavior:

1. Clone this repo
2. Move to the root folder
3. Install by using this command `pip install .`
4. Check the list of files in the directory with the command `tree`

```bash
% tree  /home/niits/anaconda3/envs/pdf/lib/python3.7/site-packages/table_reconstruction                                                     
/home/niits/anaconda3/envs/pdf/lib/python3.7/site-packages/table_reconstruction
└── __init__.py
```

## Expected behavior

The directory containing the table reconstruction package must also contain submodules
```bash
% tree  /home/niits/anaconda3/envs/pdf/lib/python3.7/site-packages/table_reconstruction                                                     
/home/niits/anaconda3/envs/pdf/lib/python3.7/site-packages/table_reconstruction
├── __init__.py
└── line_segmentation
    ├── dataset.py
    ├── __init__.py
    ├── line_segment.py
    ├── unet
    │   ├── dynamic_unet.py
    │   ├── __init__.py
    │   ├── repunet.py
    │   ├── resunet.py
    │   ├── unet_model.py
    │   └── unet_parts.py
    └── utils.py
```
## Additional context

None


Discussion / hints:

Fix patch:
diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000..e0ea542
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,3 @@
+[flake8]
+max-line-length = 88
+extend-ignore = E203
\ No newline at end of file
diff --git a/.sun-ci.yml b/.sun-ci.yml
index 533302c..3cf593a 100644
--- a/.sun-ci.yml
+++ b/.sun-ci.yml
@@ -41,7 +41,7 @@ jobs:
   script:
     - pip3 install mypy types-setuptools opencv-python-headless
     - python3 setup.py develop
-    - mypy table_reconstruction --install-types  --ignore-missing-imports
+    - mypy table_reconstruction --install-types --non-interactive --ignore-missing-imports
   allow_failure: true
   except:
     messages:
diff --git a/pyproject.toml b/pyproject.toml
index f6bbbc3..b148f9f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,4 +4,5 @@
 requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
 build-backend = "setuptools.build_meta"
 
-[tool.setuptools_scm]
+[tool.isort]
+profile = "black"
diff --git a/setup.py b/setup.py
index 94cd3a1..37717f6 100644
--- a/setup.py
+++ b/setup.py
@@ -1,16 +1,16 @@
-from setuptools import setup
+from setuptools import setup, find_packages
 import pathlib
 import sys
 
 home_page = "https://github.com/sun-asterisk-research/table_reconstruction"
-assert sys.version_info >= (
-    3, 6, 2), "table_reconstruction requires Python 3.6.2+"
+assert sys.version_info >= (3, 6, 2), "table_reconstruction requires Python 3.6.2+"
 
 here = pathlib.Path(__file__).parent.resolve()
 
 long_description = (here / "README.md").read_text(encoding="utf-8")
 
-with open('requirements.txt') as f:
+print(find_packages(where=".", exclude=["tests"]))
+with open("requirements.txt") as f:
     requirements = f.read().splitlines()
 
 setup(
@@ -18,7 +18,7 @@
     use_scm_version=True,
     author="Sun* AI Research",
     author_email="sun.converter.team@gmail.com",
-    setup_requires=['setuptools_scm'],
+    setup_requires=["setuptools_scm"],
     description="A table reconstruction package",
     long_description=long_description,
     long_description_content_type="text/markdown",
@@ -29,5 +29,6 @@
     include_package_data=True,
     python_requires=">=3.6",
     install_requires=requirements,
-
+    package_dir={"": "."},
+    packages=find_packages(where=".", exclude=["tests"]),
 )
diff --git a/table_reconstruction/__init__.py b/table_reconstruction/__init__.py
index 839f5f1..29e3a5f 100644
--- a/table_reconstruction/__init__.py
+++ b/table_reconstruction/__init__.py
@@ -1,4 +1,5 @@
 from pkg_resources import get_distribution, DistributionNotFound
+
 __version__ = None
 try:
     __version__ = get_distribution("table_reconstruction").version
diff --git a/tox.ini b/tox.ini
index bcfa0c4..c915af0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -32,7 +32,7 @@ deps =
     # readme_renderer
     coverage
 commands =
-    check-manifest --ignore 'tox.ini,tests/**,.sun-ci.yml,coverage.xml,.coverage,example/**'
+    check-manifest --ignore 'tox.ini,tests/**,.sun-ci.yml,coverage.xml,.coverage,example/**,.flake8'
     # This repository uses a Markdown long_description, so the -r flag to
     # `setup.py check` is not needed. If your project contains a README.rst,
     # use `python setup.py check -m -r -s` instead.
@@ -44,3 +44,5 @@ commands =
 [flake8]
 exclude = .tox,*.egg,build,data
 select = E,W,F
+max-line-length = 88
+extend-ignore = E203
\ No newline at end of file


Test patch:
diff --git a/tests/test_package.py b/tests/test_package.py
index 7f97f6c..9f33293 100644
--- a/tests/test_package.py
+++ b/tests/test_package.py
@@ -6,11 +6,12 @@ def test_module_exist(self):
         exception = None
         try:
             import table_reconstruction
+
             print(table_reconstruction.__version__)
         except Exception as e:
             exception = e
         self.assertIsNone(exception)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()