Skip to content

Commit

Permalink
Merge pull request #7 from renalreg/next
Browse files Browse the repository at this point in the history
Replace next with master
  • Loading branch information
jtc42 authored Oct 28, 2021
2 parents 9500a12 + 002a23a commit 8b21fa2
Show file tree
Hide file tree
Showing 94 changed files with 1,039 additions and 280 deletions.
146 changes: 141 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,141 @@
*.pyc
*.pyo
*.wxs
test.log
/build/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv*
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# IDE files
.vscode/

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ PyXB includes patches from the following Contributors:

Michael van der Westhuizen
Jon Foster
Eurofins Digital Testing (https://www.eurofins-digitaltesting.com/)

For details on these patches see the git software configuration logs.

Expand Down
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# PyXB Extended -- Python W3C XML Schema Bindings

What is this fork for?:

Essentially the exact same reasoning as Jon discusses below, but with the intention of having a PyPI-published copy available.

## Installation

`pip install PyXB-X`

## Developer notes

### Python 3.8 testing failures

Currently, `python setup.py test` fails on Python 3.8+. This is a false failure caused by changes to the `toxml` method (https://docs.python.org/3/library/xml.dom.minidom.html#xml.dom.minidom.Node.toxml).

In Python 3.8+ `toxml` preserves the original element order, which the current tests do not assume. Since < 3.8 produces a slightly different, but equally valid output, we can't easily just change the unit tests to match.

This is something I'll work on sorting out soon.


---

Jon Foster (upstream) PyXB README follows:

What is this fork for?:

At work, I use a few closed-source tools that use PyXB - some of which I maintain. This repository has the necessary patches to make PyXB work for me.

I don't have the time, inclination or the knowledge of PyXB's internals to be a proper open-source maintainer for PyXB. This fork is just getting bugfixes as I need them. I will accept small pull requests that fix bugs, but not anything big or risky or hard-to-test. I have no interest in doing formal public releases or submitting this to PyPy.

My experience is that PyXB is very complex and seriously lacking documentation, and does not have a stable API, but it can be made to work with some trial-and-error. The concept is great, and it works, and I'm not aware of anything better (though I haven't looked for a couple of years).

**-- Jon Foster**

Original (upstream) PyXB README follows:

The source releases includes pre-built bundles for common XML namespaces,
assorted web service namespaces, and SAML. A bundle with over 75 namespaces
related to Geographic Information Systems is also available; if you want
those, read pyxb/bundles/opengis/README.txt before installing PyXB.

Installation: python setup.py install

Documentation: doc/html or https://pabigot.github.io/pyxb/

Help Forum: http://sourceforge.net/forum/forum.php?forum_id=956708

Mailing list: https://lists.sourceforge.net/lists/listinfo/pyxb-users
Archive: http://www.mail-archive.com/[email protected]

Bug reports: https://github.com/pabigot/pyxb/issues
18 changes: 0 additions & 18 deletions README.txt

This file was deleted.

18 changes: 0 additions & 18 deletions README.txt.in

This file was deleted.

Empty file modified doc/Images/BindingModel.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/CTDValidationExceptions.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/ComponentModel.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/ContentModel.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/FACAutomaton.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/Namespace.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/NamespaceArchive.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/NamespaceCore.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/RuntimeExceptions.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/Images/ScopedDeclarations.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# General information about the project.
project = 'PyXB'
copyright = '2009-2017, Peter A. Bigot'
copyright = '2009-2021, Peter A. Bigot'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
Empty file modified doc/pyxb.eap
100755 → 100644
Empty file.
Empty file modified editix-pyxb.pre
100755 → 100644
Empty file.
2 changes: 2 additions & 0 deletions examples/cablelabs/disabled-test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

rm -f cablelabs.wxs
sh genbindings.sh \
&& python demo.py
2 changes: 2 additions & 0 deletions examples/cablelabs/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

# Note: Module order is in increasing dependency order so schema are
# downloaded and saved only once.
[ -f cablelabs.wxs ] \
Expand Down
2 changes: 2 additions & 0 deletions examples/dictionary/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

URI='http://services.aonaware.com/DictService/DictService.asmx?WSDL'
PREFIX='dict'
WSDL="${PREFIX}.wsdl"
Expand Down
2 changes: 2 additions & 0 deletions examples/geocoder/disabled-test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#! /bin/sh

sh genbindings.sh \
&& python client.py
2 changes: 2 additions & 0 deletions examples/geocoder/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

GEO_WSDL_URI='http://geocoder.us/dist/eg/clients/GeoCoder.wsdl'
GEO_PREFIX=GeoCoder
GEO_WSDL="${GEO_PREFIX}.wsdl"
Expand Down
2 changes: 2 additions & 0 deletions examples/kml/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

PYTHONPATH=../..
export PYTHONPATH

Expand Down
2 changes: 2 additions & 0 deletions examples/manual/demo.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

rm -f *.wxs po?.py *.pyc
sh demo1.sh \
&& python demo1.py > demo1.out \
Expand Down
2 changes: 2 additions & 0 deletions examples/manual/demo1.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#! /bin/sh

pyxbgen \
-u po1.xsd -m po1
2 changes: 2 additions & 0 deletions examples/manual/demo2.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#! /bin/sh

pyxbgen \
-u po2.xsd -m po2
2 changes: 2 additions & 0 deletions examples/manual/demo3a.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#! /bin/sh

pyxbgen \
-u po3.xsd -m po3
2 changes: 2 additions & 0 deletions examples/manual/demo3b.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

pyxbgen \
-u po3.xsd -m po3 \
-u nsaddress.xsd -m address
2 changes: 2 additions & 0 deletions examples/manual/demo3c1.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

pyxbgen \
-u nsaddress.xsd -m address \
--archive-to-file address.wxs
2 changes: 2 additions & 0 deletions examples/manual/demo3c2.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

pyxbgen \
-u po3.xsd -m po3 \
--archive-path .:+
2 changes: 2 additions & 0 deletions examples/manual/demo4.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

pyxbgen \
-u po4.xsd -m po4 \
--archive-path=.:+
Expand Down
2 changes: 2 additions & 0 deletions examples/manual/demo4b.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

pyxbgen \
-u po3.xsd -m po3 \
--archive-path .:+
4 changes: 2 additions & 2 deletions examples/ndfd/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pyxb.binding.datatypes as xsd
from pyxb.utils.six.moves.urllib.request import urlopen
import time
import collections
import collections.abc
import sys

# Get the next seven days forecast for two locations
Expand All @@ -32,7 +32,7 @@
source = r.head.source
print(", ".join(source.production_center.content()))
data = r.data
if isinstance(data, collections.MutableSequence):
if isinstance(data, collections.abc.MutableSequence):
data = data.pop(0)
print(data)

Expand Down
2 changes: 2 additions & 0 deletions examples/ndfd/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

URI='http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd'
PREFIX='DWML'

Expand Down
2 changes: 2 additions & 0 deletions examples/tmsxtvd/disabled-test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#! /bin/sh

sh genbindings.sh
python dumpsample.py
2 changes: 2 additions & 0 deletions examples/tmsxtvd/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

URI='http://docs.tms.tribune.com/tech/xml/schemas/tmsxtvd.xsd'
PREFIX='tmstvd'

Expand Down
2 changes: 2 additions & 0 deletions examples/weather/disabled-test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#! /bin/sh

sh genbindings.sh \
&& python client_get.py
2 changes: 2 additions & 0 deletions examples/weather/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

WSDL_URI='http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl'
WSDL_URI='http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL'
wget -O weather.wsdl "${WSDL_URI}"
Expand Down
2 changes: 2 additions & 0 deletions examples/xsdprimer/genbindings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

PYTHONPATH=../..
export PYTHONPATH
rm -rf raw
Expand Down
2 changes: 2 additions & 0 deletions maintainer/bundlesupport.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

# This module is sourced by genbind scripts in bundle directories to
# initialize a bundle area and provide a function to translate schema.

Expand Down
Loading

0 comments on commit 8b21fa2

Please sign in to comment.