craft-application 0.1.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 (109) hide show
  1. craft-application-0.1.0/.editorconfig +43 -0
  2. craft-application-0.1.0/.github/ISSUE_TEMPLATE/bug.yaml +48 -0
  3. craft-application-0.1.0/.github/ISSUE_TEMPLATE/config.yml +11 -0
  4. craft-application-0.1.0/.github/ISSUE_TEMPLATE/task.yaml +27 -0
  5. craft-application-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +5 -0
  6. craft-application-0.1.0/.github/release-drafter.yaml +24 -0
  7. craft-application-0.1.0/.github/release-drafter.yml +24 -0
  8. craft-application-0.1.0/.github/renovate.json5 +101 -0
  9. craft-application-0.1.0/.github/workflows/cla-check.yaml +9 -0
  10. craft-application-0.1.0/.github/workflows/docs.yaml +40 -0
  11. craft-application-0.1.0/.github/workflows/issues.yaml +17 -0
  12. craft-application-0.1.0/.github/workflows/release-drafter.yaml +16 -0
  13. craft-application-0.1.0/.github/workflows/tests.yaml +94 -0
  14. craft-application-0.1.0/.gitignore +141 -0
  15. craft-application-0.1.0/.pre-commit-config.yaml +30 -0
  16. craft-application-0.1.0/.readthedocs.yaml +27 -0
  17. craft-application-0.1.0/.yamllint.yaml +12 -0
  18. craft-application-0.1.0/HACKING.rst +86 -0
  19. craft-application-0.1.0/LICENSE +165 -0
  20. craft-application-0.1.0/PKG-INFO +44 -0
  21. craft-application-0.1.0/README.rst +21 -0
  22. craft-application-0.1.0/craft_application/__init__.py +51 -0
  23. craft-application-0.1.0/craft_application/_version.py +16 -0
  24. craft-application-0.1.0/craft_application/application.py +477 -0
  25. craft-application-0.1.0/craft_application/commands/__init__.py +28 -0
  26. craft-application-0.1.0/craft_application/commands/base.py +76 -0
  27. craft-application-0.1.0/craft_application/commands/lifecycle.py +359 -0
  28. craft-application-0.1.0/craft_application/commands/other.py +51 -0
  29. craft-application-0.1.0/craft_application/errors.py +105 -0
  30. craft-application-0.1.0/craft_application/models/__init__.py +41 -0
  31. craft-application-0.1.0/craft_application/models/base.py +112 -0
  32. craft-application-0.1.0/craft_application/models/constraints.py +70 -0
  33. craft-application-0.1.0/craft_application/models/metadata.py +34 -0
  34. craft-application-0.1.0/craft_application/models/project.py +94 -0
  35. craft-application-0.1.0/craft_application/py.typed +0 -0
  36. craft-application-0.1.0/craft_application/secrets.py +190 -0
  37. craft-application-0.1.0/craft_application/services/__init__.py +31 -0
  38. craft-application-0.1.0/craft_application/services/base.py +59 -0
  39. craft-application-0.1.0/craft_application/services/lifecycle.py +226 -0
  40. craft-application-0.1.0/craft_application/services/package.py +53 -0
  41. craft-application-0.1.0/craft_application/services/provider.py +234 -0
  42. craft-application-0.1.0/craft_application/services/service_factory.py +93 -0
  43. craft-application-0.1.0/craft_application/util/__init__.py +30 -0
  44. craft-application-0.1.0/craft_application/util/error_formatting.py +110 -0
  45. craft-application-0.1.0/craft_application/util/paths.py +34 -0
  46. craft-application-0.1.0/craft_application/util/platforms.py +64 -0
  47. craft-application-0.1.0/craft_application/util/yaml.py +94 -0
  48. craft-application-0.1.0/craft_application.egg-info/PKG-INFO +44 -0
  49. craft-application-0.1.0/craft_application.egg-info/SOURCES.txt +107 -0
  50. craft-application-0.1.0/craft_application.egg-info/dependency_links.txt +1 -0
  51. craft-application-0.1.0/craft_application.egg-info/requires.txt +44 -0
  52. craft-application-0.1.0/craft_application.egg-info/top_level.txt +5 -0
  53. craft-application-0.1.0/docs/_static/css/custom.css +28 -0
  54. craft-application-0.1.0/docs/conf.py +62 -0
  55. craft-application-0.1.0/docs/explanation/index.rst +7 -0
  56. craft-application-0.1.0/docs/howto/index.rst +7 -0
  57. craft-application-0.1.0/docs/index.rst +52 -0
  58. craft-application-0.1.0/docs/reference/index.rst +13 -0
  59. craft-application-0.1.0/docs/tutorials/index.rst +11 -0
  60. craft-application-0.1.0/pyproject.toml +270 -0
  61. craft-application-0.1.0/setup.cfg +4 -0
  62. craft-application-0.1.0/tests/__init__.py +0 -0
  63. craft-application-0.1.0/tests/conftest.py +191 -0
  64. craft-application-0.1.0/tests/integration/__init__.py +0 -0
  65. craft-application-0.1.0/tests/integration/conftest.py +76 -0
  66. craft-application-0.1.0/tests/integration/data/build-secrets/secret-source-folder/source-file.txt +1 -0
  67. craft-application-0.1.0/tests/integration/data/build-secrets/testcraft.yaml +15 -0
  68. craft-application-0.1.0/tests/integration/data/valid_projects/basic/stderr +1 -0
  69. craft-application-0.1.0/tests/integration/data/valid_projects/basic/testcraft.yaml +8 -0
  70. craft-application-0.1.0/tests/integration/data/valid_projects/environment/stderr +1 -0
  71. craft-application-0.1.0/tests/integration/data/valid_projects/environment/testcraft.yaml +14 -0
  72. craft-application-0.1.0/tests/integration/services/__init__.py +0 -0
  73. craft-application-0.1.0/tests/integration/services/test_lifecycle.py +99 -0
  74. craft-application-0.1.0/tests/integration/services/test_provider.py +74 -0
  75. craft-application-0.1.0/tests/integration/services/test_service_factory.py +54 -0
  76. craft-application-0.1.0/tests/integration/test_application.py +346 -0
  77. craft-application-0.1.0/tests/integration/test_version.py +65 -0
  78. craft-application-0.1.0/tests/unit/__init__.py +0 -0
  79. craft-application-0.1.0/tests/unit/commands/__init__.py +0 -0
  80. craft-application-0.1.0/tests/unit/commands/test_base.py +75 -0
  81. craft-application-0.1.0/tests/unit/commands/test_lifecycle.py +513 -0
  82. craft-application-0.1.0/tests/unit/commands/test_other.py +39 -0
  83. craft-application-0.1.0/tests/unit/conftest.py +40 -0
  84. craft-application-0.1.0/tests/unit/models/__init__.py +0 -0
  85. craft-application-0.1.0/tests/unit/models/project_models/basic_project.yaml +5 -0
  86. craft-application-0.1.0/tests/unit/models/project_models/full_project.yaml +15 -0
  87. craft-application-0.1.0/tests/unit/models/project_models/invalid_project.yaml +1 -0
  88. craft-application-0.1.0/tests/unit/models/test_constraints.py +158 -0
  89. craft-application-0.1.0/tests/unit/models/test_project.py +218 -0
  90. craft-application-0.1.0/tests/unit/services/__init__.py +0 -0
  91. craft-application-0.1.0/tests/unit/services/test_lifecycle.py +358 -0
  92. craft-application-0.1.0/tests/unit/services/test_package.py +47 -0
  93. craft-application-0.1.0/tests/unit/services/test_provider.py +397 -0
  94. craft-application-0.1.0/tests/unit/services/test_service_factory.py +140 -0
  95. craft-application-0.1.0/tests/unit/test_application.py +597 -0
  96. craft-application-0.1.0/tests/unit/test_errors.py +63 -0
  97. craft-application-0.1.0/tests/unit/test_nothing.py +2 -0
  98. craft-application-0.1.0/tests/unit/test_secrets.py +154 -0
  99. craft-application-0.1.0/tests/unit/util/__init__.py +0 -0
  100. craft-application-0.1.0/tests/unit/util/invalid_yaml/_README +4 -0
  101. craft-application-0.1.0/tests/unit/util/invalid_yaml/duplicate_second_level.yaml-invalid +3 -0
  102. craft-application-0.1.0/tests/unit/util/invalid_yaml/duplicate_top_level.yaml-invalid +2 -0
  103. craft-application-0.1.0/tests/unit/util/invalid_yaml/unhashable.yaml-invalid +2 -0
  104. craft-application-0.1.0/tests/unit/util/test_error_formatting.py +98 -0
  105. craft-application-0.1.0/tests/unit/util/test_paths.py +26 -0
  106. craft-application-0.1.0/tests/unit/util/test_yaml.py +42 -0
  107. craft-application-0.1.0/tests/unit/util/valid_yaml/empty.yaml +0 -0
  108. craft-application-0.1.0/tox.ini +123 -0
  109. craft-application-0.1.0/venv/bin/activate_this.py +36 -0
