Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for python #4

Merged
merged 8 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo check
run: cargo check -p taxel-xml -p taxel-util
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo clippy
run: cargo clippy --all-features --all-targets -p taxel-xml -p taxel-util -- -D warnings
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo doc
run: cargo doc --no-deps --all-features -p taxel-xml -p taxel-util
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo fmt --check
run: cargo fmt --check
fmt-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: cargo +nightly fmt --check
run: cargo +nightly fmt --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo test --lib -p taxel-xml -p taxel-util
run: cargo test --lib -p taxel-xml -p taxel-util
doc-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo test --doc
run: cargo test --locked --doc -p taxel-xml -p taxel-util
test-py:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
run: pip install poetry
working-directory: taxel-py
- name: Install dependencies
run: |
poetry lock
poetry install --with dev --no-interaction --no-ansi
working-directory: taxel-py
- name: Run tests
run: poetry run pytest -v -m unit
working-directory: taxel-py
59 changes: 0 additions & 59 deletions .github/workflows/rust-ci.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ server_response.xml
# schema
schema/*

# test data
test_data/schema/elster/*
test_data/schema/ebilanz/*

# csv
.~lock.**.csv#

Expand Down
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ members = [
]
resolver = "2"

exclude = [
"taxel-bindings/src/ericapi.rs"
]

[workspace.package]
authors = ["quambene <contact.quambene@gmail.com>"]
edition = "2021"
Expand Down
43 changes: 43 additions & 0 deletions test_data/schema/ebilanz/ebilanz_000002.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- (c) ELSTER - see https://www.elster.de -->
<!-- Schema f�r E-Bilanz mit ElsterBasis-Version 11 -->
<xs:schema
xmlns:ebilanz="http://rzf.fin-nrw.de/RMS/EBilanz/2016/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xbrli="http://www.xbrl.org/2003/instance"
xmlns:elster="http://www.elster.de/elsterxml/schema/v11"
targetNamespace="http://rzf.fin-nrw.de/RMS/EBilanz/2016/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- Importe -->
<!-- Import des Rahmenschemas von ELSTER: -->
<xs:import namespace="http://www.elster.de/elsterxml/schema/v11" schemaLocation="./ebilanz_elster_000001.xsd"/>
<!-- Import XBRL Instance -->
<xs:import namespace="http://www.xbrl.org/2003/instance" schemaLocation="../xbrl-instance-2003-12-31.xsd"/>
<!-- Ende Importe -->
<!-- Substitution f�r die abstrakten Nutzdaten -->
<xs:element name="EBilanz" type="ebilanz:EBilanzCType" substitutionGroup="elster:NutzdatenDaten"/>
<!-- Datentyp f�r EBilanz -->
<xs:complexType name="EBilanzCType">
<xs:sequence>
<xs:element name="stichtag">
<xs:annotation>
<xs:documentation>Datum im Format YYYYMMTT</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:maxInclusive value="99999999"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element ref="xbrli:xbrl"/>
</xs:sequence>
<xs:attribute name="version" use="required">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:schema>
50 changes: 50 additions & 0 deletions test_data/schema/ebilanz/ebilanz_elster_000001.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- (c) ELSTER - see https://www.elster.de -->
<!--Version 1 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:elster="http://www.elster.de/elsterxml/schema/v11" targetNamespace="http://www.elster.de/elsterxml/schema/v11" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1">
<xs:include schemaLocation="../elster/th000011_extern.xsd">
<xs:annotation>
<xs:documentation xml:lang="DE">TransferHeader-Schema mit der Version 11</xs:documentation>
</xs:annotation>
</xs:include>
<xs:include schemaLocation="../elster/ndh000011.xsd">
<xs:annotation>
<xs:documentation xml:lang="DE">NutzdatenHeader-Schema mit der Version 11</xs:documentation>
</xs:annotation>
</xs:include>
<!-- RootElement = Elster _______________________________________________________________-->
<xs:element name="Elster">
<xs:complexType>
<xs:sequence>
<xs:element ref="elster:TransferHeader"/>
<xs:element name="DatenTeil" type="elster:DatenTeilCType">
<xs:annotation>
<xs:documentation xml:lang="DE">Das Element DatenTeil enthaelt einen oder bei Sammellieferungen mehrere Nutzdatenbloecke.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- D -->
<xs:complexType name="DatenTeilCType">
<xs:sequence>
<xs:element name="Nutzdatenblock" type="elster:NutzdatenblockCType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- N -->
<xs:complexType name="NutzdatenblockCType">
<xs:annotation>
<xs:documentation xml:lang="DE">Der Nutzdatenblock enthaelt jeweils ein Element "NutzdatenHeader" und ein Element "Nutzdaten"</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="elster:NutzdatenHeader"/>
<xs:element name="Nutzdaten" type="elster:NutzdatenCType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NutzdatenCType">
<xs:sequence>
<xs:element ref="elster:NutzdatenDaten"/>
</xs:sequence>
</xs:complexType>
<xs:element name="NutzdatenDaten" type="xs:anyType" abstract="true"/>
</xs:schema>
52 changes: 52 additions & 0 deletions test_data/schema/elster/elster11_bisNH_extern.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- (c) ELSTER - see https://www.elster.de -->
<!-- Version: 2024.3.0.0 Erstelldatum: 2024-05-02 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:elster="http://www.elster.de/elsterxml/schema/v11" targetNamespace="http://www.elster.de/elsterxml/schema/v11" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1">
<xs:include schemaLocation="./th000011_extern.xsd">
<xs:annotation>
<xs:documentation xml:lang="DE">TransferHeader-Schema mit der Version 11</xs:documentation>
</xs:annotation>
</xs:include>
<xs:include schemaLocation="./ndh000011.xsd">
<xs:annotation>
<xs:documentation xml:lang="DE">NutzdatenHeader-Schema mit der Version 11</xs:documentation>
</xs:annotation>
</xs:include>
<!-- RootElement = Elster _______________________________________________________________-->
<xs:element name="Elster">
<xs:complexType>
<xs:sequence>
<xs:element name="TransferHeader" type="elster:TransferHeaderCType"/>
<xs:element name="DatenTeil" type="elster:DatenTeilCType">
<xs:annotation>
<xs:documentation xml:lang="DE">Das Element DatenTeil enthaelt einen oder bei Sammellieferungen mehrere Nutzdatenbloecke.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="DatenTeilCType">
<xs:sequence>
<xs:element name="Nutzdatenblock" type="elster:NutzdatenblockCType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NutzdatenblockCType">
<xs:annotation>
<xs:documentation xml:lang="DE">Der Nutzdatenblock enthaelt jeweils ein Element "NutzdatenHeader" und ein Element "Nutzdaten"</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NutzdatenHeader" type="elster:NutzdatenHeaderCType"/>
<xs:element name="Nutzdaten">
<xs:complexType mixed="true">
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
8 changes: 8 additions & 0 deletions test_data/schema/elster/headerbasis000003.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- (c) ELSTER - see https://www.elster.de -->
<!-- Version: 2024.3.0.0 Erstelldatum: 2024-05-02 -->
<xs:schema xmlns:elsterheaderbasis="http://www.elster.de/elsterxml/schema/headerbasis/v3" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.elster.de/elsterxml/schema/headerbasis/v3" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1">
<xs:include schemaLocation="./headerbasis_verfahren.xsd"/>
<xs:include schemaLocation="./headerbasis_datenarten.xsd"/>
<xs:include schemaLocation="./headerbasis_datentypen.xsd"/>
</xs:schema>
Loading
Loading