ksef 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ksef-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.1
2
+ Name: ksef
3
+ Version: 0.0.0
4
+ Summary: Python interface for the KSEF API
5
+ Home-page: https://github.com/samupl/python-ksef
6
+ Author: Jakub Szafrański
7
+ Author-email: kontakt@samu.pl
8
+ Requires-Python: >=3.8,<4.0
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Requires-Dist: pydantic (>=1.10.5,<2.0.0)
15
+ Project-URL: Repository, https://github.com/samupl/python-ksef
16
+ Description-Content-Type: text/markdown
17
+
18
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/samupl/python-ksef)
19
+
20
+ # ksef
21
+
22
+ Python interface for the KSEF API
23
+
24
+ ## Using
25
+
26
+ To add and install this package as a dependency of your project, run `poetry add ksef`.
27
+
28
+ ## Contributing
29
+
30
+ <details>
31
+ <summary>Prerequisites</summary>
32
+
33
+ <details>
34
+ <summary>1. Set up Git to use SSH</summary>
35
+
36
+ 1. [Generate an SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key) and [add the SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
37
+ 1. Configure SSH to automatically load your SSH keys:
38
+ ```sh
39
+ cat << EOF >> ~/.ssh/config
40
+ Host *
41
+ AddKeysToAgent yes
42
+ IgnoreUnknown UseKeychain
43
+ UseKeychain yes
44
+ EOF
45
+ ```
46
+
47
+ </details>
48
+
49
+ <details>
50
+ <summary>2. Install Docker</summary>
51
+
52
+ 1. [Install Docker Desktop](https://www.docker.com/get-started).
53
+ - Enable _Use Docker Compose V2_ in Docker Desktop's preferences window.
54
+ - _Linux only_:
55
+ - [Configure Docker to use the BuildKit build system](https://docs.docker.com/build/buildkit/#getting-started). On macOS and Windows, BuildKit is enabled by default in Docker Desktop.
56
+ - Export your user's user id and group id so that [files created in the Dev Container are owned by your user](https://github.com/moby/moby/issues/3206):
57
+ ```sh
58
+ cat << EOF >> ~/.bashrc
59
+ export UID=$(id --user)
60
+ export GID=$(id --group)
61
+ EOF
62
+ ```
63
+
64
+ </details>
65
+
66
+ <details>
67
+ <summary>3. Install VS Code or PyCharm</summary>
68
+
69
+ 1. [Install VS Code](https://code.visualstudio.com/) and [VS Code's Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Alternatively, install [PyCharm](https://www.jetbrains.com/pycharm/download/).
70
+ 2. _Optional:_ install a [Nerd Font](https://www.nerdfonts.com/font-downloads) such as [FiraCode Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) and [configure VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions) or [configure PyCharm](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) to use it.
71
+
72
+ </details>
73
+
74
+ </details>
75
+
76
+ <details open>
77
+ <summary>Development environments</summary>
78
+
79
+ The following development environments are supported:
80
+
81
+ 1. ⭐️ _GitHub Codespaces_: click on _Code_ and select _Create codespace_ to start a Dev Container with [GitHub Codespaces](https://github.com/features/codespaces).
82
+ 1. ⭐️ _Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/samupl/python-ksef) to clone this repository in a container volume and create a Dev Container with VS Code.
83
+ 1. _Dev Container_: clone this repository, open it with VS Code, and run <kbd>Ctrl/⌘</kbd> + <kbd>⇧</kbd> + <kbd>P</kbd> → _Dev Containers: Reopen in Container_.
84
+ 1. _PyCharm_: clone this repository, open it with PyCharm, and [configure Docker Compose as a remote interpreter](https://www.jetbrains.com/help/pycharm/using-docker-compose-as-a-remote-interpreter.html#docker-compose-remote) with the `dev` service.
85
+ 1. _Terminal_: clone this repository, open it with your terminal, and run `docker compose up --detach dev` to start a Dev Container in the background, and then run `docker compose exec dev zsh` to open a shell prompt in the Dev Container.
86
+
87
+ </details>
88
+
89
+ <details>
90
+ <summary>Developing</summary>
91
+
92
+ - This project follows the [Conventional Commits](https://www.conventionalcommits.org/) standard to automate [Semantic Versioning](https://semver.org/) and [Keep A Changelog](https://keepachangelog.com/) with [Commitizen](https://github.com/commitizen-tools/commitizen).
93
+ - Run `poe` from within the development environment to print a list of [Poe the Poet](https://github.com/nat-n/poethepoet) tasks available to run on this project.
94
+ - Run `poetry add {package}` from within the development environment to install a run time dependency and add it to `pyproject.toml` and `poetry.lock`. Add `--group test` or `--group dev` to install a CI or development dependency, respectively.
95
+ - Run `poetry update` from within the development environment to upgrade all dependencies to the latest versions allowed by `pyproject.toml`.
96
+ - Run `cz bump` to bump the package's version, update the `CHANGELOG.md`, and create a git tag.
97
+
98
+ </details>
99
+
ksef-0.0.0/README.md ADDED
@@ -0,0 +1,81 @@
1
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/samupl/python-ksef)
2
+
3
+ # ksef
4
+
5
+ Python interface for the KSEF API
6
+
7
+ ## Using
8
+
9
+ To add and install this package as a dependency of your project, run `poetry add ksef`.
10
+
11
+ ## Contributing
12
+
13
+ <details>
14
+ <summary>Prerequisites</summary>
15
+
16
+ <details>
17
+ <summary>1. Set up Git to use SSH</summary>
18
+
19
+ 1. [Generate an SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key) and [add the SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
20
+ 1. Configure SSH to automatically load your SSH keys:
21
+ ```sh
22
+ cat << EOF >> ~/.ssh/config
23
+ Host *
24
+ AddKeysToAgent yes
25
+ IgnoreUnknown UseKeychain
26
+ UseKeychain yes
27
+ EOF
28
+ ```
29
+
30
+ </details>
31
+
32
+ <details>
33
+ <summary>2. Install Docker</summary>
34
+
35
+ 1. [Install Docker Desktop](https://www.docker.com/get-started).
36
+ - Enable _Use Docker Compose V2_ in Docker Desktop's preferences window.
37
+ - _Linux only_:
38
+ - [Configure Docker to use the BuildKit build system](https://docs.docker.com/build/buildkit/#getting-started). On macOS and Windows, BuildKit is enabled by default in Docker Desktop.
39
+ - Export your user's user id and group id so that [files created in the Dev Container are owned by your user](https://github.com/moby/moby/issues/3206):
40
+ ```sh
41
+ cat << EOF >> ~/.bashrc
42
+ export UID=$(id --user)
43
+ export GID=$(id --group)
44
+ EOF
45
+ ```
46
+
47
+ </details>
48
+
49
+ <details>
50
+ <summary>3. Install VS Code or PyCharm</summary>
51
+
52
+ 1. [Install VS Code](https://code.visualstudio.com/) and [VS Code's Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Alternatively, install [PyCharm](https://www.jetbrains.com/pycharm/download/).
53
+ 2. _Optional:_ install a [Nerd Font](https://www.nerdfonts.com/font-downloads) such as [FiraCode Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) and [configure VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions) or [configure PyCharm](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) to use it.
54
+
55
+ </details>
56
+
57
+ </details>
58
+
59
+ <details open>
60
+ <summary>Development environments</summary>
61
+
62
+ The following development environments are supported:
63
+
64
+ 1. ⭐️ _GitHub Codespaces_: click on _Code_ and select _Create codespace_ to start a Dev Container with [GitHub Codespaces](https://github.com/features/codespaces).
65
+ 1. ⭐️ _Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/samupl/python-ksef) to clone this repository in a container volume and create a Dev Container with VS Code.
66
+ 1. _Dev Container_: clone this repository, open it with VS Code, and run <kbd>Ctrl/⌘</kbd> + <kbd>⇧</kbd> + <kbd>P</kbd> → _Dev Containers: Reopen in Container_.
67
+ 1. _PyCharm_: clone this repository, open it with PyCharm, and [configure Docker Compose as a remote interpreter](https://www.jetbrains.com/help/pycharm/using-docker-compose-as-a-remote-interpreter.html#docker-compose-remote) with the `dev` service.
68
+ 1. _Terminal_: clone this repository, open it with your terminal, and run `docker compose up --detach dev` to start a Dev Container in the background, and then run `docker compose exec dev zsh` to open a shell prompt in the Dev Container.
69
+
70
+ </details>
71
+
72
+ <details>
73
+ <summary>Developing</summary>
74
+
75
+ - This project follows the [Conventional Commits](https://www.conventionalcommits.org/) standard to automate [Semantic Versioning](https://semver.org/) and [Keep A Changelog](https://keepachangelog.com/) with [Commitizen](https://github.com/commitizen-tools/commitizen).
76
+ - Run `poe` from within the development environment to print a list of [Poe the Poet](https://github.com/nat-n/poethepoet) tasks available to run on this project.
77
+ - Run `poetry add {package}` from within the development environment to install a run time dependency and add it to `pyproject.toml` and `poetry.lock`. Add `--group test` or `--group dev` to install a CI or development dependency, respectively.
78
+ - Run `poetry update` from within the development environment to upgrade all dependencies to the latest versions allowed by `pyproject.toml`.
79
+ - Run `cz bump` to bump the package's version, update the `CHANGELOG.md`, and create a git tag.
80
+
81
+ </details>
@@ -0,0 +1,148 @@
1
+ [build-system] # https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
2
+ requires = ["poetry-core>=1.0.0"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [tool.poetry] # https://python-poetry.org/docs/pyproject/
6
+ name = "ksef"
7
+ version = "0.0.0"
8
+ description = "Python interface for the KSEF API"
9
+ authors = ["Jakub Szafrański <kontakt@samu.pl>"]
10
+ readme = "README.md"
11
+ repository = "https://github.com/samupl/python-ksef"
12
+
13
+ [tool.commitizen] # https://commitizen-tools.github.io/commitizen/config/
14
+ bump_message = "bump(release): v$current_version → v$new_version"
15
+ tag_format = "v$version"
16
+ update_changelog_on_bump = true
17
+ version = "0.0.0"
18
+ version_files = ["pyproject.toml:version"]
19
+
20
+ [tool.poetry.dependencies] # https://python-poetry.org/docs/dependency-specification/
21
+ pydantic = "^1.10.5"
22
+ python = "^3.8"
23
+
24
+ [tool.poetry.group.test.dependencies] # https://python-poetry.org/docs/master/managing-dependencies/
25
+ absolufy-imports = "^0.3.1"
26
+ black = "^22.12.0"
27
+ commitizen = "^2.42.1"
28
+ coverage = { extras = ["toml"], version = "^7.2.1" }
29
+ mypy = "^1.0.1"
30
+ poethepoet = "^0.18.1"
31
+ pre-commit = "^3.1.1"
32
+ pytest = "^7.2.2"
33
+ pytest-clarity = "^1.0.1"
34
+ pytest-mock = "^3.10.0"
35
+ pytest-xdist = "^3.2.0"
36
+ ruff = "^0.0.254"
37
+ safety = "^2.3.5"
38
+ shellcheck-py = "^0.9.0"
39
+ typeguard = "^2.13.3"
40
+
41
+ [tool.poetry.group.dev.dependencies] # https://python-poetry.org/docs/master/managing-dependencies/
42
+ cruft = "^2.12.0"
43
+ pdoc = "^13.0.0"
44
+
45
+ [tool.black] # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
46
+ line-length = 100
47
+ target-version = ["py38"]
48
+
49
+ [tool.coverage.report] # https://coverage.readthedocs.io/en/latest/config.html#report
50
+ fail_under = 50
51
+ precision = 1
52
+ show_missing = true
53
+ skip_covered = true
54
+
55
+ [tool.coverage.run] # https://coverage.readthedocs.io/en/latest/config.html#run
56
+ branch = true
57
+ command_line = "--module pytest"
58
+ data_file = "reports/.coverage"
59
+ source = ["src"]
60
+
61
+ [tool.coverage.xml] # https://coverage.readthedocs.io/en/latest/config.html#xml
62
+ output = "reports/coverage.xml"
63
+
64
+ [tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
65
+ junit_xml = "reports/mypy.xml"
66
+ plugins = "pydantic.mypy"
67
+ strict = true
68
+ disallow_subclassing_any = false
69
+ disallow_untyped_decorators = false
70
+ ignore_missing_imports = true
71
+ pretty = true
72
+ show_column_numbers = true
73
+ show_error_codes = true
74
+ show_error_context = true
75
+ warn_unreachable = true
76
+
77
+ [tool.pydantic-mypy] # https://pydantic-docs.helpmanual.io/mypy_plugin/#configuring-the-plugin
78
+ init_forbid_extra = true
79
+ init_typed = true
80
+ warn_required_dynamic_aliases = true
81
+ warn_untyped_fields = true
82
+
83
+ [tool.pytest.ini_options] # https://docs.pytest.org/en/latest/reference/reference.html#ini-options-ref
84
+ addopts = "--color=yes --doctest-modules --exitfirst --failed-first --strict-config --strict-markers --typeguard-packages=ksef --verbosity=2 --junitxml=reports/pytest.xml"
85
+ filterwarnings = ["error", "ignore::DeprecationWarning"]
86
+ testpaths = ["src", "tests"]
87
+ xfail_strict = true
88
+
89
+ [tool.ruff] # https://github.com/charliermarsh/ruff
90
+ fix = true
91
+ ignore-init-module-imports = true
92
+ line-length = 100
93
+ select = ["A", "B", "BLE", "C4", "C90", "D", "DTZ", "E", "ERA", "F", "G", "I", "INP", "ISC", "N", "NPY", "PGH", "PIE", "PLC", "PLE", "PLR", "PLW", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "S", "SIM", "T10", "T20", "TID", "UP", "W", "YTT"]
94
+ ignore = ["E501", "PGH001", "RET504", "S101"]
95
+ unfixable = ["ERA001", "F401", "F841", "T201", "T203"]
96
+ src = ["src", "tests"]
97
+ target-version = "py38"
98
+
99
+ [tool.ruff.pydocstyle]
100
+ convention = "numpy"
101
+
102
+ [tool.poe.tasks] # https://github.com/nat-n/poethepoet
103
+
104
+ [tool.poe.tasks.docs]
105
+ help = "Generate this package's docs"
106
+ cmd = """
107
+ pdoc
108
+ --docformat $docformat
109
+ --output-directory $outputdirectory
110
+ ksef
111
+ """
112
+
113
+ [[tool.poe.tasks.docs.args]]
114
+ help = "The docstring style (default: numpy)"
115
+ name = "docformat"
116
+ options = ["--docformat"]
117
+ default = "numpy"
118
+
119
+ [[tool.poe.tasks.docs.args]]
120
+ help = "The output directory (default: docs)"
121
+ name = "outputdirectory"
122
+ options = ["--output-directory"]
123
+ default = "docs"
124
+
125
+ [tool.poe.tasks.lint]
126
+ help = "Lint this package"
127
+
128
+ [[tool.poe.tasks.lint.sequence]]
129
+ cmd = """
130
+ pre-commit run
131
+ --all-files
132
+ --color always
133
+ """
134
+
135
+ [[tool.poe.tasks.lint.sequence]]
136
+ shell = "safety check --continue-on-error --full-report"
137
+
138
+ [tool.poe.tasks.test]
139
+ help = "Test this package"
140
+
141
+ [[tool.poe.tasks.test.sequence]]
142
+ cmd = "coverage run"
143
+
144
+ [[tool.poe.tasks.test.sequence]]
145
+ cmd = "coverage report"
146
+
147
+ [[tool.poe.tasks.test.sequence]]
148
+ cmd = "coverage xml"
@@ -0,0 +1 @@
1
+ """ksef package."""
File without changes