Skip to content

Commit

Permalink
Merge pull request #18 from jcorreia11/fix_release
Browse files Browse the repository at this point in the history
Fix release
  • Loading branch information
jcorreia11 authored Oct 21, 2022
2 parents 316e832 + 204aa74 commit 6592f37
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

10 changes: 8 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[metadata]
name = biocatalyzer
version = 0.0.2-beta
version = 0.0.4-beta
description = BioCatalyzer: a rule-based tool to predict compound metabolism
long_description = file: README.md
long_description_content_type = text/markdown
keywords = reaction-rules, metabolism, enzymatic-reactions, chemoinformatics, cheminformatics
author = João Correia
author_email = [email protected]
url = https://github.com/jcorreia11/BioCatalyzer
download_url = https://github.com/jcorreia11/BioCatalyzer/archive/refs/tags/v0.0.2-beta.tar.gz
download_url = https://github.com/jcorreia11/BioCatalyzer/archive/refs/tags/v0.0.4-beta.tar.gz
license = MIT
license_file = LICENSE
platforms = unix, linux, osx, cygwin, win32
Expand Down Expand Up @@ -49,6 +49,12 @@ testing =

[options.package_data]
biocatalyzer = py.typed
biocatalyzer.data.byproducts_to_remove=
*.tsv
biocatalyzer.data.patterns_to_remove=
*.tsv
biocatalyzer.data.reactionrules=
all_reaction_rules_forward_no_smarts_duplicates_sample.tsv

[flake8]
max-line-length = 160
6 changes: 3 additions & 3 deletions src/biocatalyzer/io_utils/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def load_organisms(path):
pd.DataFrame:
pandas dataframe with the organisms to use.
"""
if not path:
if path is None or path == 'None':
return 'ALL'
if Loaders._verify_file(path):
orgs = pd.read_csv(path, header=0, sep='\t')
Expand Down Expand Up @@ -135,7 +135,7 @@ def load_byproducts_to_remove(path):
pd.DataFrame:
pandas dataframe with the byproducts to remove.
"""
if not path:
if path is None or path == 'None':
return []
byproducts = pd.read_csv(path, header=0, sep='\t')
if 'smiles' not in byproducts.columns:
Expand All @@ -157,7 +157,7 @@ def load_patterns_to_remove(path):
pd.DataFrame:
pandas dataframe with the patterns to remove.
"""
if not path:
if path is None or path == 'None':
return []
patterns = pd.read_csv(path, header=0, sep='\t')
if 'smarts' not in patterns.columns:
Expand Down
10 changes: 10 additions & 0 deletions tests/unit_tests/clis/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,13 @@ def test_biocatalyzer_full(self):
f"--ms_data_path={self.ms_data_path} --mode={self.mode} --tolerance={self.tolerance} "
f"--n_jobs={self.n_jobs}")
self.assertEqual(exit_status, 0)

def test_biocatalyzer_full2(self):
exit_status = os.system(f"biocatalyzer_cli {self.compounds_path} {self.output_folder} "
f"--neutralize={self.neutralize} --reaction_rules={self.reaction_rules_path} "
f"--patterns_to_remove={None} "
f"--molecules_to_remove={None} "
f"--min_atom_count={self.min_atom_count} --match_ms_data={self.match_ms_data} "
f"--ms_data_path={self.ms_data_path} --mode={self.mode} --tolerance={self.tolerance} "
f"--n_jobs={self.n_jobs}")
self.assertEqual(exit_status, 0)

0 comments on commit 6592f37

Please sign in to comment.