Skip to content

Commit 23726f7

Browse files
Merge pull request #179 from pranavbaburaj/master
fix: Fix module issue mentioned in #178
2 parents 23deb55 + f57acfa commit 23726f7

6 files changed

Lines changed: 152 additions & 35 deletions

File tree

.gitignore

Lines changed: 128 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,115 @@
1-
.idea/*
2-
dynamic-cli-env
3-
dynamic.egg-info
4-
src/search /__pycache__
5-
__pycache__
6-
src/arguments/__pycache__
7-
.vscode/
8-
src/dynamic_cli.egg-info/
9-
dynamic_cli.egg-info/
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
105+
__pypackages__/
106+
107+
# Celery stuff
108+
celerybeat-schedule
109+
celerybeat.pid
110+
111+
# SageMath parsed files
112+
*.sage.py
10113

11114
# Environments
12115
.env
@@ -17,6 +120,16 @@ ENV/
17120
env.bak/
18121
venv.bak/
19122

123+
# Spyder project settings
124+
.spyderproject
125+
.spyproject
126+
127+
# Rope project settings
128+
.ropeproject
129+
130+
# mkdocs documentation
131+
/site
132+
20133
# mypy
21134
.mypy_cache/
22135
.dmypy.json
@@ -31,12 +144,10 @@ dmypy.json
31144
# Cython debug symbols
32145
cython_debug/
33146

34-
# User files related to API testing and authentication
35-
access_token.json
36-
response_data.json
37-
38-
# Selenium
39-
geckodriver.log
147+
# PyCharm
148+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
149+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
150+
# and can be added to the global gitignore or merged into this file. For a more nuclear
151+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
152+
#.idea/
40153

41-
#dist
42-
dist/

dynamic/__main__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#!/usr/bin/env python
22

3+
4+
import sys
5+
import os
36
import argparse
4-
from dynamic.search import Search
57

8+
root = os.path.dirname(__file__)
9+
sys.path.append(root)
10+
#from dynamic.search import Search
11+
from search import Search
612

713
version = "1.1.0"
814

@@ -84,4 +90,4 @@ def main():
8490

8591

8692
if __name__ == "__main__":
87-
main()
93+
main()

dynamic/notion.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os
22

3-
from .utility import get_browser_driver
4-
from .error import LoginError
5-
from .settings import LOGIN_PATH
6-
from .settings import TOKEN_FILE_PATH
3+
from utility import get_browser_driver
4+
from error import LoginError
5+
from settings import LOGIN_PATH
6+
from settings import TOKEN_FILE_PATH
77

88
from selenium.webdriver.common.by import By
99
from selenium.webdriver.support.ui import WebDriverWait

dynamic/search.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from termcolor import colored
44
import sys as sys
55

6-
from .error import SearchError
7-
from .utility import Utility
8-
from .utility import Playbook
9-
from .save import SaveSearchResults
10-
from .update import UpdateApplication
11-
from .api_test import ApiTesting
12-
from .notion import NotionClient
6+
from error import SearchError
7+
from utility import Utility
8+
from utility import Playbook
9+
from save import SaveSearchResults
10+
from update import UpdateApplication
11+
from api_test import ApiTesting
12+
from notion import NotionClient
1313

1414
version = "0.1.0"
1515

dynamic/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from termcolor import colored
33
import webbrowser as webbrowser
44

5-
from .error import SearchError
5+
from error import SearchError
66

77

88
class UpdateApplication(object):

dynamic/utility.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
from simple_term_menu import TerminalMenu
1313
import webbrowser
1414

15-
from .error import SearchError
16-
from .save import SaveSearchResults
17-
from .markdown import MarkdownRenderer
18-
from .settings import PLAYBOOK_FILE
15+
from error import SearchError
16+
from save import SaveSearchResults
17+
from markdown import MarkdownRenderer
18+
from settings import PLAYBOOK_FILE
1919

2020
# Required for OAuth
2121
import json

0 commit comments

Comments
 (0)