toga-code-editor 0.1.1__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 (46) hide show
  1. toga_code_editor-0.1.1/.github/dependabot.yml +30 -0
  2. toga_code_editor-0.1.1/.github/workflows/check-pr-template.yml +12 -0
  3. toga_code_editor-0.1.1/.github/workflows/ci.yml +159 -0
  4. toga_code_editor-0.1.1/.github/workflows/dependabot-changenote.yml +19 -0
  5. toga_code_editor-0.1.1/.github/workflows/new-issue.yml +21 -0
  6. toga_code_editor-0.1.1/.github/workflows/publish.yml +26 -0
  7. toga_code_editor-0.1.1/.github/workflows/release.yml +77 -0
  8. toga_code_editor-0.1.1/.github/zizmor.yml +9 -0
  9. toga_code_editor-0.1.1/.gitignore +22 -0
  10. toga_code_editor-0.1.1/.pre-commit-config.yaml +28 -0
  11. toga_code_editor-0.1.1/CHANGELOG.md +9 -0
  12. toga_code_editor-0.1.1/CODE_OF_CONDUCT.md +162 -0
  13. toga_code_editor-0.1.1/CONTRIBUTING.md +37 -0
  14. toga_code_editor-0.1.1/LICENSE +27 -0
  15. toga_code_editor-0.1.1/PKG-INFO +128 -0
  16. toga_code_editor-0.1.1/README.md +102 -0
  17. toga_code_editor-0.1.1/changes/template.md +31 -0
  18. toga_code_editor-0.1.1/examples/editor/pyproject.toml +70 -0
  19. toga_code_editor-0.1.1/examples/editor/src/editor/__init__.py +0 -0
  20. toga_code_editor-0.1.1/examples/editor/src/editor/__main__.py +4 -0
  21. toga_code_editor-0.1.1/examples/editor/src/editor/app.py +71 -0
  22. toga_code_editor-0.1.1/examples/editor/src/editor/resources/samples/config.json +6 -0
  23. toga_code_editor-0.1.1/examples/editor/src/editor/resources/samples/hello.py +23 -0
  24. toga_code_editor-0.1.1/examples/editor/src/editor/resources/samples/page.html +11 -0
  25. toga_code_editor-0.1.1/pyproject.toml +194 -0
  26. toga_code_editor-0.1.1/setup.cfg +4 -0
  27. toga_code_editor-0.1.1/src/toga_code_editor/__init__.py +16 -0
  28. toga_code_editor-0.1.1/src/toga_code_editor/code_editor.py +169 -0
  29. toga_code_editor-0.1.1/src/toga_code_editor/highlighting.py +199 -0
  30. toga_code_editor-0.1.1/src/toga_code_editor/platforms/__init__.py +0 -0
  31. toga_code_editor-0.1.1/src/toga_code_editor/platforms/android.py +217 -0
  32. toga_code_editor-0.1.1/src/toga_code_editor/platforms/cocoa.py +264 -0
  33. toga_code_editor-0.1.1/src/toga_code_editor/platforms/dummy.py +21 -0
  34. toga_code_editor-0.1.1/src/toga_code_editor/platforms/iOS.py +314 -0
  35. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/PKG-INFO +128 -0
  36. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/SOURCES.txt +44 -0
  37. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/dependency_links.txt +1 -0
  38. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/entry_points.txt +11 -0
  39. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/requires.txt +2 -0
  40. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/scm_file_list.json +40 -0
  41. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/scm_version.json +8 -0
  42. toga_code_editor-0.1.1/src/toga_code_editor.egg-info/top_level.txt +1 -0
  43. toga_code_editor-0.1.1/tests/conftest.py +24 -0
  44. toga_code_editor-0.1.1/tests/test_code_editor.py +97 -0
  45. toga_code_editor-0.1.1/tests/test_highlighting.py +58 -0
  46. toga_code_editor-0.1.1/tox.ini +49 -0
@@ -0,0 +1,30 @@
1
+ version: 2
2
+
3
+ multi-ecosystem-groups:
4
+ dependencies:
5
+ schedule:
6
+ # Check for updates on the first Sunday of every month, 8PM UTC
7
+ interval: "cron"
8
+ cronjob: "0 20 * * sun#1"
9
+
10
+ updates:
11
+ - package-ecosystem: "github-actions"
12
+ directory: "/"
13
+ patterns: ["*"]
14
+ multi-ecosystem-group: "dependencies"
15
+ cooldown:
16
+ default-days: 7
17
+
18
+ - package-ecosystem: "pip"
19
+ directory: "/"
20
+ patterns: ["*"]
21
+ multi-ecosystem-group: "dependencies"
22
+ cooldown:
23
+ default-days: 7
24
+
25
+ - package-ecosystem: "pre-commit"
26
+ directory: "/"
27
+ patterns: ["*"]
28
+ multi-ecosystem-group: "dependencies"
29
+ cooldown:
30
+ default-days: 7
@@ -0,0 +1,12 @@
1
+ name: PR Checklist
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, edited, reopened, synchronize]
6
+
7
+ jobs:
8
+ check-pr-template:
9
+ name: Check PR template
10
+ permissions:
11
+ contents: read
12
+ uses: beeware/.github/.github/workflows/pr-checklist.yml@main
@@ -0,0 +1,159 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ workflow_call:
9
+ inputs:
10
+ attest-package:
11
+ description: "Create GitHub provenance attestation for the package."
12
+ default: "false"
13
+ type: string
14
+ outputs:
15
+ artifact-basename:
16
+ description: "Base name of the uploaded artifacts; use for artifact retrieval."
17
+ value: ${{ jobs.package.outputs.artifact-basename }}
18
+
19
+ # Cancel active CI runs for a PR before starting another run
20
+ concurrency:
21
+ group: ${{ github.workflow }}-${{ github.ref }}
22
+ cancel-in-progress: true
23
+
24
+ permissions:
25
+ contents: read
26
+
27
+ defaults:
28
+ run:
29
+ shell: bash # https://github.com/beeware/briefcase/pull/912
30
+
31
+ env:
32
+ FORCE_COLOR: "1"
33
+
34
+ jobs:
35
+ pre-commit:
36
+ name: Pre-commit checks
37
+ uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
38
+ with:
39
+ pre-commit-source: "--group pre-commit"
40
+
41
+ towncrier:
42
+ name: Check towncrier
43
+ uses: beeware/.github/.github/workflows/towncrier-run.yml@main
44
+ permissions:
45
+ contents: read
46
+ pull-requests: write
47
+ with:
48
+ tox-source: "--group tox"
49
+
50
+ package:
51
+ name: Package toga-code-editor
52
+ needs: [ pre-commit, towncrier ]
53
+ permissions:
54
+ id-token: write
55
+ attestations: write
56
+ contents: read
57
+ uses: beeware/.github/.github/workflows/python-package-create.yml@main
58
+ with:
59
+ attest: ${{ inputs.attest-package }}
60
+
61
+ unit-tests:
62
+ name: Unit tests
63
+ needs: [ package ]
64
+ runs-on: ${{ matrix.runs-on }}
65
+ strategy:
66
+ fail-fast: false
67
+ matrix:
68
+ python-version: [ "3.11", "3.12", "3.13", "3.14", "3.15" ]
69
+ runs-on: ["ubuntu-24.04"]
70
+
71
+ steps:
72
+ - name: Checkout
73
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
74
+ with:
75
+ fetch-depth: 0
76
+ persist-credentials: false
77
+
78
+ - name: Set up Python
79
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
80
+ with:
81
+ python-version: "${{ matrix.python-version }}"
82
+ allow-prereleases: true
83
+
84
+ - name: Get Packages
85
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
86
+ with:
87
+ pattern: ${{ format('{0}*', needs.package.outputs.artifact-basename) }}
88
+ merge-multiple: true
89
+ path: dist
90
+
91
+ - name: Install test requirements
92
+ run: |
93
+ python -m pip install -U pip
94
+ python -m pip install --group tox
95
+
96
+ - name: Test
97
+ id: test
98
+ run: |
99
+ python -m tox -e py-cov --installpkg dist/toga_code_editor-*.whl
100
+
101
+ - name: Store Coverage Data
102
+ if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
103
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
104
+ with:
105
+ name: coverage-data-${{ matrix.python-version }}
106
+ path: ".coverage.*"
107
+ if-no-files-found: error
108
+ include-hidden-files: true
109
+
110
+ - name: Report Platform Coverage
111
+ id: coverage
112
+ if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
113
+ # coverage reporting must use the same Python version used to produce coverage
114
+ run: tox -qe coverage$(tr -dc "0-9" <<< "${{ matrix.python-version }}")
115
+
116
+ coverage:
117
+ name: Project coverage
118
+ runs-on: ubuntu-24.04
119
+ needs: unit-tests
120
+ if: always() && (needs.unit-tests.result == 'success' || needs.unit-tests.result == 'failure')
121
+ steps:
122
+ - name: Checkout
123
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
124
+ with:
125
+ persist-credentials: false
126
+ fetch-depth: 0
127
+
128
+ - name: Setup Python
129
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
130
+ with:
131
+ # Use minimum version of python for coverage to avoid phantom branches
132
+ # https://github.com/nedbat/coveragepy/issues/1572#issuecomment-1522546425
133
+ python-version: "3.11"
134
+
135
+ - name: Install Tox
136
+ run: python -m pip install --group tox
137
+
138
+ - name: Retrieve Coverage Data
139
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
140
+ with:
141
+ pattern: coverage-data-*
142
+ merge-multiple: true
143
+
144
+ - name: Platform Coverage Reports
145
+ id: platform-coverage
146
+ run: |
147
+ tox --parallel-no-spinner -qe coverage
148
+
149
+ - name: Project Coverage Report
150
+ id: project-coverage
151
+ if: always()
152
+ run: tox -qe coverage-html
153
+
154
+ - name: Upload Project Coverage HTML Report
155
+ if: always() && steps.project-coverage.outcome == 'failure'
156
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
157
+ with:
158
+ name: html-coverage-report-project
159
+ path: htmlcov
@@ -0,0 +1,19 @@
1
+ name: Dependabot Change Note
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - 'dependabot/**'
7
+
8
+ permissions:
9
+ contents: read
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ changenote:
14
+ name: Dependabot Change Note
15
+ uses: beeware/.github/.github/workflows/dependabot-changenote.yml@main
16
+ secrets:
17
+ BRUTUS_PAT_TOKEN: ${{ secrets.BRUTUS_PAT_TOKEN }}
18
+ with:
19
+ changenote-format: "md"
@@ -0,0 +1,21 @@
1
+ name: New issue
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+ - reopened
8
+ - transferred
9
+
10
+ jobs:
11
+ add-to-project:
12
+ name: Add issue to BeeWare project
13
+ runs-on: ubuntu-latest
14
+ # The add-to-project action authenticates with BRUTUS_PAT_TOKEN, so the
15
+ # job's own GITHUB_TOKEN needs no permissions.
16
+ permissions: {}
17
+ steps:
18
+ - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0
19
+ with:
20
+ project-url: https://github.com/orgs/beeware/projects/1
21
+ github-token: ${{ secrets.BRUTUS_PAT_TOKEN }}
@@ -0,0 +1,26 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: published
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ # This permission is required for trusted publishing.
12
+ id-token: write
13
+ steps:
14
+ - uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # 1.1.2
15
+ with:
16
+ version: tags/${{ github.event.release.tag_name }}
17
+ # This next line is *not* a bash filename expansion - it's a regex. We
18
+ # need to match all files that start with toga, so that we get
19
+ # toga-code-editor.* and toga_code-editor.*, but not the "Source code" zip and
20
+ # tarball.
21
+ file: toga.*
22
+ regex: true
23
+ target: dist/
24
+
25
+ - name: Publish release to production PyPI
26
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
@@ -0,0 +1,77 @@
1
+ name: Create Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ ci:
10
+ name: CI
11
+ permissions:
12
+ id-token: write
13
+ contents: read
14
+ attestations: write
15
+ pull-requests: write
16
+ uses: $/.github/workflows/ci.yml
17
+ with:
18
+ attest-package: "true"
19
+
20
+ # docs:
21
+ # permissions:
22
+ # contents: read
23
+ # name: Verify Docs Build
24
+ # uses: beeware/.github/.github/workflows/docs-build-verify.yml@main
25
+ # secrets:
26
+ # RTD_API_TOKEN: ${{ secrets.RTD_API_TOKEN }}
27
+ # with:
28
+ # project-name: "xbuild"
29
+ # project-version: ${{ github.ref_name }}
30
+
31
+ release:
32
+ name: Create Release
33
+ needs: ci
34
+ runs-on: ubuntu-latest
35
+ permissions:
36
+ contents: write
37
+ # This permission is required for trusted publishing.
38
+ id-token: write
39
+ steps:
40
+ - name: Set build variables
41
+ run: |
42
+ echo "VERSION=${GITHUB_REF_NAME#v}" | tee -a $GITHUB_ENV
43
+
44
+ - name: Checkout
45
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
46
+ with:
47
+ persist-credentials: false
48
+ fetch-depth: 0
49
+ fetch-tags: true
50
+
51
+ - name: Set up Python
52
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
53
+ with:
54
+ python-version: "3.x"
55
+
56
+ - name: Get packages
57
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
58
+ with:
59
+ pattern: Packages-*
60
+ merge-multiple: true
61
+ path: dist
62
+
63
+ - name: Create release
64
+ env:
65
+ GH_TOKEN: ${{ github.token }}
66
+ GH_REPO: ${{ github.repository }}
67
+ run: |
68
+ gh release create "${GITHUB_REF_NAME}" \
69
+ --title "$VERSION" \
70
+ --draft \
71
+ --verify-tag \
72
+ dist/*
73
+
74
+ - name: Publish release to Test PyPI
75
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
76
+ with:
77
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,9 @@
1
+ rules:
2
+ unpinned-uses:
3
+ config:
4
+ # Allow BeeWare-provided actions to be unpinned. If an attacker is in a
5
+ # position to exploit those action, they're probably able to exploit
6
+ # repositories directly; and it's significantly easier for our internal
7
+ # actions to automatically be the most recent versions.
8
+ policies:
9
+ beeware/*: ref-pin
@@ -0,0 +1,22 @@
1
+ __pycache__/
2
+ .briefcase
3
+ .coverage
4
+ .coverage.*
5
+ .DS_Store
6
+ .kilo
7
+ .opencode
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ .rumdl_cache/
11
+ .tox/
12
+ .venv*
13
+ *.dist-info/
14
+ *.egg-info/
15
+ *.py[cod]
16
+ build/
17
+ dist/
18
+ docs/superpowers
19
+ htmlcov/
20
+ local
21
+ logs/
22
+ venv*
@@ -0,0 +1,28 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: check-toml
6
+ - id: check-yaml
7
+ - id: end-of-file-fixer
8
+ - id: trailing-whitespace
9
+ - repo: https://github.com/astral-sh/ruff-pre-commit
10
+ rev: v0.16.10
11
+ hooks:
12
+ - id: ruff-check
13
+ args: [--fix]
14
+ - id: ruff-format
15
+ - repo: https://github.com/rvben/rumdl-pre-commit
16
+ rev: v0.2.78
17
+ hooks:
18
+ - id: rumdl
19
+ - id: rumdl-fmt
20
+ - repo: https://github.com/codespell-project/codespell
21
+ rev: v2.4.3
22
+ hooks:
23
+ - id: codespell
24
+ args: ["--skip=CODE_OF_CONDUCT.md"]
25
+ - repo: https://github.com/zizmorcore/zizmor-pre-commit
26
+ rev: v1.30.1
27
+ hooks:
28
+ - id: zizmor
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ <!-- towncrier release notes start -->
4
+
5
+ ## 0.1.1 (2026-10-09)
6
+
7
+ ### Features
8
+
9
+ * Initial release of the `CodeEditor` widget, with line numbers and Pygments syntax highlighting, for the Cocoa, iOS, and Android backends.
@@ -0,0 +1,162 @@
1
+ <!-- rumdl-disable MD033 MD035 MD065 -->
2
+ <!--
3
+ **********************************************************************
4
+ *** DO NOT MODIFY THIS FILE DIRECTLY ***
5
+ **********************************************************************
6
+ The original copy of this file is in the beeware/.github repository.
7
+ It will be automatically copied into other BeeWare repositories when
8
+ the original is altered. Any changes should be made to the original.
9
+ **********************************************************************
10
+ -->
11
+
12
+ # BeeWare Community Code of Conduct
13
+
14
+ ## Our pledge <a name="our-pledge"></a>
15
+
16
+ We pledge to make our community welcoming, safe, and equitable for all.
17
+
18
+ We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
19
+
20
+ The guidelines within and enforcement of the BeeWare Community Code of Conduct apply equally to everyone participating in the BeeWare community, including members of the Code of Conduct Response Team.
21
+
22
+ ## Encouraged behaviors <a name="encouraged-behaviors"></a>
23
+
24
+ While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
25
+
26
+ With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
27
+
28
+ 1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
29
+ 2. Engaging **kindly and honestly** with others.
30
+ 3. Respecting **different viewpoints** and experiences.
31
+ 4. **Taking responsibility** for our actions and contributions.
32
+ 5. Gracefully giving and accepting **constructive feedback**.
33
+ 6. Committing to **repairing harm** when it occurs.
34
+ 7. Behaving in other ways that promote and sustain the **well-being of our community**.
35
+
36
+ ## Restricted behaviors <a name="restricted-behaviors"></a>
37
+
38
+ We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
39
+
40
+ 1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
41
+ 2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
42
+ 3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of a personal identity or trait.
43
+ 4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
44
+ 5. **Violating confidentiality.** Sharing or acting on someone's personal or private information without their permission.
45
+ 6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
46
+ 7. Behaving in other ways that **threaten the well-being** of our community.
47
+
48
+ ### Other restrictions <a name="other-restrictions"></a>
49
+
50
+ 1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
51
+ 2. **Misrepresenting project affiliation.** Speaking or acting in a way that implies an official affiliation with the BeeWare project, where one does not exist.
52
+ 3. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
53
+ 4. **Promotional materials.** Sharing marketing or other commercial content in a way that is outside the norms of the community.
54
+ 5. **Excessive communication.** Disrespecting the time and space of others by engaging in an unacceptable volume of communication.
55
+ 6. **Unhelpful communication.** Offering opinions without relevant experience in the topic being discussed, entering into an ongoing discussion without first gaining familiarity with the history of the topic, or making contributions that are off-topic or otherwise distracting.
56
+ 7. **Irresponsible messaging.** Presenting content which includes, links, or describes other restricted behaviors without a relevant reason and appropriate prior warnings for consumers of that content.
57
+ 8. Other conduct that could reasonably be considered **unprofessional or inappropriate**.
58
+
59
+ ## Reporting an issue <a name="reporting-an-issue"></a>
60
+
61
+ Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm. Reporting even minor issues is important, as they can be helpful in identifying patterns of behavior that may not be concerning in isolation, but when viewed collectively may be more significant.
62
+
63
+ When an incident does occur, it is important to report it promptly to the BeeWare Code of Conduct Response Team.
64
+
65
+ **If you believe you or anyone else is in physical danger, please notify appropriate law enforcement first.**
66
+
67
+ To report a possible violation, email the Team at [conduct@beeware.org](mailto:conduct@beeware.org). If necessary, you can reach out to individual team members. On the BeeWare Discord server, you can also direct message anyone on the Response Team, or, if appropriate, mention `@moderators` in a public channel. Team members can be reached by the following usernames on Discord or GitHub, or the provided email addresses:
68
+
69
+ * Russell Keith-Magee (@freakboy3742; [russell@beeware.org](mailto:russell@beeware.org))
70
+ * Kattni (@kattni; [kattni@beeware.org](mailto:kattni@beeware.org))
71
+ * Katie McLaughlin (@glasnt; [katie@beeware.org](mailto:katie@beeware.org))
72
+ * Philip James (@phildini; [philip@beeware.org](mailto:philip@beeware.org))
73
+ * Charles Whittington (@HalfWhitt; [charles@beeware.org](mailto:charles@beeware.org))
74
+
75
+ The Response Team takes reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. The Team will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution. If we determine that a public statement needs to be made, the identities of all victims and reporters will remain confidential unless those individuals instruct us otherwise.
76
+
77
+ In your report, please include:
78
+
79
+ * **Your contact info** so we can get in touch with you if we need to follow up.
80
+ * **Names (real, nicknames, or pseudonyms) of any individuals involved.** If there were other witnesses besides you, please try to include them as well.
81
+ * **When and where the incident occurred.** Please be as specific as possible.
82
+ * **Your account of what occurred.** If there is a publicly available record (e.g. a Discord or GitHub message) please include a link.
83
+ * **Any extra context** you believe existed for the incident.
84
+ * **If you believe this incident is ongoing.**
85
+ * **If you believe any member of the Response Team has a conflict of interest** in adjudicating the incident.
86
+ * **What, if any, corrective response** you believe would be appropriate.
87
+ * **Any other information** you believe we should have.
88
+
89
+ Code of Conduct Response Team members are obligated to maintain confidentiality with regard to the reporter and details of an incident.
90
+
91
+ ## The Response Team's report followup <a name="report-followup"></a>
92
+
93
+ You will receive a response acknowledging receipt of your report. We promise to acknowledge receipt within 24 hours (and will aim for much quicker than that).
94
+
95
+ The Response Team will immediately meet to review the incident and determine:
96
+
97
+ * What happened.
98
+ * Whether this event constitutes a code of conduct violation.
99
+ * Who the reported person is.
100
+ * Whether this is an ongoing situation, or if there is a threat to anyone's physical safety.
101
+ * If this is determined to be an ongoing incident or a threat to physical safety, the Response Team's immediate priority will be to protect everyone involved. This means we may delay an official response until we believe that the situation has concluded and that everyone is physically safe.
102
+ * If a member of the Response Team is one of the named parties, they will not be included in any discussions, and will not be provided with any confidential details from the reporter.
103
+
104
+ If anyone on the Response Team believes they have a conflict of interest in adjudicating on a reported issue, they will inform the other Response Team members, and recuse themselves from any discussion about the issue. Following this declaration, they will not be provided with any confidential details from the reporter.
105
+
106
+ We'll respond within one week to the person who filed the report with either a resolution or an explanation of why the situation is not yet resolved.
107
+
108
+ Once we've determined our final action, we'll contact the original reporter to let them know what action (if any) we'll be taking. We'll take into account feedback from the reporter on the appropriateness of our response, but we don't guarantee we'll act on it.
109
+
110
+ Finally, to maintain transparency in the reporting and enforcement process, whenever possible, the Response Team will make a public report of the incident on [The Buzz](https://beeware.org/news/buzz), the BeeWare blog. A public report may not be made if the specifics of the incident do not allow us to preserve anonymity, or if there is potential for ongoing harm.
111
+
112
+ ## Enforcement: addressing and repairing harm <a name="enforcement"></a>
113
+
114
+ If an investigation by the Response Team finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
115
+
116
+ 1. Warning
117
+ * Event: A violation involving a single incident or series of incidents.
118
+ * Consequence: A private, written warning from the Response Team.
119
+ * Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
120
+
121
+ 2. Temporarily Limited Activities
122
+ * Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
123
+ * Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
124
+ * Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
125
+
126
+ 3. Temporary Suspension
127
+ * Event: A pattern of repeated violation which the Response Team has tried to address with warnings, or a single serious violation.
128
+ * Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions. Suspensions will be based on where the violation occurs, and may be limited to the space in which the violation occurs. In the event of a more serious violation, the suspension may apply to all spaces.
129
+ * Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
130
+
131
+ 4. Permanent Ban
132
+ * Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Response Team determines there is no way to keep the community safe with this person as a member.
133
+ * Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
134
+ * Repair: There is no possible repair in cases of this severity.
135
+
136
+ This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
137
+
138
+ ## Scope <a name="scope"></a>
139
+
140
+ This Code of Conduct applies within all community spaces, including GitHub, the BeeWare Discord server, and in-person events, such as conferences, meetups, and sprints. It also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
141
+
142
+ Behavior outside of official BeeWare spaces may also be considered as supporting evidence for a report if that behavior establishes a pattern, or represents a potential risk to the BeeWare community.
143
+
144
+ This Code of Conduct operates in parallel to any Code of Conduct that is in effect in a given context (e.g., the Code of Conduct for a conference). If an incident occurs, we encourage reporting that incident to all relevant conduct groups. Known violations of other Codes of Conduct may be considered as supporting evidence for a report under this Code of Conduct. The BeeWare Code of Conduct Response Team will cooperate with other Code of Conduct teams, but will not disclose any identifying details without the prior consent of the reporting party.
145
+
146
+ ## Attribution <a name="attribution"></a>
147
+
148
+ This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
149
+
150
+ Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
151
+
152
+ For answers to common questions about Contributor Covenant, see the [FAQ](https://www.contributor-covenant.org/faq). [Translations](https://www.contributor-covenant.org/translations) are provided. There are [additional enforcement and community guideline resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
153
+
154
+ ## Changes <a name="changes"></a>
155
+
156
+ Major substantive changes are listed here; for a complete list of changes see the GitHub commit history.
157
+
158
+ * **December 15, 2025:** Updated to adapt the Contributor Covenant, version 3.0, with some modifications for BeeWare-specific guidelines and procedures.
159
+
160
+ * **July 4, 2016:** Added instructions and guidelines for reporting incidents.
161
+
162
+ * **December 5, 2015:** Initial Code of Conduct adopted.
@@ -0,0 +1,37 @@
1
+ # All Contributions Welcome
2
+
3
+ It's not just about code. A successful software project requires documentation, design skills, feedback and bug reports. The BeeWare project recognizes that all contributions are important - not just the ones that come as a pull request on GitHub.
4
+
5
+ ## How to contribute
6
+
7
+ If you'd like to contribute to `toga-code-editor`, our [contribution guide](https://beeware.org/contributing/guide/) has details on how to pick a way to contribute, how to set up a development environment, and other requirements we have as part of our contribution process.
8
+
9
+ ### Code of Conduct
10
+
11
+ BeeWare operates under a [Code of Conduct](https://beeware.org/community/behavior/code-of-conduct/). All participation the BeeWare community is governed by this code.
12
+
13
+ ### AI contributions
14
+
15
+ We neither encourage nor prohibit the use of autonomous coding tools when contributing to BeeWare projects. However, if you have used an autonomous coding tool to support your work processes, all contributions are you make are ultimately **your** responsibility.
16
+
17
+ Our [AI Policy](https://beeware.org/contributing/guide/policies/ai-policy/) has the full details of your obligations if you choose to use an AI tool when contributing to BeeWare.
18
+
19
+ ### Issues
20
+
21
+ We have a [process and requirements for creating new issues](https://beeware.org/contributing/guide/how/new-issue/).
22
+
23
+ ### Code style guide
24
+
25
+ We have a [code style guide](https://beeware.org/contributing/guide/style/code-style-guide/) all code must follow. This is partially enforced by automated pre-commit checks; our guide on [setting up a development environment](https://beeware.org/contributing/guide/style/docs-style-guide/) describes how to configure these automated checks.
26
+
27
+ ### Testing
28
+
29
+ We require that all new code is exercised by automated tests. Our contribution guide describes [how to run the project test suite](https://beeware.org/contributing/guide/how/write-code/).
30
+
31
+ ### Documentation
32
+
33
+ We require that all new features have full user documentation. We have a [documentation style guide](https://beeware.org/contributing/guide/style/docs-style-guide/) that all documentation should follow. Our contribution guide has details on [how to build and preview project documentation](https://beeware.org/contributing/guide/how/build-docs/).
34
+
35
+ ### Pull Requests
36
+
37
+ We have a [process for submitting a PR](https://beeware.org/contributing/guide/how/submit-pr/) that all contributions must follow. This includes the use of a [pull request template](https://github.com/beeware/.github/blob/main/.github/pull_request_template.md) that *all* pull requests must include and complete as appropriate.
@@ -0,0 +1,27 @@
1
+ Copyright (c) 2026, Russell Keith-Magee
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ 1. Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ 2. Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ 3. Neither the name of toga-code-editor nor the names of its
15
+ contributors may be used to endorse or promote products derived from
16
+ this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.