diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2a2d4b0..f87cd7a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,24 +1,24 @@ -// Adopting the default GitHub codespaces-jupyter template as starter -// https://github.com/github/codespaces-jupyter - +// Created from a template: https://github.com/github/codespaces-jupyter { - "name" : "Sec Parser", - "image": "mcr.microsoft.com/devcontainers/universal:2", - "hostRequirements": { - "cpus": 4 + "name": "sec-parser", + "image": "mcr.microsoft.com/devcontainers/universal:2", + "hostRequirements": { + "cpus": 2 + }, + "waitFor": "onCreateCommand", + "updateContentCommand": "python3 -m pip install -r .devcontainer/requirements.txt", + "postCreateCommand": "", + "customizations": { + "codespaces": { + "openFiles": [ + "./.devcontainer/example.py" + ] }, - "waitFor": "onCreateCommand", - "updateContentCommand": "python3 -m pip install -r .devcontainer/requirements.txt", - "postCreateCommand": "", - "customizations": { - "codespaces": { - "openFiles": ["./docs/source/notebooks/user_guide.ipynb"] - }, - "vscode": { - "extensions": [ - "ms-toolsai.jupyter", - "ms-python.python" - ] - } + "vscode": { + "extensions": [ + "ms-toolsai.jupyter", + "ms-python.python" + ] } + } } \ No newline at end of file diff --git a/example.py b/.devcontainer/example.py similarity index 58% rename from example.py rename to .devcontainer/example.py index ae91bc3..e1de144 100644 --- a/example.py +++ b/.devcontainer/example.py @@ -11,4 +11,10 @@ # Now, we can parse the filing HTML into a list of semantic elements: elements: list = sp.Edgar10QParser().parse(html) -print(elements[0]) +# Let's print the first 5 elements: +for element in elements[:5]: + element_type = element.__class__.__name__ + element_text = element.text + print(f"Element Type: {element_type}") + print(f"Text Content: {element_text}") + print("-" * 40) # Separator for readability diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index c637a5b..1d606d0 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -1,3 +1,3 @@ ipywidgets==7.7.1 sec-parser -sec_downloader \ No newline at end of file +sec-downloader