Skip to content

Commit

Permalink
fix github test action
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelloPerathoner committed Sep 24, 2023
1 parent 7e797c9 commit 599ffff
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: Install dependencies
run: |
make install
- name: Run tox
- name: Run tests
run: |
make tox-e
make test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pylintgraph.dot
.mypy_cache/
.pytest_cache/
.venv/
.vscode/

# Byte-compiled / optimized / DLL files
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: lint test dist upload docs

ENV=env
ENV=.venv
BIN=$(ENV)/bin/
DIRS=src/ tests/unit/ tests/performance/ scripts/ docs/
BROWSER=firefox
Expand Down Expand Up @@ -54,9 +54,6 @@ badges: test coverage
tox:
$(BIN)tox

tox-e:
$(BIN)tox -e py

dist: clean test coverage badges
$(BIN)python -m build
$(BIN)twine check dist/*
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ skip_missing_interpreters = True
[testenv]
allowlist_externals = make
deps = pytest
commands = make test
commands = make BIN= test
"""
4 changes: 2 additions & 2 deletions src/suffix_tree/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class Builder:
def __init__(self):
self.root: Internal
self.id: Id
self.progress: Optional[Callable[[int], None]] | None = None
self.progress: Optional[Callable[[int], None]] = None
self.progress_tick = 1

def build(self, root: Internal, id_: Id, S: IterSymbols) -> None:
"""Add the sequence to the tree."""
raise NotImplementedError()

def set_progress_function(
self, tick: int, callback: Callable[[int], None] | None = None
self, tick: int, callback: Optional[Callable[[int], None]] = None
):
"""Set a progress indicator callback function.
Expand Down
8 changes: 4 additions & 4 deletions src/suffix_tree/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import collections
import itertools
from typing import Optional, Union, Tuple, List, Dict
from typing import Dict, List, Optional, Tuple, Union

from . import lca_mixin
from .builder import Builder
from .builder_factory import builder_factory
from .node import Node, Internal
from .util import Path, UniqueEndChar, Id, Symbols
from .node import Internal, Node
from .util import Id, Path, Symbols, UniqueEndChar

# builder_type: TypeAlias = Union[Builder, type, str, None]
builder_type = Union[Builder, type, str, None]
Expand Down Expand Up @@ -51,7 +51,7 @@ class Tree(lca_mixin.Tree):

def __init__(
self,
data: Dict[Id, Symbols] | None = None,
data: Optional[Dict[Id, Symbols]] = None,
*,
builder: builder_type = None,
):
Expand Down

0 comments on commit 599ffff

Please sign in to comment.