granite-common 0.1.dev19__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 (52) hide show
  1. granite_common-0.1.dev19/.github/actions/free-disk-space/action.yml +27 -0
  2. granite_common-0.1.dev19/.github/dependabot.yml +15 -0
  3. granite_common-0.1.dev19/.github/workflows/actionlint.dockerfile +3 -0
  4. granite_common-0.1.dev19/.github/workflows/actionlint.yml +49 -0
  5. granite_common-0.1.dev19/.github/workflows/lint.yml +81 -0
  6. granite_common-0.1.dev19/.github/workflows/matchers/actionlint.json +18 -0
  7. granite_common-0.1.dev19/.github/workflows/matchers/pylint.json +33 -0
  8. granite_common-0.1.dev19/.github/workflows/pypi.yml +123 -0
  9. granite_common-0.1.dev19/.github/workflows/test.yml +79 -0
  10. granite_common-0.1.dev19/.gitignore +200 -0
  11. granite_common-0.1.dev19/.isort.cfg +11 -0
  12. granite_common-0.1.dev19/.pre-commit-config.yaml +15 -0
  13. granite_common-0.1.dev19/.pylintrc +655 -0
  14. granite_common-0.1.dev19/LICENSE +201 -0
  15. granite_common-0.1.dev19/PKG-INFO +94 -0
  16. granite_common-0.1.dev19/README.md +43 -0
  17. granite_common-0.1.dev19/pyproject.toml +131 -0
  18. granite_common-0.1.dev19/scripts/env.sh +129 -0
  19. granite_common-0.1.dev19/setup.cfg +4 -0
  20. granite_common-0.1.dev19/src/granite_common/.gitignore +3 -0
  21. granite_common-0.1.dev19/src/granite_common/__init__.py +41 -0
  22. granite_common-0.1.dev19/src/granite_common/_version.py +21 -0
  23. granite_common-0.1.dev19/src/granite_common/base/__init__.py +6 -0
  24. granite_common-0.1.dev19/src/granite_common/base/io.py +66 -0
  25. granite_common-0.1.dev19/src/granite_common/base/types.py +217 -0
  26. granite_common-0.1.dev19/src/granite_common/granite3/__init__.py +10 -0
  27. granite_common-0.1.dev19/src/granite_common/granite3/constants.py +25 -0
  28. granite_common-0.1.dev19/src/granite_common/granite3/granite32/__init__.py +16 -0
  29. granite_common-0.1.dev19/src/granite_common/granite3/granite32/constants.py +90 -0
  30. granite_common-0.1.dev19/src/granite_common/granite3/granite32/input.py +300 -0
  31. granite_common-0.1.dev19/src/granite_common/granite3/granite32/output.py +681 -0
  32. granite_common-0.1.dev19/src/granite_common/granite3/granite32/types.py +41 -0
  33. granite_common-0.1.dev19/src/granite_common/granite3/granite33/__init__.py +16 -0
  34. granite_common-0.1.dev19/src/granite_common/granite3/granite33/constants.py +94 -0
  35. granite_common-0.1.dev19/src/granite_common/granite3/granite33/input.py +209 -0
  36. granite_common-0.1.dev19/src/granite_common/granite3/granite33/output.py +633 -0
  37. granite_common-0.1.dev19/src/granite_common/granite3/granite33/types.py +39 -0
  38. granite_common-0.1.dev19/src/granite_common/granite3/input.py +116 -0
  39. granite_common-0.1.dev19/src/granite_common/granite3/io.py +0 -0
  40. granite_common-0.1.dev19/src/granite_common/granite3/output.py +251 -0
  41. granite_common-0.1.dev19/src/granite_common/granite3/types.py +160 -0
  42. granite_common-0.1.dev19/src/granite_common/util.py +68 -0
  43. granite_common-0.1.dev19/src/granite_common.egg-info/PKG-INFO +94 -0
  44. granite_common-0.1.dev19/src/granite_common.egg-info/SOURCES.txt +50 -0
  45. granite_common-0.1.dev19/src/granite_common.egg-info/dependency_links.txt +1 -0
  46. granite_common-0.1.dev19/src/granite_common.egg-info/requires.txt +33 -0
  47. granite_common-0.1.dev19/src/granite_common.egg-info/top_level.txt +1 -0
  48. granite_common-0.1.dev19/tests/conftest.py +5 -0
  49. granite_common-0.1.dev19/tests/granite_common/base/test_types.py +54 -0
  50. granite_common-0.1.dev19/tests/granite_common/granite3/test_granite32.py +471 -0
  51. granite_common-0.1.dev19/tests/granite_common/granite3/test_granite33.py +484 -0
  52. granite_common-0.1.dev19/tox.ini +98 -0
