Skip to content

Commit bc4a8a4

Browse files
authored
Create first version (#1)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
1 parent fd08d11 commit bc4a8a4

18 files changed

+776
-1
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tidelift: "pypi/xml-fmt"

.github/SECURITY.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
|---------| ------------------ |
7+
| 1+ | :white_check_mark: |
8+
| <1 | :x: |
9+
10+
## Reporting a Vulnerability
11+
12+
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift
13+
will coordinate the fix and disclosure.

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci

.github/workflows/check.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: check
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches: ["main"]
6+
tags-ignore: ["**"]
7+
pull_request:
8+
schedule:
9+
- cron: "0 8 * * *"
10+
11+
concurrency:
12+
group: check-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
env:
22+
- "3.13"
23+
- "3.12"
24+
- "3.11"
25+
- "3.10"
26+
- "3.9"
27+
- type
28+
- dev
29+
- pkg_meta
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
- name: Install the latest version of uv
35+
uses: astral-sh/setup-uv@v3
36+
with:
37+
cache-dependency-glob: "pyproject.toml"
38+
- name: Install tox
39+
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
40+
- name: Install Python
41+
if: startsWith(matrix.env, '3.') && matrix.env != '3.13'
42+
run: uv python install --python-preference only-managed ${{ matrix.env }}
43+
- name: Setup test suite
44+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
45+
- name: Run test suite
46+
run: tox run --skip-pkg-install -e ${{ matrix.env }}
47+
env:
48+
PYTEST_ADDOPTS: "-vv --durations=5"

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release to PyPI
2+
on:
3+
push:
4+
tags: ["*"]
5+
6+
env:
7+
dists-artifact-name: python-package-distributions
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Install the latest version of uv
17+
uses: astral-sh/setup-uv@v3
18+
with:
19+
enable-cache: true
20+
cache-dependency-glob: "pyproject.toml"
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
- name: Build package
23+
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: ${{ env.dists-artifact-name }}
28+
path: dist/*
29+
30+
release:
31+
needs:
32+
- build
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: release
36+
url: https://pypi.org/project/xml-fmt/${{ github.ref_name }}
37+
permissions:
38+
id-token: write
39+
steps:
40+
- name: Download all the dists
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: ${{ env.dists-artifact-name }}
44+
path: dist/
45+
- name: Publish to PyPI
46+
uses: pypa/gh-action-pypi-publish@v1.10.3
47+
with:
48+
attestations: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.tox/
2+
.*_cache
3+
__pycache__

.pre-commit-config.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: end-of-file-fixer
6+
- id: trailing-whitespace
7+
- repo: https://github.com/python-jsonschema/check-jsonschema
8+
rev: 0.31.1
9+
hooks:
10+
- id: check-github-workflows
11+
args: ["--verbose"]
12+
- repo: https://github.com/codespell-project/codespell
13+
rev: v2.4.1
14+
hooks:
15+
- id: codespell
16+
args: ["--write-changes"]
17+
- repo: https://github.com/tox-dev/tox-toml-fmt
18+
rev: "v1.0.0"
19+
hooks:
20+
- id: tox-toml-fmt
21+
- repo: https://github.com/tox-dev/pyproject-fmt
22+
rev: "v2.5.0"
23+
hooks:
24+
- id: pyproject-fmt
25+
- repo: https://github.com/astral-sh/ruff-pre-commit
26+
rev: "v0.9.4"
27+
hooks:
28+
- id: ruff-format
29+
- id: ruff
30+
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
31+
- repo: meta
32+
hooks:
33+
- id: check-hooks-apply
34+
- id: check-useless-excludes

.pre-commit-hooks.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
- id: xml-fmt
2+
name: xml-fmt
3+
description: ""
4+
entry: xml-fmt
5+
language: python
6+
types: ["xsd", "xml"]
7+
args: []
8+
require_serial: false
9+
additional_dependencies: []
10+
minimum_pre_commit_version: "0"

CODE_OF_CONDUCT.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
6+
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
7+
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race,
8+
religion, or sexual identity and orientation.
9+
10+
## Our Standards
11+
12+
Examples of behavior that contributes to creating a positive environment include:
13+
14+
- Using welcoming and inclusive language
15+
- Being respectful of differing viewpoints and experiences
16+
- Gracefully accepting constructive criticism
17+
- Focusing on what is best for the community
18+
- Showing empathy towards other community members
19+
20+
Examples of unacceptable behavior by participants include:
21+
22+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
- Trolling, insulting/derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Our Responsibilities
29+
30+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
31+
appropriate and fair corrective action in response to any instances of unacceptable behavior.
32+
33+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
34+
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
35+
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
36+
37+
## Scope
38+
39+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
40+
project or its community. Examples of representing a project or community include using an official project e-mail
41+
address, posting via an official social media account, or acting as an appointed representative at an online or offline
42+
event. Representation of a project may be further defined and clarified by project maintainers.
43+
44+
## Enforcement
45+
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47+
gaborbernat@python.org. The project team will review and investigate all complaints, and will respond in a way that it
48+
deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the
49+
reporter of an incident. Further details of specific enforcement policies may be posted separately.
50+
51+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
52+
repercussions as determined by other members of the project's leadership.
53+
54+
## Attribution
55+
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
57+
[https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
58+
59+
[homepage]: https://www.contributor-covenant.org/
60+
[version]: https://www.contributor-covenant.org/version/1/4/

0 commit comments

Comments
 (0)