alpyki 0.2.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.
Files changed (47) hide show
  1. alpyki-0.2.0/.editorconfig +15 -0
  2. alpyki-0.2.0/.flake8 +2 -0
  3. alpyki-0.2.0/.gitea/actions/lint/action.yaml +26 -0
  4. alpyki-0.2.0/.gitea/actions/test/action.yaml +31 -0
  5. alpyki-0.2.0/.gitea/workflows/publish_pypi.yaml +80 -0
  6. alpyki-0.2.0/.gitea/workflows/publish_testpypi.yaml +41 -0
  7. alpyki-0.2.0/.gitea/workflows/release.yaml +77 -0
  8. alpyki-0.2.0/.gitea/workflows/test.yaml +30 -0
  9. alpyki-0.2.0/.gitignore +163 -0
  10. alpyki-0.2.0/.markdownlint.yaml +252 -0
  11. alpyki-0.2.0/.pre-commit-config.yaml +47 -0
  12. alpyki-0.2.0/CHANGELOG.md +27 -0
  13. alpyki-0.2.0/CONTRIBUTING.md +53 -0
  14. alpyki-0.2.0/LICENSE +17 -0
  15. alpyki-0.2.0/MANIFEST.in +11 -0
  16. alpyki-0.2.0/PKG-INFO +145 -0
  17. alpyki-0.2.0/README.md +122 -0
  18. alpyki-0.2.0/RELEASE.md +65 -0
  19. alpyki-0.2.0/alpyki/__init__.py +3 -0
  20. alpyki-0.2.0/alpyki/cli.py +671 -0
  21. alpyki-0.2.0/alpyki/model.py +351 -0
  22. alpyki-0.2.0/alpyki/template/.gitea/workflows/build_and_release.yaml +75 -0
  23. alpyki-0.2.0/alpyki/template/.github/workflows/build_and_release.yaml +45 -0
  24. alpyki-0.2.0/alpyki/template/.gitignore +205 -0
  25. alpyki-0.2.0/alpyki/template/.gitlab-ci.yml +81 -0
  26. alpyki-0.2.0/alpyki/template/LICENSE +21 -0
  27. alpyki-0.2.0/alpyki/template/Workflow/workflow.py +23 -0
  28. alpyki-0.2.0/alpyki/template/requirements.txt +1 -0
  29. alpyki-0.2.0/alpyki/tests/test_cli.py +268 -0
  30. alpyki-0.2.0/alpyki/tests/test_model.py +14 -0
  31. alpyki-0.2.0/alpyki/tests/test_workflow.py +106 -0
  32. alpyki-0.2.0/alpyki/workflow.py +86 -0
  33. alpyki-0.2.0/alpyki.egg-info/PKG-INFO +145 -0
  34. alpyki-0.2.0/alpyki.egg-info/SOURCES.txt +57 -0
  35. alpyki-0.2.0/alpyki.egg-info/dependency_links.txt +1 -0
  36. alpyki-0.2.0/alpyki.egg-info/entry_points.txt +2 -0
  37. alpyki-0.2.0/alpyki.egg-info/requires.txt +9 -0
  38. alpyki-0.2.0/alpyki.egg-info/scm_file_list.json +42 -0
  39. alpyki-0.2.0/alpyki.egg-info/scm_version.json +8 -0
  40. alpyki-0.2.0/alpyki.egg-info/top_level.txt +1 -0
  41. alpyki-0.2.0/pyproject.toml +22 -0
  42. alpyki-0.2.0/requirements-doc.txt +1 -0
  43. alpyki-0.2.0/requirements-test.txt +3 -0
  44. alpyki-0.2.0/requirements.txt +1 -0
  45. alpyki-0.2.0/script/validate_version.py +21 -0
  46. alpyki-0.2.0/setup.cfg +47 -0
  47. alpyki-0.2.0/setup.py +3 -0
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ indent_style = space
8
+ indent_size = 4
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.{yml, yaml, sh}]
12
+ indent_size = 2
13
+
14
+ [Makefile]
15
+ indent_style = tab
alpyki-0.2.0/.flake8 ADDED
@@ -0,0 +1,2 @@
1
+ [flake8]
2
+ max-line-length = 120
@@ -0,0 +1,26 @@
1
+ name: lint
2
+ description: Run alpyki tests
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - name: Lint changelog
7
+ uses: docker://avtodev/markdown-lint:v1
8
+ with:
9
+ rules: "/lint/rules/changelog.js"
10
+ config: "/lint/config/changelog.yml"
11
+ args: "CHANGELOG.md"
12
+ - name: Lint other Markdown files
13
+ uses: articulate/actions-markdownlint@main
14
+ with:
15
+ files: "**/*.md"
16
+ ignore: CHANGELOG.md
17
+ config: .markdownlint.yaml
18
+ version: 0.28.1
19
+ - uses: ricardochaves/python-lint@v1.4.0
20
+ with:
21
+ use-pylint: false
22
+ use-pycodestyle: false
23
+ use-flake8: true
24
+ use-black: true
25
+ use-mypy: false
26
+ use-isort: false
@@ -0,0 +1,31 @@
1
+ name: test
2
+ description: Run alpyki tests
3
+ inputs:
4
+ python-version:
5
+ description: The Python version to use
6
+ required: false
7
+ default: "3.11"
8
+ runs:
9
+ using: composite
10
+ steps:
11
+ - name: Set up Python ${{ inputs.python-version }}
12
+ uses: actions/setup-python@v7.0.0
13
+ with:
14
+ python-version: ${{ inputs.python-version }}
15
+ cache: pip
16
+ - name: Install dependencies
17
+ shell: bash
18
+ run: |
19
+ pip install -e '.[test]' -e '.[doc]'
20
+ - name: Run pytest
21
+ shell: bash
22
+ run: |
23
+ pytest
24
+ - name: mypy
25
+ shell: bash
26
+ run: |
27
+ mypy alpyki
28
+ - name: Try to generate documentation
29
+ shell: bash
30
+ run: |
31
+ pdoc --output-dir docs alpyki
@@ -0,0 +1,80 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v[0-9]+.[0-9]+.[0-9]+'
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ publish:
13
+ name: Publish to PyPI
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: builtin:checkout
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@v7.0.0
23
+ with:
24
+ python-version: "3.11"
25
+
26
+ - name: Install build dependencies
27
+ run: pip install build twine
28
+
29
+ - name: Build package
30
+ run: python -m build
31
+
32
+ - name: Validate version
33
+ run: |
34
+ pip install .
35
+ python script/validate_version.py -e "${{ github.ref_name }}"
36
+
37
+ - name: Build Changelog
38
+ id: changelog
39
+ uses: mikepenz/release-changelog-builder-action@v6.4.0
40
+ with:
41
+ platform: gitea
42
+ baseUrl: ${{ gitea.server_url }}
43
+ env:
44
+ GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
45
+
46
+ - name: Create Gitea release
47
+ uses: softprops/action-gh-release@v2
48
+ with:
49
+ files: dist/*
50
+ body: ${{ steps.changelog.outputs.changelog }}
51
+
52
+ - name: Install GitHub CLI
53
+ if: ${{ secrets.GH_TOKEN != '' }}
54
+ run: |
55
+ (type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
56
+ && sudo mkdir -p -m 755 /etc/apt/keyrings \
57
+ && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
58
+ && cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
59
+ && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
60
+ && sudo mkdir -p -m 755 /etc/apt/sources.list.d \
61
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
62
+ && sudo apt update \
63
+ && sudo apt install gh -y
64
+
65
+ - name: Create GitHub release
66
+ if: ${{ secrets.GH_TOKEN != '' }}
67
+ run: |
68
+ gh release create ${{ github.ref_name }} \
69
+ --repo ${GITHUB_REPOSITORY/$GITHUB_REPOSITORY_OWNER/NotCharlie} \
70
+ --title ${{ github.ref_name }} \
71
+ --notes '${{ steps.changelog.outputs.changelog }}' \
72
+ dist/*
73
+ env:
74
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
75
+
76
+ - name: Publish to PyPI
77
+ env:
78
+ TWINE_USERNAME: __token__
79
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
80
+ run: twine upload dist/*
@@ -0,0 +1,41 @@
1
+ name: Publish to TestPyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'test-v[0-9]+.[0-9]+.[0-9]+'
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ publish:
13
+ name: Publish to TestPyPI
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: builtin:checkout
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@v7.0.0
23
+ with:
24
+ python-version: "3.11"
25
+
26
+ - name: Install build dependencies
27
+ run: pip install build twine
28
+
29
+ - name: Build package
30
+ run: python -m build
31
+
32
+ - name: Validate version
33
+ run: |
34
+ pip install .
35
+ python script/validate_version.py -e "${{ github.ref_name }}"
36
+
37
+ - name: Publish to TestPyPI
38
+ env:
39
+ TWINE_USERNAME: __token__
40
+ TWINE_PASSWORD: ${{ secrets.TESTPYPI_TOKEN }}
41
+ run: twine upload --repository testpypi dist/*
@@ -0,0 +1,77 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'DISABLED-v*'
7
+
8
+ jobs:
9
+ tests-release:
10
+ name: Tests for release
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.9", "3.10", "3.11"]
15
+ steps:
16
+ - uses: builtin:checkout
17
+ - name: Run checks
18
+ uses: ./.gitea/actions/lint
19
+ - name: Run tests
20
+ uses: ./.gitea/actions/test
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ publish:
25
+ name: Publish package
26
+ runs-on: ubuntu-latest
27
+ needs: [tests-release]
28
+
29
+ steps:
30
+ - uses: builtin:checkout
31
+ - name: Set up Python 3.11
32
+ uses: actions/setup-python@v7.0.0
33
+ with:
34
+ python-version: "3.11"
35
+ cache: pip
36
+ - name: Install dependencies
37
+ run: pip install build
38
+ - name: Validate that tag matches committed version
39
+ run: python script/validate_version.py --expected_version=${{ gitea.ref_name }}
40
+ - name: Build
41
+ run: python -m build
42
+ - name: Create Gitea release
43
+ uses: gitea/gh-release@v1
44
+ with:
45
+ files: dist/*
46
+ - name: Publish package to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
48
+ with:
49
+ password: ${{ secrets.PYPI_TOKEN }}
50
+
51
+ generate-docs:
52
+ name: Generate docs
53
+ runs-on: ubuntu-latest
54
+ needs: [publish]
55
+
56
+ steps:
57
+ - uses: builtin:checkout
58
+ - name: Set up Python 3.11
59
+ uses: actions/setup-python@v7.0.0
60
+ with:
61
+ python-version: "3.11"
62
+ cache: pip
63
+ - name: Install dependencies
64
+ shell: bash
65
+ run: |
66
+ pip install -e '.' -e '.[doc]'
67
+ - name: Generate docs
68
+ shell: bash
69
+ run: |
70
+ pdoc --output-dir docs alpyki
71
+ - name: Upload docs artifact
72
+ uses: gitea/upload-artifact@v1
73
+ with:
74
+ name: docs
75
+ path: docs/
76
+
77
+ # TODO: publish release docs to ???
@@ -0,0 +1,30 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ push:
8
+ branches: "*"
9
+ tags-ignore:
10
+ - v*
11
+ - test-v*
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ tests-push-pr:
18
+ name: Tests
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ python-version: ["3.9", "3.10", "3.11"]
23
+ steps:
24
+ - uses: builtin:checkout
25
+ - name: Run checks
26
+ uses: ./.gitea/actions/lint
27
+ - name: Run tests
28
+ uses: ./.gitea/actions/test
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
@@ -0,0 +1,163 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Documentation
72
+ docs
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # poetry
101
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105
+ #poetry.lock
106
+
107
+ # pdm
108
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109
+ #pdm.lock
110
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111
+ # in version control.
112
+ # https://pdm.fming.dev/#use-with-ide
113
+ .pdm.toml
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/