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

Docs re-write, including for asyncio support #14

Merged
merged 16 commits into from
Jul 2, 2021

Conversation

AlexanderWells-diamond
Copy link
Collaborator

Wrote several how-to guides, re-wrote the "Creating an IOC" tutorial, wrote example code for IOCs using cothread and asyncio, and another example for how to remotely read from those example IOCs.

AlexanderWells-diamond and others added 13 commits June 25, 2021 08:25
Extracted out the example file for ease of code sharing.

Need to extract "creating a publishable ioc" into a how-to guide shortly.
Includes extracting out the creation of publishable IOC to a separate how-to page (which is currently just a copy-paste of the text from the tutorial page)
It still doesn't work as I expect - the second caget on AI always returns 5.0, not 999...
Add a docstring to AsyncioDispatcher.__init__ to suppress the docstring from threading.Thread, which is misleading.
@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

Merging #14 (79e0cba) into master (3b3c47b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #14   +/-   ##
=======================================
  Coverage   81.80%   81.80%           
=======================================
  Files          13       13           
  Lines         797      797           
=======================================
  Hits          652      652           
  Misses        145      145           
Impacted Files Coverage Δ
softioc/asyncio_dispatcher.py 87.50% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b3c47b...79e0cba. Read the comment docs.

Copy link
Contributor

@thomascobb thomascobb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, hopefully you can remove lots of :role: prefixes, but the content looks fine

docs/how-to/make-publishable-ioc.rst Outdated Show resolved Hide resolved
docs/how-to/read-data-from-ioc.rst Outdated Show resolved Hide resolved
.. note::
You may see warnings regarding the missing "caRepeater" program. This is an EPICS tool
that is used to track when PVs start and stop. It is not required for this simple example,
and so the warning can be ignored.
Copy link
Contributor

@thomascobb thomascobb Jul 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to DiamondLightSource/aioca#12 (comment) then if you upgrade the epicscorelibs dependency to epicscorelibs>=7.0.5.99.1.0a2 (in pyproject.toml) then remove the Pipfile.lock and run pipenv --rm && pipenv install --dev then these warnings should go away. Please could you try that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this update causes tests to fail due to a missing import. I also see the same error when just trying to start up my example IOCs:
File "docs/examples/example_cothread_ioc.py", line 2, in <module> from softioc import softioc, builder ModuleNotFoundError: No module named 'softioc'

I can verify that this is entirely caused by changing the epicscorelibs dependency - swapping the required version back and reinstalling the pipenv makes the tests (and my example IOCs) work again.
I can't say I understand this error at the moment, so I'll investigate it a little more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, you need to do dls-py3 download-one-dependency epicscorelibs 7.0.5.99.1.0a2 first

docs/tutorials/creating-an-ioc.rst Outdated Show resolved Hide resolved
@thomascobb thomascobb merged commit 7baaad3 into master Jul 2, 2021
@thomascobb thomascobb deleted the documentation_update branch July 2, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants