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 6763ede
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
@@ -1,4 +1,4 @@
21.x (2021-xx-xx)
21.8 (2021-08-03)
-----------------

- Initial Release
5 changes: 4 additions & 1 deletion MANIFEST.in
@@ -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
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
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
8 changes: 5 additions & 3 deletions docs/installation.rst
Expand Up @@ -8,14 +8,16 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
@@ -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
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
@@ -0,0 +1 @@
__version__ = "21.8"

0 comments on commit 6763ede

Please sign in to comment.