Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplementation of Snipe #10

Merged
merged 9 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

# Trigger the workflow on push and pull request events to the main branch
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
# Job 1: Run Tests
test:
name: Run Tests on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

# Define a matrix of Python versions to test against
strategy:
matrix:
python-version: [3.11, 3.12]

steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4

# Step 2: Set up the specified Python version
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# Step 3: Install dependencies using Hatch
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
hatch env create
hatch run install

# Step 4: Run the test suite
- name: Run Tests
run: hatch run test

# Job 2: Build and Deploy Documentation
build_and_deploy_docs:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
needs: test # Ensure tests pass before building docs

steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4

# Step 2: Set up Python (using a specific version for consistency)
- name: Set Up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12

# Step 3: Install dependencies for building docs
- name: Install Documentation Dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
hatch env create docs
hatch run docs-build

# Step 4: Deploy the generated docs to the gh-pages branch
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/site
publish_branch: gh-pages
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,18 @@ dmypy.json

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# pixi environments
.pixi

*.sig
*.zip
*.ipynb
*.csv
*.tsv
*.txt
*.gz
playground/
*.DS_Store
*.js
docs/site/*
docs/site/
*whl
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"python.analysis.extraPaths": [
"./src"
]
}
2 changes: 0 additions & 2 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Snipe (Beta)

**Snipe (WIP)** is an early beta Python API and command-line tool for efficient k-mer-based QC of sequencing datasets.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/docs/ReferenceQC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python API Documentation

::: snipe.api.reference_QC
3 changes: 3 additions & 0 deletions docs/docs/SnipeSig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python API Documentation

::: snipe.api
7 changes: 7 additions & 0 deletions docs/docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Command Line Interface (CLI) Documentation

Below is the auto-generated CLI documentation from `click`.

```bash
snipe --help
```
1 change: 1 addition & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Welcome to MkDocs
103 changes: 103 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
site_name: Snipe Documentation
site_url: https://snipe-bio.github.io/snipe
site_description: Snipe, an ultrafast and memory-efficient alignment-free sequencing quality control tool.
site_author: "Mohamed Abuelanin"

theme:
name: material
palette:
- scheme: default
media: "(prefers-color-scheme: light)"
primary: deep purple
accent: teal
toggle:
icon: material/weather-sunny
name: Switch to dark mode
- scheme: slate
media: "(prefers-color-scheme: dark)"
primary: deep purple
accent: teal
toggle:
icon: material/weather-night
name: Switch to light mode
font:
text: Open Sans
code: Fira Code
# logo: assets/logo.svg
# favicon: assets/logo.svg
features:
- content.code.copy
- navigation.tabs
- navigation.tabs.sticky
- math
- mathjax


markdown_extensions:
- toc:
permalink: true
- tables
- admonition
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- footnotes
- abbr
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.critic
- pymdownx.caret
- pymdownx.keys
- pymdownx.mark
- pymdownx.tilde
- attr_list
- md_in_html
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
# format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tabbed:
alternate_style: true
- pymdownx.arithmatex:
generic: true


plugins:
- search
- mkdocstrings:
handlers:
python:
options:
show_signature: true
- git-revision-date-localized:
enable_creation_date: true
nav:
- Home: index.md
- API:
- SnipeSig: SnipeSig.md
- ReferenceQC: ReferenceQC.md
- CLI: cli.md



extra_css:
- stylesheets/extra.css


extra_javascript:
- javascripts/mathjax.js
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js


copyright: Copyright &copy; 2024 <a href='https://www.mr-eyes.com/'>Mohamed Abuelanin</a>, Tamer Mansour

extra:
analytics:
provider: google
property: GTM-N5RW3TB3
28 changes: 28 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.cmd {
display: inline-block;
background-color: #c4c4c49d;
color: #040404;
font-family: 'Courier New', monospace;
padding: 5px 10px;
border-radius: 5px;
/* white-space: pre-line; */
overflow: auto;
max-width: 100%;
font-size: small;
border: 1px solid #444;
font-weight: bolder;
}

.fancy-hr {
border: 0; /* Removes default line */
height: 1.3px; /* Specifies the height of the HR */
background: #333; /* Sets the color of the line */
background-image: linear-gradient(to right, #ccc, #333, #ccc); /* Creates a gradient effect from left to right */
margin: 20px 0; /* Provides some space before and after the HR */
}

/* Custom CSS for equations */
.math-block {
overflow-x: auto;
white-space: nowrap;
}
Loading
Loading