@@ -0,0 +1,27 @@
1
+ name: 'Free Disk Space'
2
+ description: 'Frees disk space on the runner'
3
+ runs:
4
+ using: "composite"
5
+ steps:
6
+ - name: Print disk space before cleanup
7
+ run: |
8
+ df -h
9
+ shell: bash
10
+ - name: Free Disk Space Linux
11
+ if: runner.os == 'Linux'
12
+ run: |
13
+ sudo docker rmi "$(docker image ls -aq)" >/dev/null 2>&1 || true
14
+ sudo rm -rf \
15
+ /usr/share/dotnet /usr/local/lib/android /opt/ghc \
16
+ /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
17
+ /usr/lib/jvm || true
18
+ sudo apt install aptitude -y >/dev/null 2>&1
19
+ sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
20
+ sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
21
+ sudo apt-get autoremove -y >/dev/null 2>&1
22
+ sudo apt-get autoclean -y >/dev/null 2>&1
23
+ shell: bash
24
+ - name: Print disk space after cleanup
25
+ run: |
26
+ df -h
27
+ shell: bash
@@ -0,0 +1,15 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+
3
+ # GitHub Dependabot configuration file
4
+ version: 2
5
+ updates:
6
+ # Maintain dependencies for GitHub Actions
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
11
+ # Maintain dependencies for Python
12
+ - package-ecosystem: "pip"
13
+ directory: "/"
14
+ schedule:
15
+ interval: "daily"
@@ -0,0 +1,3 @@
1
+ # Since dependabot cannot update workflows using docker,
2
+ # we use this indirection since dependabot can update this file.
3
+ FROM rhysd/actionlint:1.7.4@sha256:82244e1db1c60d82c7792180a48dd0bcb838370bb589d53ff132503fc9485868
@@ -0,0 +1,49 @@
1
+ name: Lint GitHub Actions workflows
2
+ on:
3
+ push:
4
+ branches:
5
+ - "main"
6
+ - "release-**"
7
+ paths:
8
+ - '.github/workflows/*.ya?ml'
9
+ - '.github/workflows/actionlint.*' # This workflow
10
+ pull_request:
11
+ branches:
12
+ - "main"
13
+ - "release-**"
14
+ paths:
15
+ - '.github/workflows/*.ya?ml'
16
+ - '.github/workflows/actionlint.*' # This workflow
17
+
18
+ env:
19
+ LC_ALL: en_US.UTF-8
20
+
21
+ defaults:
22
+ run:
23
+ shell: bash
24
+
25
+ permissions:
26
+ contents: read
27
+
28
+ jobs:
29
+ actionlint:
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: "Harden Runner"
33
+ uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
34
+ with:
35
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
36
+
37
+ - name: "Checkout"
38
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39
+ with:
40
+ fetch-depth: 0
41
+
42
+ - name: "Download actionlint"
43
+ run: |
44
+ docker build --tag actionlint - < .github/workflows/actionlint.dockerfile
45
+
46
+ - name: "Check workflow files"
47
+ run: |
48
+ echo "::add-matcher::.github/workflows/matchers/actionlint.json"
49
+ docker run --volume="${PWD}:/repo" --workdir=/repo actionlint -color
@@ -0,0 +1,81 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "main"
7
+ - "release-**"
8
+ paths:
9
+ - '**.py'
10
+ - 'pyproject.toml'
11
+ - 'tox.ini'
12
+ - '.pylintrc'
13
+ - '.github/workflows/lint.yml' # This workflow
14
+ pull_request:
15
+ branches:
16
+ - "main"
17
+ - "release-**"
18
+ paths:
19
+ - '**.py'
20
+ - 'pyproject.toml'
21
+ - 'tox.ini'
22
+ - '.pylintrc'
23
+ - '.github/workflows/lint.yml' # This workflow
24
+
25
+ env:
26
+ LC_ALL: en_US.UTF-8
27
+
28
+ defaults:
29
+ run:
30
+ shell: bash
31
+
32
+ permissions:
33
+ contents: read
34
+
35
+ jobs:
36
+ lint:
37
+ runs-on: ubuntu-latest
38
+ name: "lint: ${{ matrix.lint.name }}"
39
+ strategy:
40
+ fail-fast: false
41
+ matrix:
42
+ lint:
43
+ - name: "ruff"
44
+ commands: |
45
+ tox -e ruff
46
+ - name: "pylint"
47
+ commands: |
48
+ echo "::add-matcher::.github/workflows/matchers/pylint.json"
49
+ tox -e lint
50
+
51
+ steps:
52
+ - name: "Harden Runner"
53
+ uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
54
+ with:
55
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
56
+
57
+ - name: "Checkout"
58
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59
+ with:
60
+ # https://github.com/actions/checkout/issues/249
61
+ fetch-depth: 0
62
+
63
+ - name: Free disk space
64
+ uses: ./.github/actions/free-disk-space
65
+
66
+ - name: Setup Python 3.11
67
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
68
+ with:
69
+ python-version: 3.11
70
+ cache: pip
71
+ cache-dependency-path: |
72
+ **/pyproject.toml
73
+
74
+ - name: "Install tox"
75
+ run: |
76
+ python -m pip install --upgrade pip
77
+ python -m pip install tox tox-gh
78
+
79
+ - name: "${{ matrix.lint.name }}"
80
+ run: |
81
+ ${{ matrix.lint.commands }}
@@ -0,0 +1,18 @@
1
+ {
2
+ "problemMatcher": [
3
+ {
4
+ "owner": "actionlint",
5
+ "pattern": [
6
+ {
7
+ "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
8
+ "file": 1,
9
+ "line": 2,
10
+ "column": 3,
11
+ "message": 4,
12
+ "code": 5
13
+ }
14
+ ]
15
+ }
16
+ ]
17
+ }
18
+
@@ -0,0 +1,33 @@
1
+ {
2
+ "problemMatcher": [
3
+ {
4
+ "owner": "pylint-error",
5
+ "severity": "error",
6
+ "pattern": [
7
+ {
8
+ "regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{4}):\\s.+)$",
9
+ "file": 1,
10
+ "line": 2,
11
+ "column": 3,
12
+ "message": 4,
13
+ "code": 5
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "owner": "pylint-warning",
19
+ "severity": "warning",
20
+ "pattern": [
21
+ {
22
+ "regexp": "^(.+):(\\d+):(\\d+):\\s(([CRW]\\d{4}):\\s.+)$",
23
+ "file": 1,
24
+ "line": 2,
25
+ "column": 3,
26
+ "message": 4,
27
+ "code": 5
28
+ }
29
+ ]
30
+ }
31
+ ]
32
+ }
33
+
@@ -0,0 +1,123 @@
1
+ name: Build, test, and upload PyPI package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - "release-**"
8
+ tags:
9
+ - "v*"
10
+ pull_request:
11
+ branches:
12
+ - main
13
+ - "release-**"
14
+ release:
15
+ types:
16
+ - published
17
+
18
+ env:
19
+ LC_ALL: en_US.UTF-8
20
+
21
+ defaults:
22
+ run:
23
+ shell: bash
24
+
25
+ permissions:
26
+ contents: read
27
+
28
+ jobs:
29
+ # Create and verify release artifacts
30
+ # - build source dist (tar ball) and wheel
31
+ # - validate artifacts with various tools
32
+ # - upload artifacts to GHA
33
+ build-package:
34
+ name: Build and check packages
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - name: "Harden Runner"
38
+ uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
39
+ with:
40
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
41
+
42
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43
+ with:
44
+ # for setuptools-scm
45
+ fetch-depth: 0
46
+
47
+ - uses: hynek/build-and-inspect-python-package@c52c3a4710070b50470d903818a7b25115dcd076 # v2.13.0
48
+
49
+ # push to Test PyPI on
50
+ # - a new GitHub release is published
51
+ # - a PR is merged into main branch
52
+ publish-test-pypi:
53
+ name: Publish packages to test.pypi.org
54
+ if: |
55
+ github.repository_owner == 'ibm-granite' && (
56
+ github.event.action == 'published' ||
57
+ (github.event_name == 'push' && github.ref == 'refs/heads/main')
58
+ )
59
+ permissions:
60
+ contents: read
61
+ # see https://docs.pypi.org/trusted-publishers/
62
+ id-token: write
63
+ runs-on: ubuntu-latest
64
+ needs: build-package
65
+
66
+ steps:
67
+ - name: "Harden Runner"
68
+ uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
69
+ with:
70
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
71
+
72
+ - name: Fetch build artifacts
73
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
74
+ with:
75
+ name: Packages
76
+ path: dist
77
+
78
+ - name: Upload to Test PyPI
79
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
80
+ with:
81
+ repository-url: https://test.pypi.org/legacy/
82
+
83
+ # push to Production PyPI on
84
+ # - a new GitHub release is published
85
+ publish-pypi:
86
+ name: Publish release to pypi.org
87
+ if: |
88
+ github.repository_owner == 'ibm-granite' && github.event.action == 'published'
89
+ permissions:
90
+ # see https://docs.pypi.org/trusted-publishers/
91
+ id-token: write
92
+ # allow gh release upload
93
+ contents: write
94
+
95
+ runs-on: ubuntu-latest
96
+ needs: build-package
97
+
98
+ steps:
99
+ - name: "Harden Runner"
100
+ uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
101
+ with:
102
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
103
+
104
+ - name: Fetch build artifacts
105
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
106
+ with:
107
+ name: Packages
108
+ path: dist
109
+
110
+ - uses: sigstore/gh-action-sigstore-python@f7ad0af51a5648d09a20d00370f0a91c3bdf8f84 # v3.0.1
111
+ with:
112
+ inputs: >-
113
+ ./dist/*.tar.gz
114
+ ./dist/*.whl
115
+ release-signing-artifacts: false
116
+
117
+ # PyPI does not accept .sigstore artifacts and
118
+ # gh-action-pypi-publish has no option to ignore them.
119
+ - name: Remove sigstore signatures before uploading to PyPI
120
+ run: rm ./dist/*.sigstore.json
121
+
122
+ - name: Upload to PyPI
123
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
@@ -0,0 +1,79 @@
1
+ name: Test
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - "main"
8
+ - "release-**"
9
+ paths:
10
+ - '**.py'
11
+ - 'pyproject.toml'
12
+ - 'tox.ini'
13
+ - '.github/workflows/test.yml' # This workflow
14
+ pull_request:
15
+ branches:
16
+ - "main"
17
+ - "release-**"
18
+ paths:
19
+ - 'src/**.py'
20
+ - 'tests/**.py'
21
+ - 'pyproject.toml'
22
+ - 'tox.ini'
23
+ - '.github/workflows/test.yml' # This workflow
24
+
25
+ env:
26
+ LC_ALL: en_US.UTF-8
27
+
28
+ defaults:
29
+ run:
30
+ shell: bash
31
+
32
+ permissions:
33
+ contents: read
34
+
35
+ jobs:
36
+ test:
37
+ name: "test: ${{ matrix.python }} on ${{ matrix.platform }}"
38
+ runs-on: "${{ matrix.platform }}"
39
+ strategy:
40
+ matrix:
41
+ python:
42
+ - "3.10"
43
+ - "3.11"
44
+ platform:
45
+ - "ubuntu-latest"
46
+
47
+ steps:
48
+ - name: "Harden Runner"
49
+ uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
50
+ with:
51
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
52
+
53
+ - name: Checkout
54
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
55
+ with:
56
+ # https://github.com/actions/checkout/issues/249
57
+ fetch-depth: 0
58
+
59
+ - name: Free disk space
60
+ uses: ./.github/actions/free-disk-space
61
+
62
+ - name: Setup Python ${{ matrix.python }}
63
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
64
+ with:
65
+ python-version: ${{ matrix.python }}
66
+ cache: pip
67
+ cache-dependency-path: |
68
+ **/pyproject.toml
69
+
70
+ - name: Install dependencies
71
+ run: |
72
+ python -m pip install --upgrade pip
73
+ python -m pip install tox tox-gh>=1.2
74
+
75
+ - name: "Run unit tests"
76
+ # -n 1 to avoid running out of memory.
77
+ run: |
78
+ tox -e unit -- -n 1
79
+
@@ -0,0 +1,200 @@
1
+ # Local bootstrap conda environment
2
+ env
3
+
4
+ # User-specific config files
5
+ .vscode
6
+
7
+ # Byte-compiled / optimized / DLL files
8
+ __pycache__/
9
+ *.py[cod]
10
+ *$py.class
11
+
12
+ # C extensions
13
+ *.so
14
+
15
+ # Distribution / packaging
16
+ .Python
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
+ share/python-wheels/
30
+ *.egg-info/
31
+ .installed.cfg
32
+ *.egg
33
+ MANIFEST
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ *.py,cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+ cover/
59
+
60
+ # Translations
61
+ *.mo
62
+ *.pot
63
+
64
+ # Django stuff:
65
+ *.log
66
+ local_settings.py
67
+ db.sqlite3
68
+ db.sqlite3-journal
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ .pybuilder/
82
+ target/
83
+
84
+ # Jupyter Notebook
85
+ .ipynb_checkpoints
86
+
87
+ # IPython
88
+ profile_default/
89
+ ipython_config.py
90
+
91
+ # pyenv
92
+ # For a library or package, you might want to ignore these files since the code is
93
+ # intended to run in multiple environments; otherwise, check them in:
94
+ # .python-version
95
+
96
+ # pipenv
97
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
99
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
100
+ # install all needed dependencies.
101
+ #Pipfile.lock
102
+
103
+ # UV
104
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ #uv.lock
108
+
109
+ # poetry
110
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114
+ #poetry.lock
115
+
116
+ # pdm
117
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118
+ #pdm.lock
119
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
120
+ # in version control.
121
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
122
+ .pdm.toml
123
+ .pdm-python
124
+ .pdm-build/
125
+
126
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
127
+ __pypackages__/
128
+
129
+ # Celery stuff
130
+ celerybeat-schedule
131
+ celerybeat.pid
132
+
133
+ # SageMath parsed files
134
+ *.sage.py
135
+
136
+ # Environments
137
+ .env
138
+ .venv
139
+ env/
140
+ venv/
141
+ ENV/
142
+ env.bak/
143
+ venv.bak/
144
+
145
+ # Spyder project settings
146
+ .spyderproject
147
+ .spyproject
148
+
149
+ # Rope project settings
150
+ .ropeproject
151
+
152
+ # mkdocs documentation
153
+ /site
154
+
155
+ # mypy
156
+ .mypy_cache/
157
+ .dmypy.json
158
+ dmypy.json
159
+
160
+ # Pyre type checker
161
+ .pyre/
162
+
163
+ # pytype static type analyzer
164
+ .pytype/
165
+
166
+ # Cython debug symbols
167
+ cython_debug/
168
+
169
+ # PyCharm
170
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
171
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
172
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
173
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
174
+ #.idea/
175
+
176
+ # Abstra
177
+ # Abstra is an AI-powered process automation framework.
178
+ # Ignore directories containing user credentials, local state, and settings.
179
+ # Learn more at https://abstra.io/docs
180
+ .abstra/
181
+
182
+ # Visual Studio Code
183
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
184
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
185
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
186
+ # you could uncomment the following to ignore the enitre vscode folder
187
+ # .vscode/
188
+
189
+ # Ruff stuff:
190
+ .ruff_cache/
191
+
192
+ # PyPI configuration file
193
+ .pypirc
194
+
195
+ # Cursor
196
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
197
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
198
+ # refer to https://docs.cursor.com/context/ignore-files
199
+ .cursorignore
200
+ .cursorindexingignore
@@ -0,0 +1,11 @@
1
+ [settings]
2
+ profile=black
3
+ from_first=true
4
+ import_heading_future=Future
5
+ import_heading_stdlib=Standard
6
+ import_heading_thirdparty=Third Party
7
+ import_heading_firstparty=First Party
8
+ import_heading_localfolder=Local
9
+ known_firstparty=""
10
+ known_localfolder=tests
11
+ extend_skip=src/granite_common/_version.py
@@ -0,0 +1,15 @@
1
+ repos:
2
+ - repo: https://github.com/PyCQA/isort
3
+ rev: 6.0.1
4
+ hooks:
5
+ - id: isort
6
+ exclude: imports
7
+ - repo: https://github.com/astral-sh/ruff-pre-commit
8
+ # Ruff version.
9
+ rev: v0.9.10
10
+ hooks:
11
+ # Run the linter (most fixers are disabled for now).
12
+ - id: ruff
13
+ # Run the formatter.
14
+ - id: ruff-format
15
+