Skip to content

Commit

Permalink
Initial project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
srittau committed Aug 20, 2024
1 parent f1b77cf commit 561ea47
Show file tree
Hide file tree
Showing 10 changed files with 340 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2

updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: monthly
time: '04:00'
groups:
dependencies:
exclude-patterns:
- "mypy"
- "types-*"
update-types:
- "minor"
- "patch"
mypy:
patterns:
- "mypy"
types:
patterns:
- "types-*"

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
time: '04:00'
27 changes: 27 additions & 0 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test and lint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
fail-fast: false

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install Python packages
run: poetry install
- name: Lint with ruff
run: poe lint
- name: Type checking with mypy
run: poe typecheck
- name: Test with pytest
run: poe test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
__pycache__
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog for PyFactur-X

PyFactur-X adheres to [semantic versioning](https://semver.org/).

## [Unreleased]

Initial release.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# pyfacturx
Factur-X/ZUGFeRD parsing and generation library for Python
# PyFactur-X – Factur-X/ZUGFeRD parsing and generation library for Python

[![GitHub](https://img.shields.io/github/release/zfutura/pyfacturx/all.svg)](https://github.com/zfutura/pyfacturx/releases/)
[![Apache 2.0 License](https://img.shields.io/github/license/zfutura/pyfacturx)](https://github.com/zfutura/pyfacturx/blob/main/LICENSE)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/zfutura/pyfacturx/test-and-lint)](https://github.com/zfutura/pyfacturx/actions/workflows/test-and-lint)


Factur-X (also called ZUGFeRD in Germany) is a Franco-German standard for
electronic invoices. Structured XML data is embedded in PDF-A/3 files,
allowing invoices to be processed automatically, but still be displayed in
standard PDF readers.

See the [Factur-X website (French)](https://www.factur-x.org/) or
[FeRD website (German)](https://www.ferd-net.de/) for more information.

Currently, this library supports writing XML files according Factur-X Version
1.0.06 (aka ZUGFeRD 2.2) in the EN16931 (Comfort) profile. Generally in scope
of this library, but currently not supported are:

* Other profiles (Minimum, Basic, Basic WL, Extended, XRechnung).
* Reading Factur-X files.
* Embedding the XML in PDF files.
209 changes: 209 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[tool.poetry]
name = "facturx"
version = "0.1.0"
description = "Factur-X/ZUGFeRD parsing and generation library for Python"
authors = ["Sebastian Rittau <[email protected]>"]
readme = "README.md"
license = "Apache-2.0"
repository = "https://github.com/zfutura/pyfacturx"
keywords = ["factur-x", "zugferd", "invoice", "billing"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: File Formats",
"Topic :: Office/Business :: Financial :: Accounting",
]

[tool.poetry.dependencies]
python = "^3.12"

[tool.poetry.group.dev.dependencies]
mypy = "^1.11.1"
poethepoet = "^0.27.0"
pytest = "^8.3.2"
ruff = "^0.6.1"

[tool.poe.tasks]
lint = "ruff check src"
test = "pytest src"
typecheck = "mypy src"

[tool.ruff]
target-version = "py312"
line-length = 79

[tool.ruff.lint]
select = ["E", "F", "B", "I"]

[tool.ruff.lint.isort]
combine-as-imports = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added src/facturx/__init__.py
Empty file.
Empty file added src/facturx/py.typed
Empty file.
2 changes: 2 additions & 0 deletions src/facturx/test_dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_dummy():
assert True

0 comments on commit 561ea47

Please sign in to comment.