Skip to content

Commit

Permalink
Merge pull request #13 from EBI-Metagenomics/feature/code-review-mber…
Browse files Browse the repository at this point in the history
…acochea

Project restructure, addition of tests, general bug fixes
  • Loading branch information
Ge94 authored Apr 25, 2024
2 parents 0d8f181 + 0b73e21 commit 07361ac
Show file tree
Hide file tree
Showing 21 changed files with 2,137 additions and 1,306 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENA_WEBIN=""
ENA_WEBIN_PASSWORD=""
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Testing

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
pip install .[test]
- name: 🧪 - Testing
run: |
pytest -v
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,84 @@
#IntelliJ project structure files
*.iml
*.xml
.idea/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.genome_uploader.config.env

# Rope project settings
.ropeproject

# VSCode
.vscode/

# Ruff
.ruff_cache/

#personal
cluster_uploader_wrapper.py
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.286
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2017-2022 EMBL-EBI
Copyright 2017-2024 EMBL-EBI

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The script needs `python`, `pandas`, `requests`, and `ena-webin-cli` to run. We
```bash
# Create environment and install requirements
conda env create -f requirements.yml
conda activate genomeUploader
conda activate genome_uploader
```

You can generate pre-upload files with:
Expand Down
2 changes: 1 addition & 1 deletion examples/input_example.tsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
genome_name genome_path accessions assembly_software binning_software binning_parameters stats_generation_software completeness contamination genome_coverage metagenome co-assembly broad_environment local_environment environmental_medium rRNA_presence taxonomy_lineage
genome_name genome_path accessions assembly_software binning_software binning_parameters stats_generation_software completeness contamination genome_coverage metagenome co-assembly broad_environment local_environment environmental_medium rRNA_presence NCBI_lineage
coassembly2728_3.fa ./coassembly2728_3.fa.gz SRR1622827,SRR1622828 MetaSPAdes_v3.15.3 metaWRAP_v1.3 default EukCC_v2.1.0 98.2 0.2 26.24 skin metagenome True human skin finger False 1;131567;2759;33154;4751;451864;5204;452284;1538075;162474;742845;55193;76775
ERR4647712_megahit_bin.fa ./ERR4647712_megahit_bin.fa.gz ERR4647712 megahit_v1.2.9 MGnify-genomes-generation-pipeline_v1.0.0 default CheckM2_v1.0.1 90.81 0.59 14.2 chicken gut metagenome False chicken gut mucosa True d__Bacteria;p__Firmicutes;c__Bacilli;o__Lactobacillales;f__Lactobacillaceae;g__Lactobacillus;s__Lactobacillus crispatus
1,301 changes: 0 additions & 1,301 deletions genome_upload.py

This file was deleted.

1 change: 1 addition & 0 deletions genomeuploader/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "2.0.0"
Loading

0 comments on commit 07361ac

Please sign in to comment.