Skip to content

Commit

Permalink
Merge pull request #91 from dls-controls/ci-fixes
Browse files Browse the repository at this point in the history
Move iocStats into softioc dir
  • Loading branch information
coretl authored Jun 6, 2022
2 parents 6903754 + e683ee3 commit 79e67ab
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 19 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ jobs:
- name: Build Wheel
run: cibuildwheel --output-dir dist
env:
# Force old behaviour of pip - see https://github.com/pypa/cibuildwheel/issues/962
CIBW_ENVIRONMENT: PIP_USE_DEPRECATED=out-of-tree-build
CIBW_BUILD: ${{ matrix.python }}*64
CIBW_TEST_EXTRAS: dev
CIBW_TEST_COMMAND: pytest {project}/tests --cov-report xml:${{ matrix.cov_file }} --junit-xml=${{ matrix.results_file }}
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "iocStats"]
path = iocStats
path = softioc/iocStats
url = https://github.com/epics-modules/iocStats.git
19 changes: 8 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ console_scripts =
softioc =
access.acf
device.dbd
devIocStats.dbd
iocStatsDb/*
iocStats/devIocStats/*
iocStats/iocAdmin/Db/*
# Include the OS specific files in the sdist, even
# if not packages by setup.py (as we only build sdist on one arch)
iocStats/devIocStats/os/default/*
iocStats/devIocStats/os/Darwin/*
iocStats/devIocStats/os/WIN32/*
iocStats/devIocStats/os/Linux/*

[options.extras_require]
# Useful extras for use at DLS
Expand All @@ -48,15 +54,6 @@ dev =
cothread; sys_platform != "win32"
p4p

# Include the OS specific files in the sdist, even
# if not packages by setup.py (as we only build sdist on one arch)
[options.data_files]
iocStats/devIocStats = iocStats/devIocStats/*.c, iocStats/devIocStats/*.h
iocStats/devIocStats/os/default = iocStats/devIocStats/os/default/*
iocStats/devIocStats/os/Darwin = iocStats/devIocStats/os/Darwin/*
iocStats/devIocStats/os/WIN32 = iocStats/devIocStats/os/WIN32/*
iocStats/devIocStats/os/Linux = iocStats/devIocStats/os/Linux/*

[flake8]
max-line-length = 80
extend-ignore =
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"osdPIDInfo.c",
]

devIocStats_src = os.path.join("iocStats", "devIocStats")
devIocStats_src = os.path.join("softioc", "iocStats", "devIocStats")
devIocStats_os = os.path.join(devIocStats_src, "os", get_config_var('OS_CLASS'))
devIocStats_default = os.path.join(devIocStats_src, "os", "default")

Expand Down
3 changes: 2 additions & 1 deletion softioc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
iocshRegisterCommon()
for dbd in ('base.dbd', 'PVAServerRegister.dbd', 'qsrv.dbd'):
dbLoadDatabase(dbd, os.path.join(path.base_path, 'dbd'), None)
dbLoadDatabase('devIocStats.dbd', os.path.dirname(__file__), None)
iocStats = os.path.join(os.path.dirname(__file__), "iocStats", "devIocStats")
dbLoadDatabase('devIocStats.dbd', iocStats, None)

if registerRecordDeviceDriver(pdbbase):
raise RuntimeError('Error registering')
Expand Down
1 change: 0 additions & 1 deletion softioc/devIocStats.dbd

This file was deleted.

1 change: 0 additions & 1 deletion softioc/iocStatsDb

This file was deleted.

3 changes: 2 additions & 1 deletion softioc/softioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ def devIocStats(ioc_name):
'''This will load a template for the devIocStats library with the specified
IOC name. This should be called before `iocInit`'''
substitutions = 'IOCNAME=' + ioc_name + ', TODFORMAT=%m/%d/%Y %H:%M:%S'
iocstats_dir = os.path.join(os.path.dirname(__file__), 'iocStatsDb')
iocstats_dir = os.path.join(
os.path.dirname(__file__), 'iocStats', 'iocAdmin', 'Db')
_add_records_from_file(iocstats_dir, 'ioc.template', substitutions)


Expand Down

0 comments on commit 79e67ab

Please sign in to comment.