Skip to content
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
17 changes: 17 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: 55503af
_src_path: https://github.com/akretion/copier-python-package
author_email: alexis.delattre@akretion.com
author_name: Alexis de Lattre
development_status: 5 - Production/Stable
github_repo: factur-x
licence: BSD License
package_description: 'Factur-X and Order-X: electronic invoicing and ordering standards'
package_name: factur-x
python_version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: CI

on:
push:
branches: ["master"]
tags: ["*"]
pull_request:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install .[test]
- name: "Run pytest targets for ${{ matrix.python-version }}"
run: |
coverage run --source src -m pytest tests -v
coverage xml
- uses: codecov/codecov-action@v3
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
release:
types:
- published

name: release

jobs:
pypi:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release

permissions:
# Used to authenticate to PyPI via OIDC.
id-token: write

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ">= 3.7"

- name: build
run: pipx run build

- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
121 changes: 24 additions & 97 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,101 +1,28 @@
# Byte-compiled / optimized / DLL files
# Global directories
__pycache__/
*.py[cod]
*$py.class

# C extensions
# Global files
*.py[cod]
*.dll
*.so

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

# 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/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
*.swp

# Root directories
/.benchmarks/
/.cache/
/.env/
/.idea/
/.mypy_cache/
/.pytest_cache/
/.ruff_cache/
/.vscode/
/backend/dist/
/dist/
/site/

# Root files
/.coverage*

# Auto-generated during builds
/src/factur-x/_version.py
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.2
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format
1 change: 1 addition & 0 deletions LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Copyright (c) 2016-2023, Alexis de Lattre <alexis.delattre@akretion.com>
All rights reserved.

Expand Down
20 changes: 20 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ The PDF file *regular_pdf_file* will be updated to Factur-X/Order-X. If you want

To have more examples, look at the docstrings in the source code or look at the source code of the command line tools located in the *bin* subdirectory.

Development
=============

Use hatch
-------------

Install the env with all lib

```
hatch env create
```

Execute the test
-------------------

```
hatch run test:pytest
```


Command line tools
==================

Expand Down
13 changes: 0 additions & 13 deletions facturx/__init__.py

This file was deleted.

Loading
Loading