Skip to content

Commit

Permalink
fix: attempt to fix data finding problems via symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Aug 12, 2024
1 parent f5b915a commit 6643b62
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 126 deletions.
Empty file added CHANGELOG.md
Empty file.
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include CHANGELOG.md
include CITATION.cff
include LICENSE
include VERSION
include pyproject.toml
118 changes: 0 additions & 118 deletions pyproject.toml

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions src/ccbr_tools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,24 @@ def cite(citation_file, output_format):
print_citation(citation_file=citation_file, output_format=output_format)

Check warning on line 65 in src/ccbr_tools/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/ccbr_tools/__main__.py#L65

Added line #L65 was not covered by tests


@click.command()
@click.option(
"--debug",
"-d",
help="Print the path to the VERSION file",
type=bool,
default=False,
is_flag=True,
)
def version(debug):
"""
Print the version of ccbr_tools
"""
print(get_version(debug=debug))

Check warning on line 81 in src/ccbr_tools/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/ccbr_tools/__main__.py#L81

Added line #L81 was not covered by tests


cli.add_command(cite)
cli.add_command(version)


def main():
Expand Down
118 changes: 118 additions & 0 deletions src/ccbr_tools/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
[build-system]
requires = [
"setuptools >= 62.3.0",
"wheel >= 0.29.0",
]
build-backend = 'setuptools.build_meta'

[project]
name = 'ccbr_tools'
dynamic = ['version','readme']
description = "Utilities for CCBR Bioinformatics Software"
authors = [
{name = "Kelly Sovacool", email = "kelly.sovacool@nih.gov"},
{name = "Vishal Koparde", email = "vishal.koparde@nih.gov"},
{name = "Skyler Kuhn"},
]
maintainers = [
{name = "CCR Collaborative Bioinformatics Resource", email = "ccbr@mail.nih.gov"},
]
license = {file = "LICENSE"}
classifiers = [
"Environment :: Console",
"Environment :: MacOS X",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT license",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
requires-python = ">=3.10, <3.12"
dependencies = [
"biopython",
"cffconvert >= 2.0.0",
"Click >= 8.1.3",
"pandas",
"pyyaml >= 6.0",
"requests"
]

[project.optional-dependencies]
dev = [
"black >= 23.10.0",
"jupyter",
"pre-commit"
]
test = [
"pytest",
"pytest-cov"
]

[project.scripts]
ccbr_tools = "ccbr_tools.__main__:main"
gb2gtf = "ccbr_tools.gb2gtf:main"
hf = "ccbr_tools.homologfinder.hf:main"
jobby = "ccbr_tools.jobby:main"
jobinfo = "ccbr_tools.jobinfo:main"
intersect = "ccbr_tools.intersect:main"
peek = "ccbr_tools.peek:main"

[project.urls]
Repository = "https://github.com/CCBR/Tools"

[tool.numpydoc_validation]
checks = [
"all", # report on all checks, except the below
"EX01",
"SA01",
"ES01",
]
# remember to use single quotes for regex in TOML
exclude = [ # don't report on objects that match any of these regex
'\.undocumented_method$',
'\.__repr__$',
]
override_SS05 = [ # override SS05 to allow docstrings starting with these words
'^Process ',
'^Assess ',
'^Access ',
]

[tool.setuptools.package-data]
"*" = ["LICENSE", "VERSION", "CITATION.cff", "CHANGELOG.md", "pyproject.toml"]

[tool.setuptools.dynamic]
version = {file = "VERSION"}
readme = {file = "README.md"}

[tool.setuptools]
script-files = [
"scripts/add_gene_name_to_count_matrix.R",
"scripts/aggregate_data_tables.R",
"scripts/argparse.bash",
"scripts/cancel_snakemake_jobs.sh",
"scripts/create_hpc_link.sh",
"scripts/extract_value_from_json.py",
"scripts/extract_value_from_yaml.py",
"scripts/filter_bam_by_readids.py",
"scripts/filter_fastq_by_readids_highmem.py",
"scripts/filter_fastq_by_readids_highmem_pe.py",
"scripts/gather_cluster_stats.sh",
"scripts/gather_cluster_stats_biowulf.sh",
"scripts/get_buyin_partition_list.bash",
"scripts/get_slurm_file_with_error.sh",
"scripts/gsea_preranked.sh",
"scripts/karyoploter.R",
"scripts/make_labels_for_pipeliner.sh",
"scripts/rawcounts2normalizedcounts_DESeq2.R",
"scripts/rawcounts2normalizedcounts_limmavoom.R",
"scripts/run_jobby_on_nextflow_log",
"scripts/run_jobby_on_nextflow_log_full_format",
"scripts/run_jobby_on_snakemake_log",
"scripts/run_jobby_on_snakemake_log_full_format",
"scripts/which_vpn.sh"
]
13 changes: 7 additions & 6 deletions src/ccbr_tools/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@ def repo_base(*paths):
"""Get the absolute path to a file in the repository
@return abs_path <str>
"""
basedir = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
)
return os.path.join(basedir, *paths)
basedir = pathlib.Path(__file__).absolute().parent
return basedir.joinpath(*paths)


def get_version():
def get_version(debug=False):
"""Get the current version of the ccbr_tools package
@param pkg_name <str> : name of the package (default: ccbr_tools)
@return version <str>
"""
with open(repo_base("VERSION"), "r") as infile:
version_path = repo_base("VERSION")
if debug:
print("VERSION file path:", version_path)

Check warning on line 29 in src/ccbr_tools/util.py

View check run for this annotation

Codecov / codecov/patch

src/ccbr_tools/util.py#L29

Added line #L29 was not covered by tests
with open(version_path, "r") as infile:
return infile.read().strip().lstrip("v")


Expand Down

0 comments on commit 6643b62

Please sign in to comment.