@@ -0,0 +1,43 @@
1
+ # Editor configuration options.
2
+ # See: https://spec.editorconfig.org/
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ indent_size = 4
9
+ indent_style = space
10
+ insert_final_newline = true
11
+ max_line_length = 80
12
+ trim_trailing_whitespace = true
13
+
14
+ [.editorconfig]
15
+ max_line_length = off
16
+
17
+ [Makefile]
18
+ indent_style = tab
19
+
20
+ [{*.py,*.pyi}]
21
+ max_line_length = 88
22
+
23
+ [{*.bash,*.sh,*.zsh}]
24
+ indent_size = 2
25
+ tab_width = 2
26
+
27
+ [{*.har,*.json,*.json5}]
28
+ indent_size = 2
29
+ max_line_length = off
30
+
31
+ [{*.markdown,*.md,*.rst}]
32
+ max_line_length = off
33
+ ij_visual_guides = none
34
+
35
+ [{*.toml,Cargo.lock,Cargo.toml.orig,Gopkg.lock,Pipfile,poetry.lock}]
36
+ max_line_length = off
37
+
38
+ [{*.ini, *.cfg}]
39
+ max_line_length = off
40
+
41
+ [{*.yaml,*.yml}]
42
+ indent_size = 2
43
+ max_line_length = off
@@ -0,0 +1,48 @@
1
+ name: Bug Report
2
+ description: File a bug report
3
+ labels: "Bug"
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: >
8
+ Thanks for taking the time to fill out this bug report! Before
9
+ submitting your issue, make sure this has not been already
10
+ reported or if it works with the latest version of the library.
11
+ - type: textarea
12
+ id: bug-description
13
+ attributes:
14
+ label: Bug Description
15
+ description: >
16
+ If applicable, add screenshots to help explain your
17
+ problem.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: reproduction
22
+ attributes:
23
+ label: To Reproduce
24
+ description: >
25
+ Provide a step-by-step instruction of how to reproduce the behavior.
26
+ validations:
27
+ required: true
28
+ - type: textarea
29
+ id: part_yaml
30
+ attributes:
31
+ label: part yaml
32
+ description: >
33
+ If possible, please paste the yaml spec that causes the
34
+ failure. This will be automatically formatted into code, so no
35
+ need for backticks.
36
+ render: shell
37
+ validations:
38
+ required: false
39
+ - type: textarea
40
+ id: logs
41
+ attributes:
42
+ label: Relevant log output
43
+ description: >
44
+ Please copy and paste any relevant log output. This will be
45
+ automatically formatted into code, so no need for backticks.
46
+ render: shell
47
+ validations:
48
+ required: true
@@ -0,0 +1,11 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Charmcraft Discourse
4
+ url: https://discourse.charmhub.io/c/charmcraft/3
5
+ about: Issues creating charms
6
+ - name: Snapcraft Discourse
7
+ url: https://forum.snapcraft.io/c/snapcraft/13
8
+ about: Issues creating snaps
9
+ - name: Rockcraft Discourse
10
+ url: https://discourse.ubuntu.com/c/rocks/117
11
+ about: Issues creating ROCKs
@@ -0,0 +1,27 @@
1
+ name: Task
2
+ description: File an enhancement proposal
3
+ labels: "Enhancement"
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: >
8
+ Thanks for taking the time to fill out this enhancement
9
+ proposal! Before submitting your issue, please make sure there
10
+ isn't already a prior issue concerning this. If there is,
11
+ please join that discussion instead.
12
+ - type: textarea
13
+ id: enhancement-proposal-what
14
+ attributes:
15
+ label: What needs to get done
16
+ description: >
17
+ Describe what needs to get done
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: enhancement-proposal-why
22
+ attributes:
23
+ label: Why it needs to get done
24
+ description: >
25
+ Describe why it needs to get done
26
+ validations:
27
+ required: true
@@ -0,0 +1,5 @@
1
+ - [ ] Have you followed the guidelines for contributing?
2
+ - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
3
+ - [ ] Have you successfully run `tox`?
4
+
5
+ -----
@@ -0,0 +1,24 @@
1
+ categories:
2
+ - title: "New Features"
3
+ labels:
4
+ - "enhancement"
5
+ - title: "Maintenance"
6
+ labels:
7
+ - "maintenance"
8
+ - title: "Bug Fixes"
9
+ labels:
10
+ - "bug"
11
+ - title: "Specifications and Documentation"
12
+ label:
13
+ - "specification"
14
+ - "doc"
15
+ - title: "Tooling"
16
+ label:
17
+ - "tooling"
18
+ change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
19
+ template: |
20
+ Special thanks to the contributors that made this release happen: $CONTRIBUTORS
21
+
22
+ ## Full list of changes
23
+
24
+ $CHANGES
@@ -0,0 +1,24 @@
1
+ categories:
2
+ - title: "New Features"
3
+ labels:
4
+ - "enhancement"
5
+ - title: "Maintenance"
6
+ labels:
7
+ - "maintenance"
8
+ - title: "Bug Fixes"
9
+ labels:
10
+ - "bug"
11
+ - title: "Specifications and Documentation"
12
+ label:
13
+ - "specification"
14
+ - "doc"
15
+ - title: "Tooling"
16
+ label:
17
+ - "tooling"
18
+ change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
19
+ template: |
20
+ Special thanks to the contributors that made this release happen: $CONTRIBUTORS
21
+
22
+ ## Full list of changes
23
+
24
+ $CHANGES
@@ -0,0 +1,101 @@
1
+ {
2
+ // Configuration file for RenovateBot: https://docs.renovatebot.com/configuration-options
3
+ extends: ["config:base"],
4
+ labels: ["dependencies"], // For convenient searching in GitHub
5
+ pip_requirements: {
6
+ fileMatch: ["^tox.ini$", "(^|/)requirements([\\w-]*)\\.txt$"]
7
+ },
8
+ packageRules: [
9
+ {
10
+ // Automerge patches, pin changes and digest changes.
11
+ // Also groups these changes together.
12
+ groupName: "bugfixes",
13
+ excludePackagePrefixes: ["dev", "lint", "types"],
14
+ matchUpdateTypes: ["patch", "pin", "digest"],
15
+ prPriority: 3, // Patches should go first!
16
+ automerge: true
17
+ },
18
+ {
19
+ // Update all internal packages in one higher-priority PR
20
+ groupName: "internal packages",
21
+ matchPackagePrefixes: ["craft-", "snap-"],
22
+ matchLanguages: ["python"],
23
+ prPriority: 2
24
+ },
25
+ {
26
+ // GitHub Actions are higher priority to update than most dependencies.
27
+ groupName: "GitHub Actions",
28
+ matchManagers: ["github-actions"],
29
+ prPriority: 1,
30
+ automerge: true,
31
+ },
32
+ // Everything not in one of these rules gets priority 0 and falls here.
33
+ {
34
+ // Minor changes can be grouped and automerged for dev dependencies, but are also deprioritised.
35
+ groupName: "development dependencies (non-major)",
36
+ groupSlug: "dev-dependencies",
37
+ matchPackagePrefixes: [
38
+ "dev",
39
+ "lint",
40
+ "types"
41
+ ],
42
+ excludePackagePatterns: ["ruff"],
43
+ matchUpdateTypes: ["minor", "patch", "pin", "digest"],
44
+ prPriority: -1,
45
+ automerge: true
46
+ },
47
+ {
48
+ // Documentation related updates
49
+ groupName: "documentation dependencies",
50
+ groupSlug: "doc-dependencies",
51
+ matchPackageNames: ["Sphinx"],
52
+ matchPackagePatterns: ["^[Ss]phinx.*$", "^furo$"],
53
+ matchPackagePrefixes: ["docs"],
54
+ },
55
+ {
56
+ // Other major dependencies get deprioritised below minor dev dependencies.
57
+ matchUpdateTypes: ["major"],
58
+ prPriority: -2
59
+ },
60
+ {
61
+ // Major dev dependencies are stone last, but grouped.
62
+ groupName: "development dependencies (major versions)",
63
+ groupSlug: "dev-dependencies",
64
+ matchDepTypes: ["devDependencies"],
65
+ matchUpdateTypes: ["major"],
66
+ prPriority: -3
67
+ },
68
+ {
69
+ // Ruff is still unstable, so update it separately.
70
+ groupName: "ruff",
71
+ matchPackagePatterns: ["^(lint/)?ruff$"],
72
+ prPriority: -3
73
+ }
74
+ ],
75
+ regexManagers: [
76
+ {
77
+ // tox.ini can get updates too if we specify for each package.
78
+ fileMatch: ["tox.ini"],
79
+ depTypeTemplate: "devDependencies",
80
+ matchStrings: [
81
+ "# renovate: datasource=(?<datasource>\\S+)\n\\s+(?<depName>.*?)(\\[[\\w]*\\])*[=><]=?(?<currentValue>.*?)\n"
82
+ ]
83
+ },
84
+ {
85
+ // .pre-commit-config.yaml version updates
86
+ fileMatch: [".pre-commit-config.yaml"],
87
+ depTypeTemplate: "devDependencies",
88
+ matchStrings: [
89
+ "# renovate: datasource=(?<datasource>\\S+);\\s*depName=(?<depName>.*?)\n\s+rev: \"v?(?<currentValue>.*?)\""
90
+ ]
91
+ }
92
+ ],
93
+ timezone: "Etc/UTC",
94
+ automergeSchedule: "every weekend",
95
+ schedule: "every weekend",
96
+ prConcurrentLimit: 2, // No more than 2 open PRs at a time.
97
+ prCreation: "not-pending", // Wait until status checks have completed before raising the PR
98
+ prNotPendingHours: 4, // ...unless the status checks have been running for 4+ hours.
99
+ prHourlyLimit: 1, // No more than 1 PR per hour.
100
+ stabilityDays: 2 // Wait 2 days from release before updating.
101
+ }
@@ -0,0 +1,9 @@
1
+ name: cla-check
2
+ on: [pull_request]
3
+
4
+ jobs:
5
+ cla-check:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - name: Check if CLA signed
9
+ uses: canonical/has-signed-canonical-cla@v1
@@ -0,0 +1,40 @@
1
+ name: Documentation
2
+ on:
3
+ push:
4
+ branches:
5
+ - "main"
6
+ - "feature/*"
7
+ - "hotfix/*"
8
+ - "release/*"
9
+ pull_request:
10
+ paths:
11
+ - "docs/**"
12
+ - "pyproject.toml"
13
+ - ".github/workflows/docs.yaml"
14
+
15
+ jobs:
16
+ sphinx:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0
23
+ - name: Setup Python
24
+ uses: actions/setup-python@v4
25
+ with:
26
+ python-version: '3.11'
27
+ - name: Install prerequisites
28
+ run: |
29
+ sudo apt update
30
+ sudo apt-get install -y libapt-pkg-dev
31
+ pip install tox
32
+ - name: Lint documentation
33
+ run: tox run -e lint-docs
34
+ - name: Build documentation
35
+ run: tox run -e build-docs
36
+ - name: Upload documentation
37
+ uses: actions/upload-artifact@v3
38
+ with:
39
+ name: docs
40
+ path: docs/_build/
@@ -0,0 +1,17 @@
1
+ # this workflow requires to provide JIRA webhook URL via JIRA_URL GitHub Secret
2
+ # read more: https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Automationtriggers-Incomingwebhook
3
+ # original code source: https://github.com/beliaev-maksim/github-to-jira-automation
4
+
5
+ name: Issues to JIRA
6
+
7
+ on:
8
+ issues:
9
+ # available via github.event.action
10
+ types: [opened, reopened, closed]
11
+
12
+ jobs:
13
+ update:
14
+ name: Update Issue
15
+ uses: beliaev-maksim/github-to-jira-automation/.github/workflows/issues_to_jira.yaml@master
16
+ secrets:
17
+ JIRA_URL: ${{ secrets.JIRA_URL }}
@@ -0,0 +1,16 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ # branches to consider in the event; optional, defaults to all
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ update_release_draft:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Release Drafter
14
+ uses: release-drafter/release-drafter@v5.25.0
15
+ env:
16
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,94 @@
1
+ name: Tests, linting, etc.
2
+ on:
3
+ push:
4
+ branches:
5
+ - "main"
6
+ - "feature/*"
7
+ - "hotfix/*"
8
+ - "release/*"
9
+ pull_request:
10
+
11
+ jobs:
12
+ linters:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+ - name: Setup Python
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: '3.11'
23
+ cache: 'pip'
24
+ - name: Configure environment
25
+ run: |
26
+ echo "::group::Begin snap install"
27
+ echo "Installing snaps in the background while running apt and pip..."
28
+ sudo snap install --no-wait --classic pyright
29
+ sudo snap install --no-wait shellcheck
30
+ echo "::endgroup::"
31
+ echo "::group::apt-get"
32
+ sudo apt update
33
+ sudo apt-get install -y libapt-pkg-dev
34
+ echo "::endgroup::"
35
+ echo "::group::pip install"
36
+ python -m pip install tox
37
+ echo "::endgroup::"
38
+ echo "::group::Create virtual environments for linting processes."
39
+ tox run -m lint --notest
40
+ echo "::endgroup::"
41
+ echo "::group::Wait for snap to complete"
42
+ snap watch --last=install
43
+ echo "::endgroup::"
44
+ - name: Run Linters
45
+ run: .tox/.tox/bin/tox run --skip-pkg-install --no-list-dependencies -m lint
46
+ tests:
47
+ strategy:
48
+ matrix:
49
+ platform: [ubuntu-20.04, ubuntu-22.04]
50
+ runs-on: ${{ matrix.platform }}
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ with:
54
+ fetch-depth: 0
55
+ - name: Set up Python versions on ${{ matrix.platform }}
56
+ uses: actions/setup-python@v4
57
+ with:
58
+ python-version: |
59
+ 3.8
60
+ 3.10
61
+ 3.11
62
+ 3.12-dev
63
+ cache: 'pip'
64
+ - name: Setup LXD
65
+ uses: canonical/setup-lxd@v0.1.1
66
+ with:
67
+ channel: latest/stable
68
+ - name: Configure environment
69
+ run: |
70
+ echo "::group::apt-get"
71
+ sudo apt update
72
+ sudo apt-get install -y libapt-pkg-dev
73
+ echo "::endgroup::"
74
+ echo "::group::pip install"
75
+ python -m pip install tox
76
+ echo "::endgroup::"
77
+ mkdir -p results
78
+ - name: Setup Tox environments
79
+ run: tox run -m tests --notest
80
+ - name: Test with tox
81
+ run: .tox/.tox/bin/tox run --skip-pkg-install --no-list-dependencies --result-json results/tox-${{ matrix.platform }}.json -m tests
82
+ env:
83
+ PYTEST_ADDOPTS: "--no-header -vv -rN"
84
+ - name: Upload code coverage
85
+ uses: codecov/codecov-action@v3
86
+ with:
87
+ directory: ./results/
88
+ files: coverage*.xml
89
+ - name: Upload test results
90
+ if: success() || failure()
91
+ uses: actions/upload-artifact@v3
92
+ with:
93
+ name: test-results-${{ matrix.platform }}
94
+ path: results/
@@ -0,0 +1,141 @@
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
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
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
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # Caches for various tools
132
+ /.*_cache/
133
+
134
+ # Test results
135
+ /results/
136
+
137
+ # direnv
138
+ .envrc
139
+
140
+ # Ignore version module generated by setuptools_scm
141
+ /*/_version.py
@@ -0,0 +1,30 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v4.4.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ - id: check-added-large-files
11
+ - id: check-merge-conflict
12
+ - id: check-toml
13
+ - id: fix-byte-order-marker
14
+ - id: mixed-line-ending
15
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
16
+ # renovate: datasource=pypi;depName=ruff
17
+ rev: "v0.0.267"
18
+ hooks:
19
+ - id: ruff
20
+ args: [--fix, --exit-non-zero-on-fix]
21
+ - repo: https://github.com/psf/black
22
+ # renovate: datasource=pypi;depName=black
23
+ rev: "23.3.0"
24
+ hooks:
25
+ - id: black
26
+ - repo: https://github.com/adrienverge/yamllint.git
27
+ # renovate: datasource=pypi;depName=yamllint
28
+ rev: "v1.31.0"
29
+ hooks:
30
+ - id: yamllint
@@ -0,0 +1,27 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Build documentation in the docs/ directory with Sphinx
9
+ sphinx:
10
+ configuration: docs/conf.py
11
+
12
+ # Optionally build your docs in additional formats such as PDF
13
+ formats:
14
+ - pdf
15
+ - epub
16
+
17
+ build:
18
+ os: ubuntu-22.04
19
+ tools:
20
+ python: "3"
21
+
22
+ python:
23
+ install:
24
+ - method: pip
25
+ path: .
26
+ extra_requirements:
27
+ - docs
@@ -0,0 +1,12 @@
1
+ ---
2
+ ignore-from-file: [.gitignore]
3
+
4
+ extends: default
5
+
6
+ rules:
7
+ document-start: disable
8
+ float-values: enable
9
+ line-length: disable
10
+ octal-values: enable
11
+ truthy:
12
+ check-keys: false