Skip to content

Commit 243a0b2

Browse files
committed
version 0.2.0
1 parent b4af492 commit 243a0b2

28 files changed

+1500
-297
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
* Trolling, insulting or derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
25+
* Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
40+
41+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42+
43+
## Enforcement Guidelines
44+
45+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46+
47+
### 1. Correction
48+
49+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50+
51+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52+
53+
### 2. Warning
54+
55+
**Community Impact**: A violation through a single incident or series of actions.
56+
57+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58+
59+
### 3. Temporary Ban
60+
61+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62+
63+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64+
65+
### 4. Permanent Ban
66+
67+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68+
69+
**Consequence**: A permanent ban from any sort of public interaction within the community.
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74+
75+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76+
77+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78+
79+
[homepage]: https://www.contributor-covenant.org
80+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81+
[Mozilla CoC]: https://github.com/mozilla/diversity
82+
[FAQ]: https://www.contributor-covenant.org/faq
83+
[translations]: https://www.contributor-covenant.org/translations
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: 'Bug:'
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
Provide a clear and concise description of the bug.
11+
12+
**How to reproduce**
13+
Include source code:
14+
15+
And/Or steps to reproduce the behavior:
16+
17+
1. ...
18+
19+
**Expected behavior**
20+
Explain what you expected to happen clearly and concisely.
21+
22+
**Observed behavior**
23+
Describe what is actually happening clearly and concisely.
24+
25+
**Screenshots**
26+
If applicable, attach screenshots to help illustrate the problem.
27+
28+
**Environment**
29+
Include info about your environment and unilogging version.
30+
31+
**Additional context**
32+
Provide any other relevant context or information about the problem here.

.github/ISSUE_TEMPLATE/config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
3+
contact_links:
4+
- name: Security Contact
5+
about: Please report security vulnerabilities to uni@goduni.me
6+
- name: Question or Problem
7+
about: Ask a question or ask about a problem in GitHub Discussions.
8+
url: https://github.com/goduni/unilogging/issues
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: 'Feature:'
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
To suggest an idea or feature or any other enhancement, please follow this template:
10+
11+
**Is your feature request related to a problem? Please describe.**
12+
Provide a clear and concise description of the problem you've encountered. For example: "I'm always frustrated when..."
13+
14+
**Describe the solution you'd like**
15+
Clearly and concisely describe the desired outcome or solution.
16+
17+
**Feature code example**
18+
To help others understand the proposed feature, illustrate it with a code example.
19+
20+
**Describe alternatives you've considered**
21+
Provide a clear and concise description of any alternative solutions or features you've thought about.
22+
23+
**Additional context**
24+
Include any other relevant context or screenshots related to the feature request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Description
2+
3+
Please include a summary of the change and specify which issue is being addressed. Additionally, provide relevant motivation and context.
4+
5+
Fixes # (issue number)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Documentation (typos, code examples, or any documentation updates)
12+
- [ ] Bug fix (a non-breaking change that resolves an issue)
13+
- [ ] New feature (a non-breaking change that adds functionality)
14+
- [ ] Breaking change (a fix or feature that would disrupt existing functionality)
15+
- [ ] This change requires a documentation update
16+
17+
## Checklist
18+
19+
- [ ] My code adheres to the style guidelines of this project (`just lint` shows no errors)
20+
- [ ] I have conducted a self-review of my own code
21+
- [ ] I have made the necessary changes to the documentation
22+
- [ ] My changes do not generate any new warnings
23+
- [ ] I have added tests to validate the effectiveness of my fix or the functionality of my new feature
24+
- [ ] I have ensured that static analysis tests are passing by running `just static-analysis`
25+
- [ ] I have included code examples to illustrate the modifications

