Skip to content

Commit 6bdee50

Browse files
authored
Merge pull request #1 from pomponchik/develop
0.0.1
2 parents 4032f7c + 2aa5e41 commit 6bdee50

File tree

20 files changed

+6913
-1
lines changed

20 files changed

+6913
-1
lines changed
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: ''
5+
labels: bug
6+
assignees: pomponchik
7+
8+
---
9+
10+
## Short description
11+
12+
Replace this text with a short description of the error and the behavior that you expected to see instead.
13+
14+
15+
## Describe the bug in detail
16+
17+
Please add this test in such a way that it reproduces the bug you found and does not pass:
18+
19+
```python
20+
def test_your_bug():
21+
...
22+
```
23+
24+
Writing the test, please keep compatibility with the [`pytest`](https://docs.pytest.org/) framework.
25+
26+
If for some reason you cannot describe the error in the test format, describe here the steps to reproduce it.
27+
28+
29+
## Environment
30+
- OS: ...
31+
- Python version (the output of the `python --version` command): ...
32+
- Version of this package: ...
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Documentation fix
3+
about: Add something to the documentation, delete it, or change it
4+
title: ''
5+
labels: documentation
6+
assignees: pomponchik
7+
---
8+
9+
## It's cool that you're here!
10+
11+
Documentation is an important part of the project, we strive to make it high-quality and keep it up to date. Please adjust this template by outlining your proposal.
12+
13+
14+
## Type of action
15+
16+
What do you want to do: remove something, add it, or change it?
17+
18+
19+
## Where?
20+
21+
Specify which part of the documentation you want to make a change to? For example, the name of an existing documentation section or the line number in a file `README.md`.
22+
23+
24+
## The essence
25+
26+
Please describe the essence of the proposed change
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: pomponchik
7+
8+
---
9+
10+
## Short description
11+
12+
What do you propose and why do you consider it important?
13+
14+
15+
## Some details
16+
17+
If you can, provide code examples that will show how your proposal will work. Also, if you can, indicate which alternatives to this behavior you have considered. And finally, how do you propose to test the correctness of the implementation of your idea, if at all possible?

.github/ISSUE_TEMPLATE/question.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Question or consultation
3+
about: Ask anything about this project
4+
title: ''
5+
labels: guestion
6+
assignees: pomponchik
7+
8+
---
9+
10+
## Your question
11+
12+
Here you can freely describe your question about the project. Please, before doing this, read the documentation provided, and ask the question only if the necessary answer is not there. In addition, please keep in mind that this is a free non-commercial project and user support is optional for its author. The response time is not guaranteed in any way.

.github/workflows/lint.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Lint
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- name: Cache pip dependencies
21+
uses: actions/cache@v4
22+
with:
23+
path: ~/.cache/pip
24+
key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
25+
restore-keys: |
26+
${{ runner.os }}-pip-${{ github.workflow }}-
27+
28+
- name: Install dependencies
29+
shell: bash
30+
run: pip install -r requirements_dev.txt
31+
32+
- name: Install the library
33+
shell: bash
34+
run: pip install .
35+
36+
- name: Run ruff
37+
shell: bash
38+
run: ruff check metacode
39+
40+
- name: Run ruff for tests
41+
shell: bash
42+
run: ruff check tests
43+
44+
- name: Run mypy
45+
shell: bash
46+
run: mypy --strict metacode
47+
48+
- name: Run mypy for tests
49+
shell: bash
50+
run: mypy tests

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
pypi-publish:
10+
name: upload release to PyPI
11+
runs-on: ubuntu-latest
12+
# Specifying a GitHub environment is optional, but strongly encouraged
13+
environment: release
14+
permissions:
15+
# IMPORTANT: this permission is mandatory for trusted publishing
16+
id-token: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
shell: bash
27+
run: pip install -r requirements_dev.txt
28+
29+
- name: Build the project
30+
shell: bash
31+
run: python -m build .
32+
33+
- name: Publish package distributions to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Tests
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- name: Install the library
21+
shell: bash
22+
run: pip install .
23+
24+
- name: Cache pip dependencies
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.cache/pip
28+
key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-${{ github.workflow }}-
31+
32+
- name: Install dependencies
33+
shell: bash
34+
run: pip install -r requirements_dev.txt
35+
36+
- name: Print all libs
37+
shell: bash
38+
run: pip list
39+
40+
- name: Run tests and show coverage on the command line
41+
run: |
42+
coverage run --source=metacode --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=100
43+
coverage xml
44+
45+
- name: Upload coverage to Coveralls
46+
if: runner.os == 'Linux'
47+
env:
48+
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}}
49+
uses: coverallsapp/github-action@v2
50+
with:
51+
format: cobertura
52+
file: coverage.xml
53+
54+
- name: Run tests and show the branch coverage on the command line
55+
run: coverage run --branch --source=metacode --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=100

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
__pycache__
2+
.pytest_cache
3+
.DS_Store
4+
test.py
5+
test_2.py
6+
test_3.py
7+
test_4.py
8+
*.egg-info
9+
dist
10+
venv
11+
.venv
12+
build
13+
.ruff_cache
14+
.mypy_cache
15+
.coverage
16+
uv.lock
17+
.history
18+
.vscode/
19+
.idea/
20+
.ropeproject
21+
node_modules
22+
mutants

0 commit comments

Comments
 (0)