Skip to content

Commit

Permalink
refactor package / switch to version releases
Browse files Browse the repository at this point in the history
  • Loading branch information
jwfraustro committed Dec 6, 2023
1 parent 095b570 commit 12b6f23
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

name: Upload Python Package

on: [push]
on:
push:
tags:
- "v*"

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion tests/generics_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Tests for generic VO xml models"""
from unittest import TestCase

from vo.models.xml.generics import VODateTime
from vo_models.xml.generics import VODateTime


class TestVODatetimeModel(TestCase):
Expand Down
6 changes: 3 additions & 3 deletions tests/uws/models_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from lxml import etree

from vo.models.xml.generics import VODateTime
from vo.models.xml.uws import (
from vo_models.xml.generics import VODateTime
from vo_models.xml.uws import (
ErrorSummary,
Jobs,
JobSummary,
Expand All @@ -17,7 +17,7 @@
Results,
ShortJobDescription,
)
from vo.models.xml.uws.types import ExecutionPhase
from vo_models.xml.uws.types import ExecutionPhase

UWS_NAMESPACE_HEADER = """xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
Expand Down
Empty file removed vo/models/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Contains pydantic-xml models for UWS request / response serialization.
IVOA UWS Spec: https://www.ivoa.net/documents/UWS/20161024/REC-UWS-1.1-20161024.html
"""
from vo.models.xml.uws.models import (
from vo_models.xml.uws.models import (
ErrorSummary,
Job,
Jobs,
Expand Down
9 changes: 5 additions & 4 deletions vo/models/xml/uws/models.py → vo_models/xml/uws/models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""UWS Job Schema using Pydantic-XML models"""
from typing import Dict, Generic, Optional, Type, TypeVar, Union
from typing import Dict, Generic, Optional, TypeVar

from pydantic import field_validator
from pydantic_xml import BaseXmlModel, attr, element

from vo.models.xml.generics import VODateTime
from vo.models.xml.uws.types import ErrorType, ExecutionPhase, UWSVersion
from vo.models.xml.xlink import XlinkType
from vo_models.xml.generics import VODateTime
from vo_models.xml.uws.types import ErrorType, ExecutionPhase, UWSVersion
from vo_models.xml.xlink import XlinkType

NSMAP = {
"uws": "http://www.ivoa.net/xml/UWS/v1.0",
Expand All @@ -15,6 +15,7 @@
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
}

# pylint: disable=invalid-name
ParametersType = TypeVar("ParametersType")

class Parameter(BaseXmlModel, tag="parameter", ns="uws", nsmap=NSMAP):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
See: https://www.w3.org/TR/xlink11/
Note: Only implements the simple type TypeValue, used in UWS Job models."""
from vo.models.xml.xlink.xlink import XlinkType
from vo_models.xml.xlink.xlink import XlinkType
File renamed without changes.

0 comments on commit 12b6f23

Please sign in to comment.