.github/SECURITY.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Security Policy
2+
3+
Security and stability are paramount for unilogging.
4+
5+
Learn more below. 👇
6+
7+
## Versions
8+
9+
The latest version of unilogging is actively supported.
10+
11+
We strongly encourage you to write tests for your application and regularly update your unilogging version after confirming that your tests pass. This ensures you benefit from the latest features, bug fixes, and **security updates**.
12+
13+
## Reporting a Vulnerability
14+
15+
If you suspect a security issue, even if you are uncertain, please report it promptly. However, **do not create a public issue**.
16+
17+
To responsibly report a security concern, navigate to the Security tab of the repository and click on *"Report a vulnerability"*.
18+
19+
![Screenshot of repo security tab showing "Report a vulnerability" button](https://github.com/encode/.github/raw/master/img/github-demos-private-vulnerability-reporting.png)
20+
21+
Alternatively, you can send an email to: [uni@goduni.me](uni@goduni.me).
22+
23+
Ensure your report contains sufficient detail. As with standard issue reports, a minimal, reproducible example expedites issue resolution.
24+
25+
Also, include the output of the following command in your report:
26+
27+
```bash
28+
pip show unilogging
29+
```
30+
31+
## Public Discussions
32+
33+
Please restrain from publicly discussing potential security vulnerabilities. 🙊
34+
35+
It is advisable to engage in private discussions and seek solutions first to minimize potential impact.
36+
37+
---
38+
39+
Thanks for your help!

.github/workflows/publish-pypi.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: publish-pypi.yml
2+
3+
on:
4+
workflow_dispatch: null
5+
release:
6+
types:
7+
- published
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v6
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Setup uv
25+
uses: astral-sh/setup-uv@v6
26+
with:
27+
version: "latest"
28+
29+
- name: Build package
30+
run: uv build
31+
32+
- name: Publish to PyPi
33+
uses: pypa/gh-action-pypi-publish@release/v1
34+
with:
35+
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: run-project-analyze.yml
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.12", "3.13", "3.14.0-rc.3"]
13+
14+
steps:
15+
- uses: actions/checkout@v5
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Setup uv
23+
uses: astral-sh/setup-uv@v6
24+
with:
25+
version: "latest"
26+
27+
- name: Sync dependencies
28+
run: uv sync --group dev
29+
30+
- name: Run Ruff
31+
run: uv run ruff check
32+
33+
- name: Run MyPy
34+
run: uv run mypy
35+
36+
- name: Run Tests
37+
run: uv run pytest --cov --cov-fail-under=80 --cov-report=xml
38+
39+
- name: Upload coverage to Codecov
40+
uses: codecov/codecov-action@v5
41+
with:
42+
token: ${{ secrets.CODECOV_TOKEN }}
43+
files: ./coverage.xml
44+
fail_ci_if_error: true

.justfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Cross-platform shell configuration
2+
# Use PowerShell on Windows (higher precedence than shell setting)
3+
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
4+
# Use sh on Unix-like systems
5+
set shell := ["sh", "-c"]
6+
7+
lint:
8+
ruff check
9+
10+
static-analysis:
11+
mypy
12+
13+
test:
14+
pytest --cov
15+
16+
test-all:
17+
nox
18+
19+
check-all:
20+
just lint
21+
just static-analysis
22+
just test-all

CITATION.cff

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This CITATION.cff file was generated with cffinit.
2+
# Visit https://bit.ly/cffinit to generate yours today!
3+
4+
cff-version: 1.2.0
5+
title: unilogging
6+
message: >-
7+
If you use this software, please cite it using the
8+
metadata from this file.
9+
type: software
10+
authors:
11+
- given-names: Universe Interface
12+
email: uni@goduni.me
13+
repository-code: 'https://github.com/goduni/unilogging'
14+
abstract: >
15+
A simple python library for working with the context of
16+
logs.
17+
repository-artifact: 'https://pypistats.org/packages/unilogging'
18+
keywords:
19+
- python
20+
- logging
21+
- context
22+
- structured-logging
23+
- python-logging
24+
license: MIT

0 commit comments

Comments
 (0)