Skip to content

Commit

Permalink
feat: import Momics class
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Jul 31, 2024
1 parent 5e6c28d commit cc8043b
Show file tree
Hide file tree
Showing 12 changed files with 252 additions and 165 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ devel ]

permissions:
contents: write

jobs:

Test:
Expand All @@ -31,10 +34,31 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install package and dependencies on ${{ matrix.os }}
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run tests on ${{ matrix.os }}
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
# stop the build if there are Python syntax errors or undefined names
ruff check . --select=E9,F63,F7,F82
pytest
- name: Buid Sphinx doc on ${{ matrix.os }}
if: runner.os == 'Linux' && ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} && ${{ matrix.python-version == '3.12'}}
run: |
sudo apt-get update && sudo apt-get -y install make
pip install -e .[dev,docs]
make -C docs html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: runner.os == 'Linux' && ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} && ${{ matrix.python-version == '3.12'}}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
force_orphan: true
38 changes: 0 additions & 38 deletions .github/workflows/doc.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ __pycache__
.coverage.*
coverage.xml
htmlcov/
tiledb/

# setup and build artifacts
docs/_*
Expand All @@ -31,6 +32,9 @@ venv/
.Trashes
ehthumbs.db
Thumbs.db

tmp/
_scratch/
_scratch/
.vscode
example.py
*.momics/
benchmark.py
29 changes: 5 additions & 24 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
PAPER = a4
SOURCEDIR = source
BUILDDIR = build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
Expand All @@ -15,11 +16,11 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand All @@ -29,9 +30,7 @@ help:
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
Expand Down Expand Up @@ -82,15 +81,6 @@ htmlhelp:
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cooler.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cooler.qhc"

applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
Expand All @@ -99,15 +89,6 @@ applehelp:
"~/Library/Documentation/Help or install it in your application" \
"bundle."

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/cooler"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cooler"
@echo "# devhelp"

epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
Expand Down
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.napoleon",
"recommonmark",
]

numpydoc_show_class_members = False
napoleon_use_rtype = False
autodoc_typehints = "description"
autodoc_class_signature = "separated"
templates_path = ['_templates']
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
source_suffix = {
".rst": "restructuredtext",
Expand All @@ -52,8 +52,8 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
html_theme = "furo"
html_static_path = ["_static"]
htmlhelp_basename = "momicsdoc"

# -- Options for manual page output ---------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The `momics` package aims to facilitate:
* Scalable: cloud-native, out-of-core operations on the data;
* Export: data export.

Follow cooler development on `GitHub <https://github.com/js2264/momics>`_.
Follow `momics` development on `GitHub <https://github.com/js2264/momics>`_.

Contents:

Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "momics"
version = "0.1.1"
version = "0.1.0"
description = "A package to create and manage genome-related TileDB arrays"
requires-python = ">=3.8"
license = {text = "CC BY-NC 4.0"}
Expand All @@ -30,7 +30,8 @@ dependencies = [
"tiledb",
"pyBigWig",
"numpy",
"pandas"
"pandas",
"pyarrow>=1.0",
]

[project.urls]
Expand Down Expand Up @@ -74,6 +75,7 @@ docs = [
"Sphinx>=1.6",
"sphinx-autobuild",
"sphinx_rtd_theme",
"furo",
]

[tool.ruff]
Expand Down
Loading

0 comments on commit cc8043b

Please sign in to comment.