Skip to content

Commit

Permalink
feat: csv support for conversion to json
Browse files Browse the repository at this point in the history
Adds support for converting csv to json
  • Loading branch information
shoshta73 authored Dec 11, 2024
2 parents 242119d + 9868369 commit b542c7c
Show file tree
Hide file tree
Showing 53 changed files with 75,386 additions and 267 deletions.
71 changes: 63 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ jobs:
source ./venv/bin/activate
pip install -r dev.requirements
pip install -r requirements.txt
pip install .
- name: Run tests
run: |
source ./venv/bin/activate
pytest
pytest -vv
test-3-10:
needs: test-3-9
Expand All @@ -82,12 +81,11 @@ jobs:
source ./venv/bin/activate
pip install -r dev.requirements
pip install -r requirements.txt
pip install .
- name: Run tests
run: |
source ./venv/bin/activate
pytest
pytest -vv
test-3-11:
needs: test-3-10
Expand All @@ -113,12 +111,11 @@ jobs:
source ./venv/bin/activate
pip install -r dev.requirements
pip install -r requirements.txt
pip install .
- name: Run tests
run: |
source ./venv/bin/activate
pytest
pytest -vv
test-3-12:
needs: test-3-11
Expand All @@ -144,12 +141,41 @@ jobs:
source ./venv/bin/activate
pip install -r dev.requirements
pip install -r requirements.txt
pip install .
- name: Run tests
run: |
source ./venv/bin/activate
pytest
pytest -vv
test-3-13:
needs: test-3-12

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v3
with:
python-version: "3.13"
- name: Setup Venv
run: |
python -m venv ./venv
- name: Install packages
run: |
source ./venv/bin/activate
pip install -r dev.requirements
pip install -r requirements.txt
- name: Run tests
run: |
source ./venv/bin/activate
pytest -vv
pip-install-3-9:
needs: test-3-9
Expand Down Expand Up @@ -264,3 +290,32 @@ jobs:
run: python3 -m build
- name: Install
run: python3 -m pip install .

pip-install-3-13:
needs:
- test-3-13
- pip-install-3-12

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v3
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev.requirements
- name: Install build deps
run: python3 -m pip install --upgrade build
- name: Build
run: python3 -m build
- name: Install
run: python3 -m pip install .
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,5 @@ pyrightconfig.json
.debugpy

# docs build directory
book
book
docs/LICENSE
5 changes: 5 additions & 0 deletions data/example.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name,age,text_editor
John,30,Sublime Text
Jane,25,Visual Studio Code
Michael,35,Neovim
Noah,40,Atom
18 changes: 18 additions & 0 deletions data/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"John": {
"age": "30",
"text_editor": "Sublime Text"
},
"Jane": {
"age": "25",
"text_editor": "Visual Studio Code"
},
"Michael": {
"age": "35",
"text_editor": "Neovim"
},
"Noah": {
"age": "40",
"text_editor": "Atom"
}
}
22 changes: 22 additions & 0 deletions data/example_invalid_for_csv_conversion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"John": {
"age": "30",
"text_editor": "Sublime Text",
"invalid_key": "invalid_value"
},
"Jane": {
"age": "25",
"text_editor": "Visual Studio Code",
"place_of_birth": "New York"
},
"Michael": {
"age": "35",
"text_editor": "Neovim",
"job": "Software Engineer"
},
"Noah": {
"age": "40",
"text_editor": "Atom",
"favorite_color": "Blue"
}
}
21 changes: 21 additions & 0 deletions data/really_large.csv

Large diffs are not rendered by default.

Loading

0 comments on commit b542c7c

Please sign in to comment.