From 49f51bf5d4032658c5ff35755c98a60ef69ce7a4 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Thu, 18 Mar 2021 21:40:42 -0400 Subject: [PATCH] initial commit on new branch --- .gitignore | 133 +++++++++++++++++++++++++++++++++++++++++++ conf.py | 2 + git_status.py | 37 ++++++++++++ raw_data/__init__.py | 0 requirements.txt | 1 + 5 files changed, 173 insertions(+) create mode 100644 .gitignore create mode 100644 conf.py create mode 100644 git_status.py create mode 100644 raw_data/__init__.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..0ff3bae8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,133 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ +.idea/ + +.DS_Store +.editorconfig diff --git a/conf.py b/conf.py new file mode 100644 index 00000000..ac75995f --- /dev/null +++ b/conf.py @@ -0,0 +1,2 @@ +import os +PROJECT_ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/git_status.py b/git_status.py new file mode 100644 index 00000000..dafc60e9 --- /dev/null +++ b/git_status.py @@ -0,0 +1,37 @@ +import os +from conf import PROJECT_ROOT_DIR +import re + +@DeprecationWarning +def parse_readme_md(): + file_path = os.path.join(PROJECT_ROOT_DIR, 'README.md') + with open(file_path) as f: + lines = f.readlines()[11:] # skip heading + for line_num in range(len(lines)): + line = lines[line_num] + if line.strip().startswith('#'): + # find a heading + heading = line.strip().replace('#', '').replace('\n', '').strip() + # parse until next # or eof + parsed_list = [] + line_num += 1 + while line_num < len(lines) and not lines[line_num].strip().startswith('#'): + link_line = lines[line_num].replace('\n', '').strip() + print(link_line) + if len(link_line) > 0: + # usually in the format of '- [NAME](link) - comment + split_sections = link_line.split('- ') + if len(split_sections) == 2: + title_and_link = split_sections[1].strip() + title = re.search(r'\[(.*?)\]', title_and_link).group(1) + m_link = re.search(r'\((.*?)\)', title_and_link) + link_str = '' + if m_link is not None: + link_str = m_link.group(1) + + pass + elif len(split_sections) == 3: + pass + + print(split_sections) + line_num += 1 diff --git a/raw_data/__init__.py b/raw_data/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..d78a3a82 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pandas==1.2.1 \ No newline at end of file