Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .coverage
Binary file not shown.
1 change: 0 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,3 @@ jobs:

- name: Run mypy
run: mypy json2xml tests

1 change: 0 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,3 @@ v3.0.0 / 2019-02-26
* Cleanup Readme.md
* Update issue templates
* fix vulnerabilities in requests

1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,3 @@ dist: clean ## builds source and wheel package

install: clean ## install the package to the active Python's site-packages
python setup.py install

7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ However, you can change this behavior using the item_wrap property like this:
from json2xml import json2xml
from json2xml.utils import readfromurl, readfromstring, readfromjson

data = readfromstring('{"my_items":[{"my_item":{"id":1} },{"my_item":{"id":2} }],"my_str_items":["a","b"]}')
data = readfromstring(
'{"my_items":[{"my_item":{"id":1} },{"my_item":{"id":2} }],"my_str_items":["a","b"]}'
)
print(json2xml.Json2xml(data, item_wrap=False).to_xml())

Outputs this:
Expand Down Expand Up @@ -201,7 +203,7 @@ This project uses modern Python development practices. Here's how to set up a de
# Create and activate virtual environment (using uv - recommended)
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate

# Install dependencies
uv pip install -r requirements-dev.txt
uv pip install -e .
Expand Down Expand Up @@ -241,4 +243,3 @@ Help and Support to maintain this project
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- You can sponsor my work for this plugin here: https://github.com/sponsors/vinitkumar/

16 changes: 12 additions & 4 deletions dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,18 @@ def main() -> None:
success &= run_command(["ruff", "check", "json2xml", "tests"], "Linting")

if command in ("test", "all"):
success &= run_command([
"pytest", "--cov=json2xml", "--cov-report=term",
"-xvs", "tests", "-n", "auto"
], "Tests")
success &= run_command(
[
"pytest",
"--cov=json2xml",
"--cov-report=term",
"-xvs",
"tests",
"-n",
"auto",
],
"Tests",
)

if command in ("typecheck", "all"):
success &= run_command(["mypy", "json2xml", "tests"], "Type checking")
Expand Down
55 changes: 23 additions & 32 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import os
import sys

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))

import json2xml

Expand All @@ -35,23 +35,23 @@

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'json2xml'
copyright = f'{year}, Vinit Kumar'
project = "json2xml"
copyright = f"{year}, Vinit Kumar"
author = "Vinit Kumar"

# The version info for the project you're documenting, acts as replacement
Expand All @@ -73,10 +73,10 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -87,7 +87,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'furo'
html_theme = "furo"

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand All @@ -98,13 +98,13 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]


# -- Options for HTMLHelp output ---------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'json2xmldoc'
htmlhelp_basename = "json2xmldoc"


# -- Options for LaTeX output ------------------------------------------
Expand All @@ -113,15 +113,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -131,21 +128,15 @@
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [
(master_doc, 'json2xml.tex',
'json2xml Documentation',
'Vinit Kumar', 'manual'),
(master_doc, "json2xml.tex", "json2xml Documentation", "Vinit Kumar", "manual"),
]


# -- Options for manual page output ------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'json2xml',
'json2xml Documentation',
[author], 1)
]
man_pages = [(master_doc, "json2xml", "json2xml Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------
Expand All @@ -154,13 +145,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'json2xml',
'json2xml Documentation',
author,
'json2xml',
'One line description of project.',
'Miscellaneous'),
(
master_doc,
"json2xml",
"json2xml Documentation",
author,
"json2xml",
"One line description of project.",
"Miscellaneous",
),
]



2 changes: 1 addition & 1 deletion examples/bigexample.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@
"entity_status": "",
"art_unit": ""
}
]
]
4 changes: 2 additions & 2 deletions examples/wrongjson.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,5 +368,5 @@
}
}
]


1 change: 0 additions & 1 deletion json2xml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
__author__ = """Vinit Kumar"""
__email__ = "[email protected]"
__version__ = "5.2.1"

Loading
Loading