Skip to content

Commit

Permalink
Migrating to pyproject.toml over setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mcferrill committed Feb 8, 2022
1 parent 5e7ed34 commit 8c69b24
Show file tree
Hide file tree
Showing 10 changed files with 657 additions and 104 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ htmlcov
deps
docs/html
docs/doctrees
.pdm.toml
.vscode
*.xml
__pypackages__
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PyChapter10
|PyPiVersion|_
|PythonVersion|

PyChapter10 is an open source pure Python library for reading and writing IRIG 106
PyChapter10 is an open source pure Python library for reading and writing IRIG 106
Chapter 10 (now 11) files. Tested on all 3 major platforms with Python 3.6+.

Installation
Expand All @@ -23,8 +23,7 @@ To install offline from "full" zip, install the included dependencies and the li

pip install dependencies/* .

**Note:** you may also install cbitstruct (included in requirements.txt, see
below) for a performance improvement.
**Note:** you may also install cbitstruct for a performance improvement.

Basic Usage
-----------
Expand All @@ -44,15 +43,15 @@ PyChapter10 provides a pythonic API to read, write, and update Chapter 10 data.
Supported Datatypes
-------------------
==== ================================================== =========
Type Name Supported
Type Name Supported
==== ================================================== =========
0x00 Computer-Generated F0 - User-Defined User-Defined
0x01 Computer-Generated F1 - Setup Record (TMATS) Yes
0x02 Computer-Generated F2 - Recording Events Yes
0x03 Computer-Generated F3 - Recording Index Yes
0x04 Computer-Generated F4 - Streaming Config (TMATS) No
0x09 PCM F1 Yes
0x11 Time Data F1 Yes
0x11 Time Data F1 Yes
0x12 Time Data F2 No
0x19 1553 F1 Yes
0x1A 1553 F2 - 16PP194 Yes
Expand Down Expand Up @@ -85,9 +84,10 @@ Type Name Supported
Running Tests
-------------

To run the included test suite install dependencies with pip::
To run the included test suite install pdm and dev dependencies with pip::

pip install -r requirements.txt
pip install pdm
pdm install --dev

Then run::

Expand Down
24 changes: 15 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ jobs:
versionSpec: "$(python.version)"
architecture: 'x64'

- script: python -m pip install -r requirements.txt
displayName: 'Install dependencies'
- script: python -m pip install -U pip pdm
displayName: 'Install pdm'

- script: python -m pip install -e .
displayName: 'Install library'
- script: pdm install --dev
displayName: 'Install dependencies'

- script: pytest --junitxml=junit-$(imageName)-$(python.version).xml --cov chapter10 --cov-report xml --cov-report html --cov-append
displayName: 'Run tests'
Expand Down Expand Up @@ -83,11 +83,11 @@ jobs:
versionSpec: "3.8"
architecture: 'x64'

- script: "python -m pip install -U pip setuptools wheel"
displayName: "Install dependencies"
- script: python -m pip install -U pip pdm
displayName: 'Install pdm'

- script: "echo \"version = '$(Build.BuildNumber)'\" > chapter10/version.py"
displayName: "Update version # to match build"
- script: pdm install --dev
displayName: 'Install dependencies'

- script: "python setup.py sdist bdist_wheel"
displayName: "Build source & wheel distributions"
Expand All @@ -114,7 +114,13 @@ jobs:
- script: "python -m pip download . -r requirements.txt -d dependencies --no-binary :all:"
displayName: 'Download dependencies'

- script: "python -m pip install . -r requirements.txt && python setup.py build_docs"
- script: python -m pip install -U pip pdm
displayName: 'Install pdm'

- script: pdm install --dev
displayName: 'Install dependencies'

- script: "pdm run sphinx-build -b html docs/source docs/html"
displayName: 'Build documentation'

- task: ArchiveFiles@2
Expand Down
1 change: 0 additions & 1 deletion chapter10/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from .c10 import C10, TYPES
from .packet import Packet, InvalidPacket
from .version import version
2 changes: 1 addition & 1 deletion chapter10/ms1553.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __repr__(self):
p2
u1 bus
u1 me
p1 rt2rt
u1 rt2rt
u1 fe
u1 timeout
p1
Expand Down
1 change: 0 additions & 1 deletion chapter10/version.py

This file was deleted.

Loading

0 comments on commit 8c69b24

Please sign in to comment.