Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Action to Build and PyPi Release #843

Merged
merged 34 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a8b28c6
Update ci.yml
xRowe Feb 10, 2025
e803cff
Update ci.yml
xRowe Feb 10, 2025
3d80079
Merge pull request #21 from ebroecker/development
xRowe Feb 11, 2025
1140b95
Update ci.yml
xRowe Feb 13, 2025
bb0c608
Merge pull request #22 from ebroecker/development
xRowe Feb 13, 2025
06df7cd
Update tox & Subsitute setup.py with pyproject..toml
xRowe Feb 13, 2025
840e845
Update pyproject.toml
xRowe Feb 13, 2025
fed4857
Update tox.ini
xRowe Feb 13, 2025
9c099be
Update pyproject.toml
xRowe Feb 15, 2025
9bb0d87
Update pyproject.toml
xRowe Feb 15, 2025
ed3b90c
Update pyproject.toml
xRowe Feb 15, 2025
1a2d6f0
Update
xRowe Feb 15, 2025
87fa848
Update tox.ini
xRowe Feb 15, 2025
61a4d26
Update ci.yml
xRowe Feb 15, 2025
dfc10be
Revert "Update ci.yml"
xRowe Feb 15, 2025
4e04b72
Update ci.yml
xRowe Feb 15, 2025
610771b
Update Readme and MANIFEST
xRowe Feb 15, 2025
77b1988
Update ci.yml
xRowe Feb 15, 2025
82ce80f
Update ci.yml
xRowe Feb 15, 2025
c620c77
Update
xRowe Feb 15, 2025
0742b52
Update pyproject.toml
xRowe Feb 15, 2025
f877e95
Update pyproject.toml
xRowe Feb 15, 2025
94f6ce6
Update version recorder
xRowe Feb 15, 2025
ae11503
Update README.rst
xRowe Feb 15, 2025
5d55096
Update __init__.py
xRowe Feb 15, 2025
d6b560e
Update
xRowe Feb 15, 2025
20c54fd
Update pyproject.toml
xRowe Feb 16, 2025
fd880a5
Update pyproject.toml
xRowe Feb 16, 2025
df3336c
Update pyproject.toml
xRowe Feb 17, 2025
363f1b5
Update pyproject.toml
xRowe Feb 17, 2025
788be55
Update README.rst
xRowe Feb 17, 2025
e3a4750
Update __init__.py
xRowe Feb 17, 2025
aafff33
Update pyproject.toml
xRowe Feb 17, 2025
eed8df8
Merge branch 'development' into Improve_Actions
ebroecker Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
continue-on-error: ${{ matrix.experimental }} # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
# os: [ubuntu-latest]
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
experimental: [false]
# python-version: ["2.7","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
python-version: ["3.8","3.9","3.10","3.11","3.12"]
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down Expand Up @@ -117,36 +117,41 @@ jobs:
# retention-days: 5

