Skip to content

Commit

Permalink
Merge pull request #229 from cylc/prepare-0.5.0
Browse files Browse the repository at this point in the history
Prepare release: 0.5.0
  • Loading branch information
kinow committed Jul 29, 2021
2 parents cf2a327 + 0db30c9 commit 47096f4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ creating a new release entry be sure to copy & paste the span tag with the
updated. Only the first match gets replaced, so it's fine to leave the old
ones in. -->
-------------------------------------------------------------------------------
## __cylc-uiserver-0.5.0 (<span actions:bind='release-date'>Released 2021-?-?</span>)__
## __cylc-uiserver-0.5.0 (<span actions:bind='release-date'>Released 2021-07-28</span>)__

### Enhancements

Expand Down
2 changes: 1 addition & 1 deletion cylc/uiserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

__version__ = "0.4.0"
__version__ = "0.5.0"
10 changes: 5 additions & 5 deletions cylc/uiserver/websockets/tornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
GQL_COMPLETE
)

from typing import Union, Awaitable, Any, List, Tuple, Dict
from typing import Union, Awaitable, Any, List, Tuple, Dict, Optional

setup_observable_extension()

Expand Down Expand Up @@ -153,14 +153,14 @@ async def send_execution_result(self, connection_context, op_id,
"""
resolving_items: List[Awaitable[Any]] = []

queue: List[Tuple[Union[List[Any], Dict[Union[int, str], Any]], Union[
int, str], Any]] = [
queue: List[Tuple[Any, Optional[Union[int, str]], Any]] = [
(
None,
None,
execution_result.data,
),
]

while queue:
container, key, item = queue.pop(0)

Expand All @@ -172,7 +172,7 @@ async def send_execution_result(self, connection_context, op_id,

elif isawaitable(item):
container = container if container is not None else queue
key = key if key is not None else 0
key: Union[int, str] = key if key is not None else 0

resolving_items.append(
self.__resolve_container_item(container, key, item))
Expand All @@ -191,7 +191,7 @@ async def send_execution_result(self, connection_context, op_id,

async def __resolve_container_item(
self,
container: Union[List[Any], Dict[Union[int, str], Any]],
container: Any,
key: Union[int, str],
item: Awaitable[Any],
) -> None:
Expand Down
10 changes: 7 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[mypy]
python_version = 3.7
strict_equality = True
ignore_missing_imports = True
files = cylc/uiserver
# don't run mypy on these files directly
exclude = cylc/uiserver/(websockets/tornado.py|config_defaults.py)
# don't run mypy on those files when imported from other modules
follow_imports = silent

# Enable PEP 420 style namespace packages, which we use.
# Needed for associating "import foo.bar" with foo/bar.py
namespace_packages = True
# Need this because we don't have __init__.py in top-level dir:
explicit_package_bases = True

allow_redefinition = True
strict_equality = True
show_error_codes = True
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def find_version(*file_paths):
# NB: no graphene version specified; we only make light use of it in our own
# code, so graphene-tornado's transitive version should do.
install_requires = [
'cylc-flow>=8.0b0',
'cylc-flow>=8.0b2',
'jupyterhub==1.4.*',
'tornado==6.1.*',
'graphene-tornado==2.6.*',
Expand All @@ -63,11 +63,12 @@ def find_version(*file_paths):
tests_require = [
'coverage>=5.0.0',
'flake8>=3.0.0',
'mypy>=0.812',
'pytest>=6',
'mypy>=0.900',
'pytest-asyncio>=0.14.0',
'pytest-cov>=2.8.0',
'pytest-mock',
'pytest>=6',
'types-pkg_resources>=0.1.2',
]

extras_require = {
Expand Down

0 comments on commit 47096f4

Please sign in to comment.