Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1416ee1
Added get test data function
glow-mdsol Mar 30, 2022
fbf3440
re-order classess so resolution works
glow-mdsol Mar 30, 2022
29b093a
Renamed classes so TestFinder doesn't see them
glow-mdsol Apr 5, 2022
63f6837
Added routines to help find data/fixture files
glow-mdsol Apr 5, 2022
a4a4b67
Added missing XSD document for fixtures
glow-mdsol Apr 5, 2022
c44e4ce
Added Dev Requirements Files
glow-mdsol Apr 5, 2022
baaa301
Added some typings
glow-mdsol Apr 5, 2022
674042b
Refactor test models
glow-mdsol Apr 5, 2022
f8883b8
Use helpers, still missing a file
glow-mdsol Apr 5, 2022
4af5b3b
Initial pass of the ci pipeline
glow-mdsol Apr 5, 2022
54b1601
Prob need to generate these
glow-mdsol Apr 5, 2022
34a7494
Merge remote-tracking branch 'upstream/master' into feature/add_gh_ac…
glow-mdsol Apr 5, 2022
883665c
Added tox
glow-mdsol Jun 2, 2022
519720e
Updates prior to moving to personal machine
glow-mdsol Jun 2, 2022
4b7c63c
Avoid mutable args
glow-mdsol Jul 20, 2022
f734e4f
Added TOX
glow-mdsol Jul 22, 2022
5493e76
Move the version decl into the module
glow-mdsol Jul 22, 2022
ffcefbc
Fixtures
glow-mdsol Jul 22, 2022
eece9c3
Reformatting
glow-mdsol Jul 22, 2022
f7c1bdf
Avoid mutable args
glow-mdsol Jul 22, 2022
0f8299b
remove duplication
glow-mdsol Jul 22, 2022
18e5ea3
Clash of class and import
glow-mdsol Jul 22, 2022
251ee84
Unused import, flake8 fixes
glow-mdsol Jul 22, 2022
5f2aaea
flake8 fixes
glow-mdsol Jul 22, 2022
cc9846b
flake8 fixes
glow-mdsol Jul 22, 2022
469a0cf
no mutable args
glow-mdsol Jul 22, 2022
c709ce6
Added flake8 configuration
glow-mdsol Jul 22, 2022
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
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
exclude = .git,__pycache__, docs/source/conf.py, old, build, dist, tests
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Python Package

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ venv/
docs/build/
odmlib/build/
dist/
.tox/
.idea/
2 changes: 1 addition & 1 deletion odmlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.2"
__version__ = "0.1.5"
24 changes: 18 additions & 6 deletions odmlib/ct_1_1_1/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import odmlib.ns_registry as NS


NS.NamespaceRegistry(prefix="odm", uri="http://www.cdisc.org/ns/odm/v1.3", is_default=True)
NS.NamespaceRegistry(
prefix="odm", uri="http://www.cdisc.org/ns/odm/v1.3", is_default=True
)
NS.NamespaceRegistry(prefix="nciodm", uri="http://ncicb.nci.nih.gov/xml/odm/EVS/CDISC")
NS.NamespaceRegistry(prefix="xs", uri="http://www.w3.org/2001/XMLSchema-instance")
NS.NamespaceRegistry(prefix="xml", uri="http://www.w3.org/XML/1998/namespace")
Expand Down Expand Up @@ -62,8 +64,12 @@ class EnumeratedItem(OE.ODMElement):
CodedValue = T.String(required=True)
ExtCodeID = T.String(required=True, namespace="nciodm")
CDISCSynonym = T.ODMListObject(element_class=CDISCSynonym, namespace="nciodm")
CDISCDefinition = T.ODMObject(required=True, element_class=CDISCDefinition, namespace="nciodm")
PreferredTerm = T.ODMObject(required=True, element_class=PreferredTerm, namespace="nciodm")
CDISCDefinition = T.ODMObject(
required=True, element_class=CDISCDefinition, namespace="nciodm"
)
PreferredTerm = T.ODMObject(
required=True, element_class=PreferredTerm, namespace="nciodm"
)


class CodeList(OE.ODMElement):
Expand All @@ -74,9 +80,15 @@ class CodeList(OE.ODMElement):
CodeListExtensible = T.ValueSetString(required=True, namespace="nciodm")
Description = T.ODMObject(element_class=Description)
EnumeratedItem = T.ODMListObject(element_class=EnumeratedItem)
CDISCSubmissionValue = T.ODMObject(required=True, element_class=CDISCSubmissionValue, namespace="nciodm")
CDISCSynonym = T.ODMObject(required=True, element_class=CDISCSynonym, namespace="nciodm")
PreferredTerm = T.ODMObject(required=True, element_class=PreferredTerm, namespace="nciodm")
CDISCSubmissionValue = T.ODMObject(
required=True, element_class=CDISCSubmissionValue, namespace="nciodm"
)
CDISCSynonym = T.ODMObject(
required=True, element_class=CDISCSynonym, namespace="nciodm"
)
PreferredTerm = T.ODMObject(
required=True, element_class=PreferredTerm, namespace="nciodm"
)


class MetaDataVersion(OE.ODMElement):
Expand Down
9 changes: 6 additions & 3 deletions odmlib/dataset_1_0_1/model.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import odmlib.odm_1_3_2.model as ODM
import odmlib.odm_element as OE
import odmlib.typed as T
import odmlib.ns_registry as NS


NS.NamespaceRegistry(prefix="odm", uri="http://www.cdisc.org/ns/odm/v1.3", is_default=True)
NS.NamespaceRegistry(
prefix="odm", uri="http://www.cdisc.org/ns/odm/v1.3", is_default=True
)
NS.NamespaceRegistry(prefix="xs", uri="http://www.w3.org/2001/XMLSchema-instance")
NS.NamespaceRegistry(prefix="xml", uri="http://www.w3.org/XML/1998/namespace")
NS.NamespaceRegistry(prefix="data", uri="http://www.cdisc.org/ns/Dataset-XML/v1.0")
Expand Down Expand Up @@ -50,7 +51,9 @@ class ODM(OE.ODMElement):
PriorFileOID = T.OIDRef(required=False)
AsOfDateTime = T.DateTimeString(required=False)
ODMVersion = T.ValueSetString(required=False)
DatasetXMLVersion = T.ExtendedValidValues(required=True, valid_values=["1.0.0", "1.0.1"])
DatasetXMLVersion = T.ExtendedValidValues(
required=True, valid_values=["1.0.0", "1.0.1"]
)
Originator = T.String(required=False)
SourceSystem = T.String(required=False)
SourceSystemVersion = T.String(required=False)
Expand Down
8 changes: 6 additions & 2 deletions odmlib/define_2_0/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ class ItemRef(ODM.ItemRef):
MethodOID = ODM.ItemRef.MethodOID
Role = ODM.ItemRef.Role
RoleCodeListOID = ODM.ItemRef.RoleCodeListOID
WhereClauseRef = T.ODMListObject(required=True, element_class=WhereClauseRef, namespace="def")
WhereClauseRef = T.ODMListObject(
required=True, element_class=WhereClauseRef, namespace="def"
)


class title(OE.ODMElement):
Expand Down Expand Up @@ -213,7 +215,9 @@ class AnnotatedCRF(OE.ODMElement):

class SupplementalDoc(OE.ODMElement):
namespace = "def"
DocumentRef = T.ODMListObject(required=True, element_class=DocumentRef, namespace="def")
DocumentRef = T.ODMListObject(
required=True, element_class=DocumentRef, namespace="def"
)


class WhereClauseDef(OE.ODMElement):
Expand Down
Loading