Skip to content

Commit

Permalink
Merge pull request MetroRobots#1 from MetroRobots/metadata
Browse files Browse the repository at this point in the history
Metadata
  • Loading branch information
DLu authored Dec 7, 2023
2 parents 1dc5c3d + 26e9a41 commit 4b5581d
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
30 changes: 30 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
name: Check Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install package
run: python -m pip install -e .
39 changes: 39 additions & 0 deletions .github/workflows/publish_pip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish package on pip

on:
workflow_dispatch:
release:
types:
- published

jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build SDist and wheel
run: pipx run build

- uses: actions/upload-artifact@v3
with:
path: dist/*

- name: Check metadata
run: pipx run twine check dist/*

publish:
needs: [dist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.coverage
src/ros_glint/_version.py
57 changes: 57 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- id: mixed-line-ending
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: detect-private-key
- id: destroyed-symlinks
- id: check-symlinks
- id: check-case-conflict
- id: check-yaml
- id: check-ast
- id: double-quote-string-fixer
- id: requirements-txt-fixer
rev: v4.4.0
- repo: https://github.com/codespell-project/codespell
hooks:
- id: codespell
args:
- --write-changes
rev: v2.2.6
- repo: https://github.com/adrienverge/yamllint
hooks:
- id: yamllint
args:
- --format
- parsable
- --strict
rev: v1.32.0
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
hooks:
- id: yamlfmt
args:
- --width
- '120'
- --implicit_start
- --implicit_end
- --mapping
- '2'
- --sequence
- '2'
- --offset
- '0'
rev: 0.2.3
- repo: https://github.com/hhatto/autopep8
hooks:
- id: autopep8
rev: v2.0.4
- repo: https://github.com/PyCQA/flake8
hooks:
- id: flake8
rev: 6.1.0
ci:
autoupdate_schedule: quarterly
30 changes: 30 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
yaml-files:
- '*.yaml'
- '*.yml'
rules:
anchors: enable
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation:
level: warning
document-end: disable
document-start: disable
empty-lines: enable
empty-values: disable
float-values: disable
hyphens: enable
indentation: disable
key-duplicates: enable
key-ordering: disable
line-length:
max: 120
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy: disable
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# ros_glint
![ROS Glint animated logo](logo.gif)

Make your ROS code sparkle!

## Acknowledgements
* ROS Glint logo by [https://glowtxt.com/](https://glowtxt.com/)
Binary file added logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "ros_glint"
description = "Pure Python library for linting ROS packages"
readme = "README.md"
authors = [
{ name = "David V. Lu!!", email = "davidvlu@gmail.com" },
]
maintainers = [
{ name = "David V. Lu!!", email = "davidvlu@gmail.com" },
]

requires-python = ">=3.8"

dynamic = ["version"]

classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development",
]

[project.urls]
Homepage = "https://github.com/MetroRobots/ros_glint"
"Bug Tracker" = "https://github.com/MetroRobots/ros_glint/issues"

[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/ros_glint/_version.py"
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max_line_length=120
Empty file added src/ros_glint/__init__.py
Empty file.

0 comments on commit 4b5581d

Please sign in to comment.