Skip to content

Commit 651b930

Browse files
authored
Merge pull request #114 from GangCaoLab/oxbow
Read files with oxbow
2 parents adadde4 + 348f7b5 commit 651b930

File tree

325 files changed

+7441
-70844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

325 files changed

+7441
-70844
lines changed

.claude/settings.local.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(python -m build:*)",
5+
"Bash(python:*)",
6+
"Bash(git rm:*)",
7+
"Bash(make:*)"
8+
],
9+
"deny": [],
10+
"ask": []
11+
}
12+
}

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v1
13+
uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 1
1616

.github/workflows/docs.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- oxbow # Build docs for development branch as well
8+
paths:
9+
- 'docs/**'
10+
- 'coolbox/**'
11+
- '.github/workflows/docs.yml'
12+
pull_request:
13+
branches:
14+
- master
15+
paths:
16+
- 'docs/**'
17+
- 'coolbox/**'
18+
workflow_dispatch: # Allow manual trigger
19+
20+
permissions:
21+
contents: write # Required for pushing to gh-pages branch
22+
23+
jobs:
24+
build-and-deploy:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0 # Fetch full history for version info
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: '3.11'
37+
cache: 'pip'
38+
39+
- name: Install system dependencies
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install -y pandoc
43+
44+
- name: Install Python dependencies
45+
run: |
46+
python -m pip install --upgrade pip
47+
# Install project with documentation dependencies
48+
pip install -e ".[doc]"
49+
50+
- name: Build documentation
51+
run: |
52+
cd docs
53+
# Clean old build artifacts if any
54+
rm -rf build/
55+
# Build documentation with Sphinx
56+
sphinx-build -b html source build/html -W --keep-going
57+
# Create .nojekyll file to tell GitHub Pages not to ignore underscore-prefixed directories
58+
touch build/html/.nojekyll
59+
env:
60+
SPHINXOPTS: "-W --keep-going"
61+
62+
- name: Check documentation
63+
run: |
64+
cd docs/build/html
65+
echo "Documentation build completed successfully!"
66+
echo "Generated files:"
67+
ls -lh
68+
echo ""
69+
echo "Total size:"
70+
du -sh .
71+
72+
# Only deploy when pushing to master branch
73+
- name: Deploy to GitHub Pages
74+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
75+
uses: peaceiris/actions-gh-pages@v4
76+
with:
77+
github_token: ${{ secrets.GITHUB_TOKEN }}
78+
publish_dir: ./docs/build/html
79+
publish_branch: gh-pages
80+
force_orphan: true # Create orphan gh-pages branch without history
81+
user_name: 'github-actions[bot]'
82+
user_email: 'github-actions[bot]@users.noreply.github.com'
83+
commit_message: 'Deploy documentation from ${{ github.sha }}'
84+
85+
- name: Upload documentation artifact
86+
if: github.event_name == 'pull_request'
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: documentation
90+
path: docs/build/html
91+
retention-days: 7

.github/workflows/python-package-conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
max-parallel: 5
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- name: Set up Python 3.9
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v5
1616
with:
1717
python-version: 3.9
1818
- name: Update Conda
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
33

44
name: Upload Python Package
55

@@ -14,19 +14,21 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Set up Python
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: '3.x'
22-
- name: Install dependencies
22+
- name: Install build dependencies
2323
run: |
2424
python -m pip install --upgrade pip
25-
pip install setuptools wheel twine
26-
- name: Build and publish
25+
pip install build twine
26+
- name: Build package
27+
run: |
28+
python -m build
29+
- name: Publish to PyPI
2730
env:
2831
TWINE_USERNAME: __token__
2932
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
3033
run: |
31-
python setup.py sdist bdist_wheel
3234
twine upload dist/*

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ instance/
8282

8383
# Sphinx documentation
8484
docs/build/
85+
# Sphinx generated HTML files in docs root (old structure)
86+
# These should now be built by CI/CD and not committed
87+
docs/*.html
88+
docs/*.js
89+
docs/_sources/
90+
docs/_static/
91+
docs/_images/
92+
docs/_gallery/
93+
docs/objects.inv
8594

8695
# PyBuilder
8796
target/

coolbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.3.9'
1+
__version__ = '0.4.0'

coolbox/__main__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python
2+
3+
from coolbox.cli import CLI
4+
import fire
5+
6+
7+
def main():
8+
fire.Fire(CLI)
9+
10+
11+
if __name__ == "__main__":
12+
main()

coolbox/core/browser/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ def preload_imgs(self, directions):
205205
Preloading images to self.fig_cache.
206206
207207
Can load image in one of 4 directions:
208-
left, right, zoom-in, zoom-out
208+
209+
- left, right, zoom-in, zoom-out
210+
209211
or load all directions.
210212
"""
211213

coolbox/core/coverage/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@
1717
HistCoverage = track_to_coverage(Hist)
1818
BigWigCoverage = track_to_coverage(BigWig)
1919
BedGraphCoverage = track_to_coverage(BedGraph)
20+
21+
__all__ = [
22+
"HighLights", "HighLightsFromFile", "Vlines", "VlinesFromFile", "HLines",
23+
"TADCoverage", "ArcsCoverage", "PairsCoverage", "BEDPECoverage", "HiCPeaksCoverage",
24+
"HistCoverage", "BigWigCoverage", "BedGraphCoverage",
25+
"track_to_coverage",
26+
]

0 commit comments

Comments
 (0)