build:
name: Packaging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build wheel and sdist
run: pipx run build
- name: Check build artifacts
run: pipx run twine check --strict dist/*
- name: Save artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-can-dist
name: canmatrix-dist
path: ./dist

upload_pypi:
needs: [build]
name: Release to PyPi
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write

# upload to PyPI only on release
if: github.event.release && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4.1.7
- uses: actions/download-artifact@v4
with:
name: python-can-dist
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include versioneer.py
include canmatrix/_version.py
include LICENSE
include LICENSE
recursive-include tests *.py
28 changes: 0 additions & 28 deletions README.md

This file was deleted.

109 changes: 109 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
Canmatrix is a python package to read and write several CAN (Controller Area Network) database formats.
-------------------------------------------------------------------------------------------------------

|pypi| |pypi_version| |codecov| |issues|

.. |pypi| image:: https://img.shields.io/pypi/v/python-can.svg
:target: https://pypi.python.org/pypi/python-can
:alt: Latest Version on PyPi

.. |pypi_version| image:: https://img.shields.io/pypi/pyversions/canmatrix.svg
:target: https://pypi.org/project/canmatrix
:alt: Support Version on PyPi

.. |codecov| image:: https://img.shields.io/codecov/c/github/ebroecker/canmatrix/development.svg
:target: https://codecov.io/gh/ebroecker/canmatrix
:alt: Test coverage reports on Codecov

.. |issues| image:: https://img.shields.io/github/issues-raw/ebroecker/canmatrix.svg
:target: https://github.com/ebroecker/canmatrix/issue
:alt: Current Github Issues

About
-----

**Canmatrix** implements a "Python Can Matrix Object" which describes the can-communication and the needed objects (Boardunits, Frames, Signals, Values, ...)
**Canmatrix** also includes two **Tools** (canconvert and cancompare) for converting and comparing **CAN** databases.

- Multiple formats automotive related communication matrix file parsing.
- CAN message encoding and decoding.

**Supported file formats for import:**

.dbc candb / Vector

.dbf Busmaster (open source!)

.kcd kayak (open source!)

.arxml autosar system description

.yaml dump of the python object

.xls(x) excel xls-import, works with .xls-file generated by this lib

.sym peak pcan can description

.xml (fibex or CANopen eds)

.ldf (lin bus)

.odx (diagnostic file)

.eds


**Supported file formats for export:**

.dbc

.dbf

.kcd

.xls(x)

.json Canard (open source!)

.arxml (very basic implementation)

.yaml (dump of the python object)

.sym

.xml (fibex)

.lua (wireshark script)

.scapy

Project Homepage: https://github.com/ebroecker/canmatrix

Documentation: https://canmatrix.readthedocs.io

Installation
------------

https://canmatrix.readthedocs.io/en/latest/installation.html

`Chinese Translation / 中文安装方法解释及注意事项 <https://github.com/ebroecker/canmatrix/wiki/%E5%AE%89%E8%A3%85%E4%B8%AD%E6%96%87%E6%96%B9%E6%B3%95%E8%A7%A3%E9%87%8A%E5%8F%8A%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9>`_

Contributing
------------

Source Code, Documentation, Examples, Report issues and Any other contributions are **extremely appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request


======

Have Fun,

feel free to contact me for any suggestions

Eduard
6 changes: 0 additions & 6 deletions get_version.py

This file was deleted.

91 changes: 91 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[build-system]
requires = ["setuptools >= 40.8.0"]
build-backend = "setuptools.build_meta"

[project]
name = "canmatrix"
dynamic = ["readme", "version"]
description = "Automotive Communication Matrix"
authors = [{ name="Eduard Bröcker", email = "eduard@gmx.de" }]
maintainers = [{ name = "canmatrix contributors" }]
dependencies = [
"attrs>=19.2.0",
"click",
"importlib-metadata; python_version < '3.8'",
"typing; python_version < '3.5'",
]
requires-python = ">=3.8"
keywords = [
"CAN",
"canbus",
"dbc",
"arxml",
"kcd",
"dbf",
"sym",
"fibex",
"eds",
"automotive",
]
license = { text = "BSD-2-Clause" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Manufacturing",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: BSD License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Embedded Systems :: Controller Area Network (CAN)",
"Topic :: System :: Networking",
"Topic :: Utilities",
]

[project.scripts]
cancompare = "canmatrix.cli.compare:cli_compare"
canconvert = "canmatrix.cli.convert:cli_convert"

[project.urls]
homepage = "https://github.com/ebroecker/canmatrix"
documentation = "https://canmatrix.readthedocs.io"
repository = "https://github.com/ebroecker/canmatrix"

[project.optional-dependencies]
arxml = ["lxml"]
csv = []
dbc = []
dbf = []
fibex = ["lxml"]
json = []
kcd = ["lxml"]
ldf = ["ldfparser"]
odx = ["lxml"]
scapy = []
sym = []
test = ["pathlib2; python_version < '3.4'", "pytest"]
wireshark = []
xls = ["xlrd==1.2.0", "xlwt"]
xlsx = ["openpyxl"]
yaml = ["pyyaml"]
eds = ["canopen"]

[tool.setuptools.dynamic]
readme = { file = "README.rst" }
version = {attr = "canmatrix.__version__"}

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
canmatrix = ["j1939.dbc", "py.typed"]
6 changes: 0 additions & 6 deletions setup.cfg

This file was deleted.

Loading
Loading