Skip to content

Commit

Permalink
Update tox recipes and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tefra committed Aug 3, 2021
1 parent 10d7188 commit c084ae0
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
21.x (2021-xx-xx)
21.8 (2021-08-03)
-----------------

- Initial Release
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
include LICENSE README.rst LICENSE tox.ini
include LICENSE README.rst CHANGES.rst tox.ini
recursive-include docs *
recursive-include tests *
recursive-include xsdata_attrs *

prune docs/_build
exclude .readthedocs.yml
exclude .pre-commit-config.yaml

global-exclude .DS_Store *.pyc
24 changes: 24 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@ Generate Models
Generating package: init
Generating package: generated.rss
.. code-block:: python
...
@attr.s
class Rss:
class Meta:
name = "rss"
version: Optional[float] = attr.ib(
default=None,
metadata={
"type": "Attribute",
}
)
channel: Optional[Channel] = attr.ib(
default=None,
metadata={
"type": "Element",
}
)
...
XML Parsing
===========
Expand Down
11 changes: 6 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
import os
import sys
from importlib import metadata

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

project = "xsdata-attrs"
copyright = "2021, Christodoulos Tsoulloftas"
author = "Christodoulos Tsoulloftas"

# The full version, including alpha/beta/rc tags
release = "21.7"
version = release = metadata.version("xsdata-attrs")


# -- General configuration ---------------------------------------------------
Expand Down
10 changes: 6 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ The recommended method is to use a virtual environment.

.. code-block:: console
$ pip install xsdata-attrs[cli]
$ pip install xsdata-attrs[cli,lxml,soap]
.. hint::

- Install the cli requirements for the code generator
- Install the soap requirements for the builtin wsdl client
- Install lxml if you want to use one of the lxml handlers/writers instead of
the builtin python xml implementations.

In order to use the latest updates you can also
install directly from the git repo.
In order to use the latest updates you can also install directly from the git repo.

.. code-block:: console
$ pip install git+https://github.com/tefra/xsdata-attrs@master#egg=xsdata[cli]
$ pip install git+https://github.com/tefra/xsdata-attrs@master#egg=xsdata-attrs[cli]
Install using conda
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = xsdata_attrs
version = 21.8
version = attr: xsdata_attrs.__version__
description = xsdata attrs plugin
long_description = file: README.rst
long_description_content_type = text/x-rst
Expand Down
38 changes: 38 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,41 @@ skip_missing_interpreters = true
[testenv]
extras = test,cli
commands = pytest {posargs}

[testenv:docs]
basepython = python3.8
extras = docs,cli
changedir = docs
commands =
sphinx-build -b html . _build

[testenv:build]
basepython = python3
skip_install = true
deps =
wheel
setuptools
twine
whitelist_externals = rm
commands =
rm -fr dist
python setup.py bdist_wheel sdist
twine check dist/*

[testenv:release]
basepython = python3
skip_install = true
deps = {[testenv:build]deps}
commands_pre =
{[testenv:build]commands}
commands =
twine upload --skip-existing dist/*

[testenv:testrelease]
basepython = python3
skip_install = true
deps = {[testenv:build]deps}
commands_pre =
{[testenv:build]commands}
commands =
twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*
1 change: 1 addition & 0 deletions xsdata_attrs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "21.8"

0 comments on commit c084ae0

Please sign in to comment.