-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'remove-contexts' into main
- Loading branch information
Showing
50 changed files
with
854 additions
and
799 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.. | ||
Use the file automatically generated by dae-devops. | ||
.. include:: ../../.dae-devops/docs/conventions.rst |
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,4 @@ | ||
.. | ||
Use the file automatically generated by dae-devops. | ||
.. include:: ../../.dae-devops/docs/docs_structure.rst |
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,12 @@ | ||
:orphan: | ||
|
||
Explanations | ||
============ | ||
|
||
Explanation, or discussions, clarify and illuminate a particular topic. They broaden the documentation's coverage of a topic. | ||
|
||
.. toctree:: | ||
|
||
docs_structure | ||
conventions | ||
todo |
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,7 @@ | ||
TODO | ||
======================================================================= | ||
|
||
- Remove matplotlib from imports done by mib2hdfConvert package to decrease load time and debug volume. | ||
- Make sure we can collect and process mib files which are not in a material subdirectory. | ||
- Add unit tests for the mib_convert task. | ||
|
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,4 @@ | ||
.. | ||
Use the file automatically generated by dae-devops. | ||
.. include:: ../../.dae-devops/docs/developing.rst |
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,4 @@ | ||
.. | ||
Use the file automatically generated by dae-devops. | ||
.. include:: ../../.dae-devops/docs/devops.rst |
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,4 @@ | ||
.. | ||
Use the file automatically generated by dae-devops. | ||
.. include:: ../../.dae-devops/docs/documenting.rst |
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,16 @@ | ||
:orphan: | ||
|
||
How-to Guides | ||
============= | ||
|
||
How-to guides take the reader through the steps required to solve a real-world problem. | ||
Practical step-by-step guides for the more experienced user. | ||
|
||
.. toctree:: | ||
|
||
installing | ||
developing | ||
testing | ||
documenting | ||
devops | ||
|
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,6 @@ | ||
.. | ||
Use the file automatically generated by dae-devops. | ||
.. include:: ../../.dae-devops/docs/installing.rst | ||
|
||
Since this package is just a library, the command line doesn't do anything else besides print the 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.. | ||
Use the file automatically generated by dae-devops. | ||
.. include:: ../../.dae-devops/docs/testing.rst |
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,7 +1,14 @@ | ||
dls-servbase | ||
======================================================================= | ||
|
||
Simple HTTP service for database operations. | ||
|
||
Agnostic of type of underlying sql client, provides single-writer access to native database and has a predefined database schema for cookies. | ||
|
||
.. toctree:: | ||
:caption: API-caption | ||
:hidden: | ||
:titlesonly: | ||
|
||
api/index | ||
tutorials/index | ||
how-to/index | ||
explanations/index | ||
reference/index |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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,11 @@ | ||
:orphan: | ||
|
||
Tutorials | ||
========= | ||
|
||
Tutorials are lessons that take the reader by the hand through a series of steps to complete a project of some kind. | ||
They are what your project needs in order to show a beginner that they can achieve something with it. | ||
|
||
.. toctree:: | ||
|
||
tbd |
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,4 @@ | ||
TBD Tutorial | ||
======================================================================= | ||
|
||
TBD |
Empty file.
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,2 +1,8 @@ | ||
class Keywords: | ||
ENABLE_COOKIES = "dls_servbase_api::keywords::enable_cookies" | ||
|
||
|
||
# ---------------------------------------------------------------------------------------- | ||
class ClassTypes: | ||
AIOHTTP = "dls_servbase_lib.datafaces.aiohttp" | ||
NORMSQL = "dls_servbase_lib.datafaces.normsql" |
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
File renamed without changes.
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,23 @@ | ||
import logging | ||
|
||
# Class for an aiohttp client. | ||
from dls_servbase_api.aiohttp_client import AiohttpClient | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
# ------------------------------------------------------------------------------------------ | ||
class Aiohttp(AiohttpClient): | ||
""" | ||
Object implementing client side API for talking to the dls_servbase_gui server. | ||
Please see doctopic [A01]. | ||
""" | ||
|
||
# ---------------------------------------------------------------------------------------- | ||
def __init__(self, specification): | ||
|
||
# We will get an umbrella specification which must contain an aiohttp_specification within it. | ||
AiohttpClient.__init__( | ||
self, | ||
specification["type_specific_tbd"]["aiohttp_specification"], | ||
) |
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,11 @@ | ||
class Keywords: | ||
COMMAND = "dls_servbase_guis::keywords::command" | ||
PAYLOAD = "dls_servbase_guis::keywords::payload" | ||
|
||
|
||
class Commands: | ||
EXECUTE = "dls_servbase_guis::commands::execute" | ||
|
||
|
||
class Types: | ||
AIOHTTP = "dls_servbase_lib.guis.aiohttp" |
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,43 @@ | ||
import logging | ||
|
||
# Base class. | ||
from dls_utilpack.client_context_base import ClientContextBase | ||
|
||
# Things created in the context. | ||
from dls_servbase_api.guis.guis import Guis, dls_servbase_guis_set_default | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Context(ClientContextBase): | ||
""" | ||
Client context for a dls_servbase_gui object. | ||
On entering, it creates the object according to the specification (a dict). | ||
On exiting, it closes client connection. | ||
The aenter and aexit methods are exposed for use by an enclosing context and the base class. | ||
""" | ||
|
||
# ---------------------------------------------------------------------------------------- | ||
def __init__(self, specification): | ||
ClientContextBase.__init__(self, specification) | ||
|
||
# ---------------------------------------------------------------------------------------- | ||
async def aenter(self): | ||
""" """ | ||
|
||
# Build the object according to the specification. | ||
self.interface = Guis().build_object(self.specification) | ||
|
||
# If there is more than one gui, the last one defined will be the default. | ||
dls_servbase_guis_set_default(self.interface) | ||
|
||
# ---------------------------------------------------------------------------------------- | ||
async def aexit(self): | ||
""" """ | ||
|
||
if self.interface is not None: | ||
await self.interface.close_client_session() | ||
|
||
# Clear the global variable. Important between pytests. | ||
dls_servbase_guis_set_default(None) |
Oops, something went wrong.