Skip to content

Commit dc1598c

Browse files
committed
Prepare project
* Add missing license information * Add CoC * Add CI * Add linter * Add release scripts * Prepare issues
1 parent d98db75 commit dc1598c

23 files changed

Lines changed: 891 additions & 37 deletions

.editorconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
root = true
16+
17+
[*.sh]
18+
19+
indent_style = space
20+
indent_size = 2
21+
end_of_line = lf
22+
insert_final_newline = true
23+
trim_trailing_whitespace = true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Bug Report
16+
description: File a bug report.
17+
type: Bug
18+
body:
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: Describe the problem you got
23+
description: It's better that you provide information as much as possible.
24+
validations:
25+
required: true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Feature Request
16+
description: Request a feature.
17+
type: Feature
18+
body:
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: Describe the feature you want
23+
description: It's better that you also provide your use case.
24+
validations:
25+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
blank_issues_enabled: false
16+
contact_links:
17+
- name: Discord
18+
url: https://discord.gg/FsZaZ4z3We
19+
about: Please ask and answer questions here.
20+
- name: GitHub Discussions
21+
url: https://github.com/enactic/openarm_control/discussions
22+
about: If you prefer GitHub Discussions to Discord, you can use GitHub Discussions too.

.github/copilot-instructions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# GitHub Copilot instructions
2+
3+
- In pull request descriptions, the first line must be `Fix GH-${ISSUE_NUMBER}` with `${ISSUE_NUMBER}` replaced by the corresponding issue number (for example, `Fix GH-123`).
4+
- Do not add a `Changes` section to pull request descriptions.

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
version: 2
16+
updates:
17+
- package-ecosystem: "github-actions"
18+
directory: "/"
19+
schedule:
20+
interval: "weekly"

.github/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
changelog:
16+
exclude:
17+
authors:
18+
- dependabot[bot]

.github/workflows/lint.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Lint
16+
on:
17+
push:
18+
branches-ignore:
19+
- 'copilot/**'
20+
- 'dependabot/**'
21+
pull_request:
22+
concurrency:
23+
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
24+
cancel-in-progress: true
25+
jobs:
26+
lint:
27+
name: Lint
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 5
30+
steps:
31+
- uses: actions/checkout@v6
32+
with:
33+
submodules: recursive
34+
- name: Install pre-commit
35+
run: |
36+
python -m pip install pre-commit
37+
- uses: actions/cache@v5
38+
with:
39+
path: ~/.cache/pre-commit
40+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
41+
- name: Run pre-commit
42+
run: |
43+
pre-commit run --show-diff-on-failure --color=always --all-files

.github/workflows/package.yaml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Package
16+
on:
17+
push:
18+
branches-ignore:
19+
- 'copilot/**'
20+
- 'dependabot/**'
21+
tags:
22+
- '**'
23+
pull_request:
24+
concurrency:
25+
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
26+
cancel-in-progress: true
27+
jobs:
28+
source:
29+
name: Source
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 10
32+
steps:
33+
- uses: actions/checkout@v6
34+
- name: Prepare environment variables
35+
run: |
36+
PACKAGE_NAME=$(yq --unwrapScalar .project.name pyproject.toml)
37+
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> "${GITHUB_ENV}"
38+
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
39+
echo "VERSION=${GITHUB_REF_NAME}" >> "${GITHUB_ENV}"
40+
else
41+
VERSION=$(yq --unwrapScalar .project.version pyproject.toml)
42+
echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
43+
fi
44+
- uses: actions/setup-python@v6
45+
with:
46+
python-version: 3
47+
- name: Install dependencies
48+
run: |
49+
pip install build
50+
- name: Create source archive
51+
run: |
52+
python -m build --sdist
53+
cd dist
54+
sha256sum \
55+
${PACKAGE_NAME}-${VERSION}.tar.gz > \
56+
${PACKAGE_NAME}-${VERSION}.tar.gz.sha256
57+
sha512sum \
58+
${PACKAGE_NAME}-${VERSION}.tar.gz > \
59+
${PACKAGE_NAME}-${VERSION}.tar.gz.sha512
60+
- uses: actions/upload-artifact@v7
61+
with:
62+
name: source
63+
path: |
64+
dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
65+
dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz.sha256
66+
dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz.sha512
67+
release:
68+
name: Release
69+
if: github.ref_type == 'tag'
70+
needs:
71+
- source
72+
runs-on: ubuntu-latest
73+
timeout-minutes: 10
74+
environment: release
75+
permissions:
76+
contents: write
77+
discussions: write
78+
steps:
79+
- uses: actions/download-artifact@v8
80+
with:
81+
name: source
82+
- name: Create GitHub Release
83+
env:
84+
GH_TOKEN: ${{ github.token }}
85+
run: |
86+
version=${GITHUB_REF_NAME}
87+
gh release create ${version} \
88+
--discussion-category Announcements \
89+
--generate-notes \
90+
--repo ${GITHUB_REPOSITORY} \
91+
--title "OpenArm Driver ${version}" \
92+
--verify-tag \
93+
*.tar.gz*
94+
pypi:
95+
name: PyPI
96+
if: github.ref_type == 'tag'
97+
needs:
98+
- source
99+
runs-on: ubuntu-latest
100+
timeout-minutes: 10
101+
environment: pypi
102+
permissions:
103+
id-token: write
104+
steps:
105+
- uses: actions/download-artifact@v8
106+
with:
107+
name: source
108+
- name: Prepare directory structure
109+
run: |
110+
mkdir -p dist
111+
mv *.tar.gz dist/
112+
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Enactic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
# Byte-compiled / optimized / DLL files
216
__pycache__/
317
*.py[cod]

0 commit comments

Comments
 (0)