Skip to content

Commit ca7cf3f

Browse files
committed
Fix installation
1 parent d6a563a commit ca7cf3f

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

pyproject.toml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@ build-backend = "setuptools.build_meta"
55
[tool.black]
66
line-length = 88
77

8-
[metadata]
9-
name = needleman-wunsch
10-
version = 0.1.0
11-
description = Needleman-Wunsch
12-
license = MIT
8+
[project]
9+
name = "needleman-wunsch"
10+
version = "0.1.0"
11+
description = "Needleman-Wunsch"
12+
license = {text = "MIT"}
13+
dependencies = [
14+
"matplotlib",
15+
]
1316

17+
[project.optional-dependencies]
18+
html = ["jinja2"]
19+
pdf = ["reportlab"]
1420

15-
[options]
16-
package_dir =
17-
= src
18-
packages = find:
21+
[tool.setuptools]
22+
package-dir = {"" = "src"}
23+
packages = {find = {where = ["src"]}}
1924

20-
[options.packages.find]
21-
where = src
25+
[project.scripts]
26+
needleman-wunsch = "aligner.cli:main"
2227

23-
[options.entry_points]
24-
controle_scripts =
25-
needleman-wunsch = aligner.cli:main
26-
27-
[mypy]
28-
mypy_path = src
29-
ignore_missing_imports = True
28+
[tool.mypy]
29+
mypy_path = "src"
30+
ignore_missing_imports = true

src/aligner/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
import os
33
from aligner.html_report import format_html_report
44
from typing import Optional
5-
from src.aligner.plot import plot_matrix
5+
from aligner.plot import plot_matrix
66
from aligner.pdf_report import write_pdf
7-
from src.aligner.core import (
7+
from aligner.core import (
88
build_score_matrix,
99
traceback as single_traceback,
1010
trace_all_paths,
1111
)
12-
from src.aligner.io import (
12+
from aligner.io import (
1313
create_output_dict,
1414
format_multi_report,
1515
format_report,
@@ -169,6 +169,9 @@ def main():
169169

170170
if args.output:
171171
write_report(args.output, report_text)
172+
else:
173+
# Print report to console when no output file is specified
174+
print(report_text)
172175

173176
if args.json_out:
174177
data = create_output_dict(

src/aligner/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from typing import List, Tuple
2-
from src.aligner.models import Sequence
2+
from aligner.models import Sequence
33

44

55
def build_score_matrix(

src/aligner/io.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import csv
22
import json
33
from typing import Dict, List, Tuple
4-
from src.aligner.models import Sequence
54
from aligner.models import Sequence
65

76

0 commit comments

Comments
 (0)