Skip to content

Commit 91fc8e3

Browse files
Standardise record value setting/getting (#60)
Overhaul record value setting/getting, and introduce new longStringIn/longStringOut record types. The new longStringIn/longStringOut record types are specialized for handling Python (Unicode) strings only. There are considerable changes in how all record types handle incoming values, including dropping support for some previously supported types. The canonical list of valid types for record types is the tests - see `record_values_list` in `test_record_values.py` for the list of valid cases. Due to an epicscorelibs version bump, existing checkouts will need to do a complete reinstall - see rough guide in `Contributing.rst` in the new "Updating Dependencies" section.
1 parent 3866562 commit 91fc8e3

19 files changed

Lines changed: 1881 additions & 636 deletions

.github/workflows/code.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ name: Code CI
22

33
on:
44
push:
5+
branches:
6+
- master
7+
- main
8+
tags:
9+
- "*"
510
pull_request:
11+
schedule:
12+
# Run every Monday at 8am
13+
- cron: '0 8 * * MON'
614

715
jobs:
816
lint:
@@ -30,15 +38,18 @@ jobs:
3038
python: [cp36, cp37, cp38, cp39]
3139

3240
include:
33-
# Put coverage in the project directory for mac
41+
# Put coverage and results files in the project directory for mac
3442
- os: macos-latest
3543
cov_file: "{project}/dist/coverage.xml"
44+
results_file: "{project}/dist/pytest-results.xml"
3645
# And for windows
3746
- os: windows-latest
3847
cov_file: "{project}/dist/coverage.xml"
39-
# But put coverage in the output dir mounted in docker for linux
48+
results_file: "{project}/dist/pytest-results.xml"
49+
# But put coverage and results files in the output dir mounted in docker for linux
4050
- os: ubuntu-latest
4151
cov_file: /output/coverage.xml
52+
results_file: /output/pytest-results.xml
4253
# Build an sdist on linux so it has the right line endings
4354
- os: ubuntu-latest
4455
sdist: true
@@ -60,7 +71,8 @@ jobs:
6071
python-version: "3.7"
6172

6273
- name: Install Python Dependencies
63-
run: pip install build cibuildwheel==1.* # The 2.* releases dropped Python2 support.
74+
# Pin cibuildwheel due to https://github.com/pypa/cibuildwheel/issues/962
75+
run: pip install build cibuildwheel>=2.3.1
6476

6577
- name: Build Sdist
6678
if: matrix.sdist
@@ -69,14 +81,17 @@ jobs:
6981
- name: Build Wheel
7082
run: cibuildwheel --output-dir dist
7183
env:
84+
# Force old behaviour of pip - see https://github.com/pypa/cibuildwheel/issues/962
85+
CIBW_ENVIRONMENT: PIP_USE_DEPRECATED=out-of-tree-build
7286
CIBW_BUILD: ${{ matrix.python }}*64
7387
CIBW_TEST_EXTRAS: dev
74-
CIBW_TEST_COMMAND: pytest {project}/tests --cov-report xml:${{ matrix.cov_file }}
88+
CIBW_TEST_COMMAND: pytest {project}/tests --cov-report xml:${{ matrix.cov_file }} --junit-xml=${{ matrix.results_file }}
7589
# Disable auditwheel as it isn't compatible with setuptools_dso approach
7690
# https://github.com/mdavidsaver/setuptools_dso/issues/17
7791
CIBW_REPAIR_WHEEL_COMMAND: ""
78-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
79-
CIBW_ENVIRONMENT_LINUX: SETUPTOOLS_DSO_PLAT_NAME=manylinux1_x86_64
92+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
93+
CIBW_ENVIRONMENT_LINUX: SETUPTOOLS_DSO_PLAT_NAME=manylinux2014_x86_64
94+
CIBW_SKIP: "*-musllinux*" # epicscorelibs doesn't build on musllinux platforms
8095

8196
- name: Upload Wheel and Sdist
8297
uses: actions/upload-artifact@v2
@@ -90,6 +105,30 @@ jobs:
90105
name: ${{ matrix.os }}/${{ matrix.python }}
91106
directory: dist
92107

108+
- name: Upload Unit Test Results
109+
if: always()
110+
uses: actions/upload-artifact@v2
111+
with:
112+
name: Unit Test Results (${{ matrix.os }}-${{ matrix.python }})
113+
path: dist/pytest-results.xml
114+
115+
publish-test-results:
116+
name: Publish Unit Tests Results
117+
needs: build
118+
runs-on: ubuntu-latest
119+
if: always()
120+
121+
steps:
122+
- name: Download Artifacts
123+
uses: actions/download-artifact@v2
124+
with:
125+
path: artifacts
126+
127+
- name: Publish Unit Test Results
128+
uses: EnricoMi/publish-unit-test-result-action@v1
129+
with:
130+
files: artifacts/**/*.xml
131+
93132
release:
94133
needs: [build]
95134
runs-on: ubuntu-latest
@@ -115,4 +154,4 @@ jobs:
115154
env:
116155
TWINE_USERNAME: __token__
117156
TWINE_PASSWORD: ${{ secrets.pypi_token }}
118-
run: pipx run twine upload dist/*
157+
run: pipx run twine upload dist/*

.github/workflows/docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Docs CI
22

33
on:
44
push:
5+
branches:
6+
# Add more branches here to publish docs from other branches
7+
- master
8+
- main
9+
tags:
10+
- "*"
511
pull_request:
612

713
jobs:

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Changed:
1313

1414
- `Remove python2 support <../../pull/64>`
1515
- `Default DISP to TRUE for all In records <../../pull/74>`
16+
- `Overhaul record value setting/getting <../../pull/60>`
17+
18+
Added:
19+
- New longStringIn/longStringOut record types
1620

1721
3.2.1_ - 2021-11-25
1822
-------------------

CONTRIBUTING.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ While 100% code coverage does not make a library bug-free, it significantly
2626
reduces the number of easily caught bugs! Please make sure coverage remains the
2727
same or is improved by a pull request!
2828

29+
30+
Updating Dependencies
31+
---------------------
32+
33+
pythonSoftIoc has a variety of types of dependencies, from Python module to
34+
C files and built libraries. If it is necessary to update any of them, the
35+
safest way to do that is::
36+
37+
$ Ensure all changes are committed/saved/backed up
38+
$ pipenv --rm
39+
$ pipenv run gitclean
40+
$ rm Pipfile.lock
41+
$ Update dependencies in setup.cfg / pyproject.toml
42+
$ pipenv install --dev
43+
2944
Code Styling
3045
------------
3146

0 commit comments

Comments
 (0)