Skip to content

Commit 490812f

Browse files
committed
init
0 parents  commit 490812f

34 files changed

+3056
-0
lines changed

.bumpversion.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[bumpversion]
2+
current_version = 0.1.0
3+
commit = True
4+
tag = True
5+
6+
[bumpversion:file:pyproject.toml]
7+
search = version = "{current_version}"
8+
replace = version = "{new_version}"
9+
10+
[bumpversion:file:metamaska/__init__.py]
11+
search = __version__ = '{current_version}'
12+
replace = __version__ = '{new_version}'

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab
22+
23+
[*.{yml, yaml}]
24+
indent_size = 2

.github/ISSUE_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* metamaska version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
Tell us what happened, what went wrong, and what you expected to happen.
9+
10+
### What I Did
11+
12+
```
13+
Paste the command(s) you ran and the output.
14+
If there was a crash, please include the traceback here.
15+
```

.github/workflows/dev.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: dev workflow
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
strategy:
14+
matrix:
15+
python-versions: [3.8, 3.9, 3.10.7]
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-versions }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install poetry tox tox-gh-actions
29+
30+
- name: test with tox
31+
run:
32+
tox
33+
34+
- name: list files
35+
run: ls -l .
36+
37+
- uses: codecov/codecov-action@v3
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
fail_ci_if_error: true
41+
files: coverage.xml

.github/workflows/preview.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: stage & preview workflow
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish_dev_build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-versions: [3.10.7]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-versions }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install poetry tox tox-gh-actions
27+
28+
- name: test with tox
29+
run:
30+
tox
31+
32+
- name: Build wheels and source tarball
33+
run: |
34+
poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER
35+
poetry version --short
36+
poetry build
37+
38+
- name: publish to Test PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1
40+
with:
41+
user: __token__
42+
password: ${{ secrets.TEST_PYPI_API_TOKEN}}
43+
repository_url: https://test.pypi.org/legacy/
44+
skip_existing: true

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: release & publish workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
release:
12+
name: Create Release
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
python-versions: [3.10.7]
18+
19+
steps:
20+
- name: Get version from tag
21+
id: tag_name
22+
run: |
23+
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
24+
shell: bash
25+
26+
- uses: actions/checkout@v3
27+
28+
- name: Get Changelog Entry
29+
id: changelog_reader
30+
uses: mindsers/changelog-reader-action@v2
31+
with:
32+
validation_depth: 10
33+
version: ${{ steps.tag_name.outputs.current_version }}
34+
path: ./CHANGELOG.md
35+
36+
- uses: actions/setup-python@v3
37+
with:
38+
python-version: ${{ matrix.python-versions }}
39+
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install poetry
44+
45+
- name: build documentation
46+
run: |
47+
poetry install -E doc
48+
poetry run mkdocs build
49+
50+
- name: publish documentation
51+
uses: peaceiris/actions-gh-pages@v3
52+
with:
53+
personal_token: ${{ secrets.PERSONAL_TOKEN }}
54+
publish_dir: ./site
55+
56+
- name: Build wheels and source tarball
57+
run: >-
58+
poetry build
59+
60+
- name: show temporary files
61+
run: >-
62+
ls -l
63+
64+
- name: create github release
65+
id: create_release
66+
uses: softprops/action-gh-release@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
body: ${{ steps.changelog_reader.outputs.changes }}
71+
files: dist/*.whl
72+
draft: false
73+
prerelease: false
74+
75+
- name: publish to PyPI
76+
uses: pypa/gh-action-pypi-publish@release/v1
77+
with:
78+
user: __token__
79+
password: ${{ secrets.PYPI_API_TOKEN }}
80+
skip_existing: true

.gitignore

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# macOS
2+
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
6+
# Byte-compiled / optimized / DLL files
7+
__pycache__/
8+
*.py[cod]
9+
*$py.class
10+
11+
# C extensions
12+
*.so
13+
14+
# Distribution / packaging
15+
.Python
16+
env/
17+
build/
18+
develop-eggs/
19+
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
*.egg-info/
30+
.installed.cfg
31+
*.egg
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
.hypothesis/
53+
.pytest_cache/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# pyenv
80+
.python-version
81+
82+
# celery beat schedule file
83+
celerybeat-schedule
84+
85+
# SageMath parsed files
86+
*.sage.py
87+
88+
# dotenv
89+
.env
90+
91+
# virtualenv
92+
.venv
93+
venv/
94+
ENV/
95+
96+
# Spyder project settings
97+
.spyderproject
98+
.spyproject
99+
100+
# Rope project settings
101+
.ropeproject
102+
103+
# mkdocs documentation
104+
/site
105+
106+
# mypy
107+
.mypy_cache/
108+
109+
# IDE settings
110+
.vscode/
111+
.devcontainer
112+
113+
.idea/
114+
115+
# mkdocs build dir
116+
site/
117+
118+
119+
#project speficic
120+
data

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
- repo: https://github.com/Lucas-C/pre-commit-hooks
3+
rev: v1.1.9
4+
hooks:
5+
- id: forbid-crlf
6+
- id: remove-crlf
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v3.4.0
9+
hooks:
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
- id: check-merge-conflict
13+
- id: check-yaml
14+
args: [ --unsafe ]
15+
- repo: https://github.com/pre-commit/mirrors-isort
16+
rev: v5.8.0
17+
hooks:
18+
- id: isort
19+
args: [ "--filter-files" ]
20+
- repo: https://github.com/ambv/black
21+
rev: 21.5b1
22+
hooks:
23+
- id: black
24+
language_version: python3.8
25+
- repo: https://github.com/pycqa/flake8
26+
rev: 3.9.2
27+
hooks:
28+
- id: flake8
29+
additional_dependencies: [ flake8-typing-imports==1.10.0 ]
30+
- repo: https://github.com/pre-commit/mirrors-mypy
31+
rev: v0.901
32+
hooks:
33+
- id: mypy
34+
exclude: tests/
35+
additional_dependencies:
36+
- types-click

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
## [0.1.0] - 2022-09-13
4+
- Initial release on PyPI.

0 commit comments

Comments
 (0)