-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from MaxHerbs/main
Added global handler
- Loading branch information
Showing
26 changed files
with
197 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
# Changes here will be overwritten by Copier | ||
_commit: 2.1.0 | ||
_commit: 2.3.0 | ||
_src_path: gh:diamondlightsource/python-copier-template | ||
author_email: [email protected] | ||
author_name: Giles Knap | ||
component_owner: group:default/sscc | ||
description: Conversion tool for DLS XML builder IOC instances to ibek ioc.yaml | ||
distribution_name: builder2ibek | ||
docker: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Bug Report | ||
about: The template to use for reporting bugs and usability issues | ||
title: " " | ||
labels: 'bug' | ||
assignees: '' | ||
|
||
--- | ||
|
||
Describe the bug, including a clear and concise description of the expected behavior, the actual behavior and the context in which you encountered it (ideally include details of your environment). | ||
|
||
## Steps To Reproduce | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
|
||
## Acceptance Criteria | ||
- Specific criteria that will be used to judge if the issue is fixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: Issue | ||
about: The standard template to use for feature requests, design discussions and tasks | ||
title: " " | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
A brief description of the issue, including specific stakeholders and the business case where appropriate | ||
|
||
## Acceptance Criteria | ||
- Specific criteria that will be used to judge if the issue is fixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Fixes #ISSUE | ||
|
||
### Instructions to reviewer on how to test: | ||
1. Do thing x | ||
2. Confirm thing y happens | ||
|
||
### Checks for reviewer | ||
- [ ] Would the PR title make sense to a user on a set of release notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
<link rel="canonical" href="main/index.html"> | ||
</head> | ||
|
||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ cov.xml | |
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/_api | ||
|
||
# PyBuilder | ||
target/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
"recommendations": [ | ||
"ms-vscode-remote.remote-containers", | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
"problemMatcher": [], | ||
} | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# yaml-language-server: $schema=/epics/ibek-defs/ioc.schema.json | ||
|
||
ioc_name: "{{ __utils__.get_env('IOC_NAME') }}" | ||
|
||
description: auto-generated by https://github.com/epics-containers/builder2ibek | ||
|
||
entities: | ||
|
||
- type: epics.EpicsEnvSet | ||
name: EPICS_TS_MIN_WEST | ||
value: '0' | ||
|
||
- type: devIocStats.iocAdminSoft | ||
IOC: '{{ ioc_name | upper }}' | ||
|
||
- type: epics.EpicsCaMaxArrayBytes | ||
max_bytes: 9000000 | ||
|
||
- type: devIocStats.devIocStatsHelper | ||
__command__: delete | ||
ioc: BL99P-EA-IOC-05 | ||
name: IOC-STATS | ||
|
||
- type: ADAndor.andorCCD | ||
ADDR: 0 | ||
BUFFERS: 2000 | ||
INSTALLPATH: /dls_sw/prod/R3.14.12.7/support/ANAndor/etc | ||
P: BL99P-EA-DET-03 | ||
PORT: DET3.cam | ||
R: ':CAM:' | ||
TIMEOUT: 1 | ||
|
||
- type: ADCore.NDPosPlugin | ||
ADDR: 0 | ||
BLOCK: 0 | ||
ENABLED: 1 | ||
NDARRAY_PORT: DET3.cam | ||
P: BL99P-EA-DET-03 | ||
PORT: DET3.pos | ||
QUEUE: 1000 | ||
R: ':POS:' | ||
TIMEOUT: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
"""Top level API. | ||
.. data:: __version__ | ||
:type: str | ||
Version number as calculated by https://github.com/pypa/setuptools_scm | ||
""" | ||
|
||
from ._version import __version__ | ||
|
||
__all__ = ["__version__"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,4 +67,4 @@ | |
PORT: $(PORTPREFIX).hdf | ||
QUEUE: $(PLUGINQUEUE=16) | ||
R: ':HDF5:' | ||
TIMEOUT: 1 | ||
TIMEOUT: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from builder2ibek.types import Entity, Generic_IOC | ||
|
||
xml_component = "global" | ||
|
||
|
||
def globalHandler( | ||
entity: Entity, entity_type: str, ioc: Generic_IOC, target_handler=None | ||
): | ||
entity.remove("gda_name") | ||
entity.remove("gda_desc") | ||
|
||
if target_handler: | ||
return target_handler(entity, entity_type, ioc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" ?> | ||
<components arch="linux-x86_64"> | ||
<EPICS_BASE.EpicsEnvSet key="EPICS_CA_MAX_ARRAY_BYTES" value="9000000"/> | ||
<devIocStats.devIocStatsHelper ioc="BL99P-EA-IOC-05" name="IOC-STATS"/> | ||
<!--ADAndor.andorCCD ADDR="0" BUFFERS="2000" INSTALLPATH="/dls_sw/prod/R3.14.12.7/support/andorCCDSDK/2-102dls4/andorCCDSDKApp/src/sdk/andor/etc" P="BL99P-EA-DET-03" PORT="DET3.cam" R=":CAM:" TIMEOUT="1"/--> | ||
<ADAndor.andorCCD ADDR="0" BUFFERS="2000" INSTALLPATH="/dls_sw/prod/R3.14.12.7/support/ANAndor/etc" P="BL99P-EA-DET-03" PORT="DET3.cam" R=":CAM:" TIMEOUT="1"/> | ||
<!--<ADZMQ.NDZMQPlugin DEST_ADDR="127.0.0.1:1515" NDARRAY_PORT="DET3.cam" P="BL99P-EA-DET-03" PORT="DET3.zmq" QUEUE="1000" R=":ZMQ:" TRANSPORT="tcp" ZMQ_TYPE="PUSH"/>--> | ||
<ADCore.NDPosPlugin ADDR="0" BLOCK="0" ENABLED="1" NDARRAY_PORT="DET3.cam" P="BL99P-EA-DET-03" PORT="DET3.pos" QUEUE="1000" R=":POS:" TIMEOUT="1"/> | ||
</components> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import subprocess | ||
import sys | ||
|
||
|
||
def test_cli_version(): | ||
conversion_samples = [ | ||
"tests/samples/BL45P-MO-IOC-01.xml", | ||
"tests/samples/BL99P-EA-IOC-05.xml", | ||
] | ||
|
||
for sample in conversion_samples: | ||
cmd = [ | ||
sys.executable, | ||
"-m", | ||
"builder2ibek", | ||
"file", | ||
"--yaml", | ||
"out.yaml", | ||
sample, | ||
] | ||
result = subprocess.run(cmd) | ||
assert result.returncode == 0 |