diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 189971e..16fda39 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,7 +17,7 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] max-parallel: 1 # Ensures the tests run sequentially - + steps: - uses: actions/checkout@v3 - name: Set up Python diff --git a/examples/sample_data/resume_1.pdf b/examples/sample_data/resume_1.pdf index b914f8e..2ab02a5 100644 Binary files a/examples/sample_data/resume_1.pdf and b/examples/sample_data/resume_1.pdf differ diff --git a/tests/outputs/correct_docx_output.txt b/tests/outputs/correct_docx_output.txt index eae702b..bc79ef2 100644 --- a/tests/outputs/correct_docx_output.txt +++ b/tests/outputs/correct_docx_output.txt @@ -1,16 +1,16 @@ ## Test document -## Here is an example chart: +Here is an example chart: + | Investor Metrics | FY23 Q1 | FY23 Q2 | FY23 Q3 | FY23 Q4 | FY24 Q1 | -|------------------|---------|---------|---------|---------|---------| +|---|---|---|---|---|---| | Office Commercial products and cloud services revenue growth (y/y) | 7% / 13% | 7% / 14% | 13% / 17% | 12% / 14% | 15% / 14% | | Office Consumer products and cloud services revenue growth (y/y) | 7% / 11% | (2)% / 3% | 1% / 4% | 3% / 6% | 3% / 4% | -| Office 365 Commercial seat growth (y/y) | 14% | 12% | 11% | 11% | 10% | +| Office 365 Commercial seat growth (a/o) | 14% | 12% | 11% | 11% | 10% | | Microsoft 365 Consumer subscribers (in millions) | 65.1 | 67.7 | 70.8 | 74.9 | 76.7 | | Dynamics products and cloud services revenue growth (y/y) | 15% / 22% | 13% / 20% | 17% / 21% | 19% / 21% | 22% / 21% | | LinkedIn revenue growth (y/y) | 17% / 21% | 10% / 14% | 8% / 11% | 6% / 8% | 8% | + -Growth rates include non-GAAP CC growth (GAP % / CC %) - -Done. \ No newline at end of file +Growth rates include non-GAAP CC growth (GAAP % / CC %) \ No newline at end of file diff --git a/tests/outputs/correct_pdf_output.txt b/tests/outputs/correct_pdf_output.txt index e02f768..d22407f 100644 --- a/tests/outputs/correct_pdf_output.txt +++ b/tests/outputs/correct_pdf_output.txt @@ -1,137 +1,122 @@ -STOXX INDEX METHODOLOGY GUIDE CONTENTS - -3/529 - -## 7. STOXX BENCHMARK INDICES (BMI) - -| 7.1. STOXX GLOBAL INDICES | 52 | -|---------------------------|-----| -| 7.1.1. OVERVIEW | 52 | -| 7.1.2. INDEX REVIEW | 53 | -| 7.1.3. ONGOING MAINTENANCE | 55 | - -| 7.2 STOXX GLOBAL 1800 AND DERIVED INDICES | 56 | -|-------------------------------------------|-----| -| 7.2.1. OVERVIEW | 56 | -| 7.2.2. INDEX REVIEW | 56 | -| 7.2.3. ONGOING MAINTENANCE | 58 | - -| 7.3 SIZE INDICES BASED ON THE STOXX GLOBAL INDICES | 60 | -|---------------------------------------------------|-----| -| 7.3.1. OVERVIEW | 60 | -| 7.3.2. INDEX REVIEW | 60 | -| 7.3.3. ONGOING MAINTENANCE | 62 | - -| 7.4 SECTOR INDICES BASED ON THE STOXX GLOBAL INDICES | 63 | -|-----------------------------------------------------|-----| -| 7.4.1. OVERVIEW | 63 | -| 7.4.2. INDEX REVIEW | 63 | -| 7.4.3. ONGOING MAINTENANCE | 64 | - -| 7.5 STOXX EUROPE 600 AND EURO STOXX SUPERSECTOR INDICES: 30% / 15% CAPS | 65 | -|------------------------------------------------------------------------|-----| -| 7.5.1. OVERVIEW | 65 | -| 7.5.2. INDEX REVIEW | 65 | -| 7.5.3. ONGOING MAINTENANCE | 66 | - -| 7.6 STOXX REGIONAL REAL ESTATE INDICES: 20% CAPS67 | 67 | -|-----------------------------------------------------|-----| -| 7.6.1. OVERVIEW | 67 | -| 7.6.2. INDEX REVIEW | 67 | -| 7.6.3. ONGOING MAINTENANCE | 67 | - -| 7.7 STOXX EMERGING MARKETS 800 LO | 68 | -|-------------------------------------|-----| -| 7.7.1. OVERVIEW | 68 | -| 7.7.2. INDEX REVIEW | 68 | -| 7.7.3. ONGOING MAINTENANCE | 68 | - -| 7.8 STOXX INDUSTRY AND SUPERSECTOR LEGACY INDICES | 70 | -|---------------------------------------------------|-----| -| 7.8.1. OVERVIEW | 70 | -| 7.8.2. INDEX REVIEW | 71 | -| 7.8.3. ONGOING MAINTENANCE | 71 | - -| 7.9 EURO STOXX SUPERSECTOR 5/10/40 INDICES | 72 | -|---------------------------------------------|-----| -| 7.9.1. OVERVIEW | 72 | -| 7.9.2. INDEX REVIEW | 72 | -| 7.9.3. ONGOING MAINTENANCE | 73 | - -| 7.10 STOXX EUROPE 600 INDUSTRY 30-15 INDICES | 74 | -|----------------------------------------------|-----| -| 7.10.1. OVERVIEW | 74 | -| 7.10.2. INDEX REVIEW | 74 | -| 7.10.3. ONGOING MAINTENANCE | 75 | - -| 7.11. STOXX SEMICONDUCTOR 30 INDEX | 76 | -|-------------------------------------|-----| -| 7.11.1. OVERVIEW | 76 | -| 7.11.2. INDEX REVIEW | 76 | -| 7.11.3. ONGOING MAINTENANCE | 77 | - -## 8. STOXX EQUAL WEIGHT INDICES - -| 8.1. STOXX EQUAL WEIGHT INDICES | 78 | -|--------------------------------|-----| -| 8.1.1. OVERVIEW | 78 | -| 8.1.2. INDEX REVIEW | 78 | -| 8.1.3. ONGOING MAINTENANCE | 78 | - -## 9. STOXX BLUE-CHIP INDICES - -| 9.1 STOXX GLOBAL AND COUNTRY BLUE-CHIP INDICES | 80 | -|------------------------------------------------|-----| -| 9.1.1. OVERVIEW | 80 | -| 9.1.2. INDEX REVIEW | 81 | -| 9.1.3. ONGOING MAINTENANCE | 84 | - -| 9.2 EURO STOXX 50 | 85 | -|-------------------|-----| -| 9.2.1. OVERVIEW | 85 | -| 9.2.2. INDEX REVIEW | 85 | -| 9.2.3. ONGOING MAINTENANCE | 86 | - -| 9.3 STOXX REGIONAL BLUE-CHIP INDICES | 88 | -|-------------------------------------|-----| -| 9.3.1. OVERVIEW | 88 | -| 9.3.2. INDEX REVIEW | 88 | -| 9.3.3. ONGOING MAINTENANCE | 89 | - -| 9.4 STOXX GLOBAL 150 | 91 | -|----------------------|-----| -| 9.4.1. OVERVIEW | 91 | -| 9.4.2. INDEX REVIEW | 91 | -| 9.4.3. ONGOING MAINTENANCE | 91 | - -| 9.5 STOXX BALKAN 50 EQUAL WEIGHT | 92 | -|-----------------------------------|-----| -| 9.5.1. OVERVIEW | 92 | -| 9.5.2. INDEX REVIEW | 92 | -| 9.5.3. ONGOING MAINTENANCE | 93 | - -| 9.6 STOXX CANADA 60 | 94 | -|---------------------|-----| -| 9.6.1. OVERVIEW | 94 | -| 9.6.2. INDEX REVIEW | 94 | -| 9.6.3. ONGOING MAINTENANCE | 95 | - -## 10. STOXX DIVIDEND INDICES - -| 10.1 STOXX SELECT DIVIDEND INDICES | 96 | -|-----------------------------------|-----| -| 10.1.1. OVERVIEW | 96 | -| 10.1.2. INDEX REVIEW | 96 | -| 10.1.3. STOXX SELECT DIVIDEND INDICES | 99 | -| 10.1.4. ONGOING MAINTENANCE | 101 | - -| 10.2 STOXX ASEAN-FIVE SELECT DIVIDEND 50 | 104 | -|---------------------------------------------|-----| -| 10.2.1. OVERVIEW | 104 | -| 10.2.2. INDEX REVIEW | 104 | -| 10.2.3. ONGOING MAINTENANCE | 105 | - -| 10.3 STOXX ASEAN SELECT DIVIDEND 30 | 106 | -|-------------------------------------|-----| - -STOXX logo with text "Part of DEUTSCHE BÖRSE GROUP" \ No newline at end of file +STOXX INDEX METHODOLOGY GUIDE + +## CONTENTS + +6.5.1. OVERVIEW 49 +6.5.2. INDEX REVIEW 49 +6.5.3. ONGOING MAINTENANCE 51 + +7. STOXX BENCHMARK INDICES (BMI) 52 + +7.1. STOXX GLOBAL INDICES 52 +7.1.1. OVERVIEW 52 +7.1.2. INDEX REVIEW 53 +7.1.3. ONGOING MAINTENANCE 55 + +7.2. STOXX GLOBAL 1800 AND DERIVED INDICES 56 +7.2.1. OVERVIEW 56 +7.2.2. INDEX REVIEW 56 +7.2.3. ONGOING MAINTENANCE 58 + +7.3. SIZE INDICES BASED ON THE STOXX GLOBAL INDICES 60 +7.3.1. OVERVIEW 60 +7.3.2. INDEX REVIEW 60 +7.3.3. ONGOING MAINTENANCE 62 + +7.4. SECTOR INDICES BASED ON THE STOXX GLOBAL INDICES 63 +7.4.1. OVERVIEW 63 +7.4.2. INDEX REVIEW 63 +7.4.3. ONGOING MAINTENANCE 64 + +7.5. STOXX EUROPE 600 AND EURO STOXX SUPERSECTOR INDICES: 30% / 15% CAPS 65 +7.5.1. OVERVIEW 65 +7.5.2. INDEX REVIEW 65 +7.5.3. ONGOING MAINTENANCE 66 + +7.6. STOXX REGIONAL REAL ESTATE INDICES: 20% CAPS67 +7.6.1. OVERVIEW 67 +7.6.2. INDEX REVIEW 67 +7.6.3. ONGOING MAINTENANCE 67 + +7.7. STOXX EMERGING MARKETS 800 LO 68 +7.7.1. OVERVIEW 68 +7.7.2. INDEX REVIEW 68 +7.7.3. ONGOING MAINTENANCE 68 + +7.8. STOXX INDUSTRY AND SUPERSECTOR LEGACY INDICES 70 +7.8.1. OVERVIEW 70 +7.8.2. INDEX REVIEW 71 +7.8.3. ONGOING MAINTENANCE 71 + +7.9. EURO STOXX SUPERSECTOR 5/10/40 INDICES 72 +7.9.1. OVERVIEW 72 +7.9.2. INDEX REVIEW 72 +7.9.3. ONGOING MAINTENANCE 73 + +7.10. STOXX EUROPE 600 INDUSTRY 30-15 INDICES 74 +7.10.1. OVERVIEW 74 +7.10.2. INDEX REVIEW 74 +7.10.3. ONGOING MAINTENANCE 75 + +7.11. STOXX SEMICONDUCTOR 30 INDEX 76 +7.11.1. OVERVIEW 76 +7.11.2. INDEX REVIEW 76 +7.11.3. ONGOING MAINTENANCE 77 + +## 8. STOXX EQUAL WEIGHT INDICES 78 + +8.1. STOXX EQUAL WEIGHT INDICES 78 +8.1.1. OVERVIEW 78 +8.1.2. INDEX REVIEW 78 +8.1.3. ONGOING MAINTENANCE 78 + +## 9. STOXX BLUE-CHIP INDICES 80 + +9.1. STOXX GLOBAL AND COUNTRY BLUE-CHIP INDICES 80 +9.1.1. OVERVIEW 80 +9.1.2. INDEX REVIEW 81 +9.1.3. ONGOING MAINTENANCE 84 + +9.2. EURO STOXX 50 85 +9.2.1. OVERVIEW 85 +9.2.2. INDEX REVIEW 85 +9.2.3. ONGOING MAINTENANCE 86 + +9.3. STOXX REGIONAL BLUE-CHIP INDICES 88 +9.3.1. OVERVIEW 88 +9.3.2. INDEX REVIEW 88 +9.3.3. ONGOING MAINTENANCE 89 + +9.4. STOXX GLOBAL 150 91 +9.4.1. OVERVIEW 91 +9.4.2. INDEX REVIEW 91 +9.4.3. ONGOING MAINTENANCE 91 + +9.5. STOXX BALKAN 50 EQUAL WEIGHT 92 +9.5.1. OVERVIEW 92 +9.5.2. INDEX REVIEW 92 +9.5.3. ONGOING MAINTENANCE 93 + +9.6. STOXX CANADA 60 94 +9.6.1. OVERVIEW 94 +9.6.2. INDEX REVIEW 94 +9.6.3. ONGOING MAINTENANCE 95 + +## 10. STOXX DIVIDEND INDICES 96 + +10.1. STOXX SELECT DIVIDEND INDICES 96 +10.1.1. OVERVIEW 96 +10.1.2. INDEX REVIEW 96 +10.1.3. STOXX SELECT DIVIDEND INDICES 99 +10.1.4. ONGOING MAINTENANCE 101 + +10.2. STOXX ASEAN-FIVE SELECT DIVIDEND 50 104 +10.2.1. OVERVIEW 104 +10.2.2. INDEX REVIEW 104 +10.2.3. ONGOING MAINTENANCE 105 + +10.3. STOXX ASEAN SELECT DIVIDEND 30 106 + + 3/529 + + Part of DEUTSCHE BÖRSE GROUP \ No newline at end of file diff --git a/tests/outputs/correct_png_output.txt b/tests/outputs/correct_png_output.txt index 43be0fb..1bf67d6 100644 --- a/tests/outputs/correct_png_output.txt +++ b/tests/outputs/correct_png_output.txt @@ -5,6 +5,4 @@ | Office 365 Commercial seat growth (y/y) | 14% | 12% | 11% | 11% | 10% | | Microsoft 365 Consumer subscribers (in millions) | 65.1 | 67.7 | 70.8 | 74.9 | 76.7 | | Dynamics products and cloud services revenue growth (y/y) | 15% / 22% | 13% / 20% | 17% / 21% | 19% / 21% | 22% / 21% | -| LinkedIn revenue growth (y/y) | 17% / 21% | 10% / 14% | 8% / 11% | 6% / 8% | 8% | - -Growth rates include non-GAAP CC growth (GAAP % / CC %). \ No newline at end of file +| LinkedIn revenue growth (y/y) | 17% / 21% | 10% / 14% | 8% / 11% | 6% / 8% | 8% | \ No newline at end of file diff --git a/tests/outputs/correct_pptx_output.txt b/tests/outputs/correct_pptx_output.txt index 8dd5c22..47f3aa5 100644 --- a/tests/outputs/correct_pptx_output.txt +++ b/tests/outputs/correct_pptx_output.txt @@ -3,14 +3,16 @@ • Chart 1 example + | Investor Metrics | FY23 Q1 | FY23 Q2 | FY23 Q3 | FY23 Q4 | FY24 Q1 | -|-----------------|---------|---------|---------|---------|---------| +|---|---|---|---|---|---| | Office Commercial products and cloud services revenue growth (y/y) | 7% / 13% | 7% / 14% | 13% / 17% | 12% / 14% | 15% / 14% | | Office Consumer products and cloud services revenue growth (y/y) | 7% / 11% | (2)% / 3% | 1% / 4% | 3% / 6% | 3% / 4% | | Office 365 Commercial seat growth (y/y) | 14% | 12% | 11% | 11% | 10% | | Microsoft 365 Consumer subscribers (in millions) | 65.1 | 67.7 | 70.8 | 74.9 | 76.7 | | Dynamics products and cloud services revenue growth (y/y) | 15% / 22% | 13% / 20% | 17% / 21% | 19% / 21% | 22% / 21% | | LinkedIn revenue growth (y/y) | 17% / 21% | 10% / 14% | 8% / 11% | 6% / 8% | 8% | + Growth rates include non-GAAP CC growth (GAAP % / CC %). -## Thanks \ No newline at end of file +Thanks \ No newline at end of file diff --git a/tests/test.py b/tests/test.py index fa28b79..f43cd91 100755 --- a/tests/test.py +++ b/tests/test.py @@ -17,7 +17,6 @@ from any_parser import AnyParser # noqa: E402 -# helper functions def get_ground_truth(file_path: str) -> str: """Get the ground truth from the file.""" with open(file_path, "r", encoding="utf-8") as file: @@ -54,7 +53,6 @@ def test_pdf_sync_parse(self): # extract markdown_list, elapsed_time = self.ap.parse(file_path=working_file) markdown = "\n".join(markdown_list) - self.assertFalse(markdown.startswith("Error:"), markdown) correct_output = get_ground_truth(correct_output_file) percentage = compare_markdown(markdown, correct_output)