Skip to content

Commit

Permalink
Merge pull request #23 from metagenlab/dev
Browse files Browse the repository at this point in the history
update workflows and bump tool versions
  • Loading branch information
farchaab authored Oct 22, 2024
2 parents 2ee35ae + e1765d3 commit 22f4331
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 43 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
paths:
- ".github/workflows/build-docs.yml"
- "docs/**"
- "mkdocs.yml"
- "!Dockerfile"
- "!.github/workflows/docker-publish.yml"
- "!.github/workflows/unit-tests.yml"
- "!tests/**"
- "!assembly_finder/**"
- "!setup.py"
- "!README.md"

# Cancel if a newer run is started
concurrency:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ on:
push:
branches: [main]
paths:
- "Dockerfile"
- ".github/workflows/docker-publish.yml"
- "tests/**"
- "assembly_finder/**"
- "setup.py"
- "Dockerfile"
- ".github/workflows/docker-publish.yml"
- "tests/**"
- "assembly_finder/**"
- "setup.py"
- "!docs/**"
- "!README.md"
- "!mkdocs.yml"
release:
types: [published]

Expand Down Expand Up @@ -54,4 +57,4 @@ jobs:
push: true
tags: |
ghcr.io/metagenlab/assembly_finder:${{ github.event.release.tag_name }}
ghcr.io/metagenlab/assembly_finder:latest
ghcr.io/metagenlab/assembly_finder:latest
12 changes: 4 additions & 8 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ name: Tests

on:
push:
branches: ["main"]
paths:
- ".github/workflows/unit-tests.yml"
- "tests/**"
- "assembly_finder/**"
- "setup.py"
pull_request:
branches: ["main"]
branches: ["main","dev"]
paths:
- ".github/workflows/unit-tests.yml"
- "tests/**"
- "assembly_finder/**"
- "setup.py"
- "!.github/workflows/build-docs.yml"
- "!docs/**"
- "!mkdocs.yml"

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ tests/__pycache__
taxons/
.snakemake
.taxonkit/
test_out/
10 changes: 1 addition & 9 deletions assembly_finder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def common_options(func):
"--output",
"--taxonkit",
"--threads",
"--requests",
"--taxon",
"--rank",
"--nrank",
Expand Down Expand Up @@ -206,13 +205,6 @@ def common_options(func):
default=None,
)
@click.option("--api-key", type=str, help="NCBI api-key", default=None)
@click.option(
"--requests",
type=int,
help="Number of NCBI datasets commands to run in parallel",
default=1,
show_default=True,
)
@click.option(
"--compressed",
type=bool,
Expand Down Expand Up @@ -257,7 +249,7 @@ def common_options(func):
@click.option(
"--annotated",
type=bool,
help="Select annotated genomes only",
help="Limit to annotated genomes only",
default=False,
show_default=True,
)
Expand Down
2 changes: 1 addition & 1 deletion assembly_finder/assembly_finder.LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024, Farid Chaabane
Copyright (c) 2024, metagenlab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion assembly_finder/assembly_finder.VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.7
0.8.0
1 change: 0 additions & 1 deletion assembly_finder/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ args:
profile:
rank:
reference:
requests:
snake_args:
snake_default:
source:
Expand Down
3 changes: 1 addition & 2 deletions assembly_finder/workflow/envs/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ channels:
- conda-forge
- defaults
dependencies:
- ncbi-datasets-cli =16.26.2
- ca-certificates
- ncbi-datasets-cli =16.31.0
8 changes: 0 additions & 8 deletions assembly_finder/workflow/rules/download.smk
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ if TAXON:
limit=lambda wildcards: get_limit(wildcards, LIMIT, QUERY2NB),
args=ARGS,
key=KEY,
resources:
ncbi_requests=1,
retries: 2
conda:
os.path.join(dir.env, "datasets.yml")
Expand Down Expand Up @@ -101,8 +99,6 @@ else:
params:
args=ARGS,
key=KEY,
resources:
ncbi_requests=1,
conda:
os.path.join(dir.env, "datasets.yml")
shell:
Expand Down Expand Up @@ -140,8 +136,6 @@ rule taxonkit_lineage:
params:
headers=config.headers.lineage,
dir=TAXONKIT,
resources:
ncbi_requests=1,
conda:
os.path.join(dir.env, "taxonkit.yml")
shell:
Expand All @@ -161,8 +155,6 @@ rule format_taxonkit_lineage:
params:
headers=config.headers.lineage,
dir=TAXONKIT,
resources:
ncbi_requests=1,
conda:
os.path.join(dir.env, "csvtk.yml")
shell:
Expand Down
12 changes: 6 additions & 6 deletions env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ channels:
- bioconda
- defaults
dependencies:
- ncbi-datasets-cli =16.26.2
- ncbi-datasets-cli =16.31.0
- taxonkit =0.17.0
- csvtk =0.30.0
- python =3.12
- pip
- snakemake-minimal =8.18.1
- snaketool-utils =0.0.5
- snakemake-minimal =8.23.1
- snaketool-utils =0.0.6
- attrmap =0.0.7
- pyyaml =6.0
- pandas =2.2.1
- rich-click =1.7.4
- pyyaml =6.0.1
- pandas =2.2.3
- rich-click =1.8.3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_data_files():
"attrmap>=0.0.7",
"pyyaml>=6.0",
"pandas>=2.2.1",
"rich-click>=1.7.4",
"rich-click>=1.8.3",
],
entry_points={"console_scripts": ["assembly_finder=assembly_finder.__main__:main"]},
include_package_data=True,
Expand Down

0 comments on commit 22f4331

Please sign in to comment.