diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e0dbd0e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,24 @@ +# http://editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 +end_of_line = lf + +[*.{json, yaml,yml}] +indent_size = 2 + +[*.bat] +indent_style = tab +end_of_line = crlf + +[LICENSE] +insert_final_newline = false + +[Makefile] +indent_style = tab diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..98bba37 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,46 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + + + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..d199d29 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,28 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + + + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..45e61f3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..05c540d --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,19 @@ +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + # GitHub provides this variable in the CI env. You don't + # need to add anything to the secrets vault. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/conventional-prs.yml b/.github/workflows/conventional-prs.yml new file mode 100644 index 0000000..17c8812 --- /dev/null +++ b/.github/workflows/conventional-prs.yml @@ -0,0 +1,18 @@ +name: PR +on: + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize + +jobs: + title-format: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v3.4.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + validateSingleCommit: true diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..87f972c --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,61 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +# This workflow is run as part of CI to test that they run through. +# +# The images are pushed to `ghcr.io` for each PR and branch. The ones for +# the releases are pushed in `release-please.yml`. +name: Docker Build + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + Image-Build-Push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: "0" + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + + - name: Write "git describe --tags --dirty" to VERSION + run: | + git describe --tags --dirty | tee VERSION + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: utils/docker/Dockerfile + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + push: true + build-args: + version_file=VERSION diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..045c425 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,96 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches_ignore: [] + +jobs: + cancel-previous: + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' + steps: + - uses: khan/pull-request-workflow-cancel@1.0.0 + with: + workflows: "main.yml" + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + + linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + pip install -r requirements/test.txt + pip freeze + + - name: Run linting tools + run: | + make lint + + - name: Comment PR + if: github.event_name == 'pull_request' && failure() + uses: marocchino/sticky-pull-request-comment@v1.1.0 + with: + message: 'Please format your code with [black](https://black.readthedocs.io): `make black`.' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + sphinx-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + pip install -r requirements/test.txt + pip freeze + + - name: Build documentation + run: | + cd docs + make html + + + testing: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + needs: linting + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # we need tags for versioneer to work + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip install -r requirements/test.txt + pip freeze + + - name: Run tests + run: pytest + + - uses: codecov/codecov-action@v3 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..4149e3d --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,42 @@ +on: + push: + branches: + - main + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + + - uses: GoogleCloudPlatform/release-please-action@v2 + id: release + with: + release-type: python + package-name: cada-prio + token: ${{ secrets.BOT_TOKEN }} + + - uses: actions/checkout@v2 + if: ${{ steps.release.outputs.release_created }} + with: + fetch-depth: 0 + + - name: Set up Python + if: ${{ steps.release.outputs.release_created }} + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Build package + if: ${{ steps.release.outputs.release_created }} + run: | + python -m pip install --upgrade pip + python setup.py sdist + + - name: Publish to PyPI + if: ${{ steps.release.outputs.release_created }} + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9996ce3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,115 @@ +*~ +.*.sw? + +# Data files +/*.tsv + +# WSL +*:Zone.Identifier + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# 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/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# IDE settings +.vscode/ +.idea/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..68fa9dd --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,32 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + + +# Optionally build your docs in additional formats such as PDF and ePub +formats: + - pdf + - epub + + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html + +python: + install: + - requirements: requirements/test.txt diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 0000000..e0a8348 --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,13 @@ +======= +Credits +======= + +Development Lead +---------------- + +* Manuel Holtgrewe + +Contributors +------------ + +None yet. Why not be the first? diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..825c32f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..d458142 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,105 @@ +.. highlight:: shell + +============ +Contributing +============ + +Contributions are welcome, and they are greatly appreciated! +Every little bit helps, and credit will always be given. + +You can contribute in many ways: + +---------------------- +Types of Contributions +---------------------- + +Report Bugs +=========== + +Report bugs at https://github.com/bihealth/cada-ng/issues. + +If you are reporting a bug, please include: + +* Your operating system name and version. +* Any details about your local setup that might be helpful in troubleshooting. +* Detailed steps to reproduce the bug. + +Fix Bugs +======== + +Look through the GitHub issues for bugs. +Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it. + +Implement Features +================== + +Look through the GitHub issues for features. +Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. + +Write Documentation +=================== + +cada-ng could always use more documentation, whether as part of the official cada-ng docs, in docstrings, or even on the web in blog posts, articles, and such. + +Submit Feedback +=============== + +The best way to send feedback is to file an issue at https://github.com/bihealth/cada-ng/issues. + +If you are proposing a feature: + +* Explain in detail how it would work. +* Keep the scope as narrow as possible, to make it easier to implement. +* Remember that this is a volunteer-driven project, and that contributions are welcome :) + +------------ +Get Started! +------------ + +Ready to contribute? Here's how to set up `cada-ng` for local development. + +1. Fork the `cada-ng` repo on GitHub. +2. Clone your fork locally:: + + $ git clone git@github.com:bihealth/cada-ng.git + +3. Install your local copy into a virtualenv. + Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: + + $ mkvirtualenv cada-ng + $ cd cada-ng/ + $ python setup.py develop + +4. Create a branch for local development:: + + $ git checkout -b name-of-your-bugfix-or-feature + + Now you can make your changes locally. + +5. When you're done making changes, check that your changes pass flake8 and the + tests, including testing other Python versions with tox:: + + $ flake8 cada-ng tests + $ python setup.py test or pytest + $ tox + + To get flake8 and tox, just pip install them into your virtualenv. + +6. Commit your changes and push your branch to GitHub:: + + $ git add . + $ git commit -m "Your detailed description of your changes." + $ git push origin name-of-your-bugfix-or-feature + +7. Submit a pull request through the GitHub website. + +----------------------- +Pull Request Guidelines +----------------------- + +Before you submit a pull request, check that it meets these guidelines: + +1. The pull request should include tests. +2. If the pull request adds functionality, the docs should be updated. + Put your new functionality into a function with a docstring. +3. The pull request should work for Python 3.8 to 3.11. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..26c59aa --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2023, Berlin Institute of Health + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..c5e45c0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,13 @@ +include AUTHORS.rst +include CONTRIBUTING.rst +include CHANGELOG.md +include LICENSE +include README.md + +recursive-include requirements *.txt +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] +recursive-exclude tests * + +recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif +include cada_prio/_version.py diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7029f3b --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +.PHONY: default +default: + +.PHONY: format +format: black isort + +.PHONY: lint +lint: flake8 isort-check black-check mypy + +.PHONY: test +test: + pytest . + +.PHONY: test-update-snapshots +test-update-snapshots: + pytest . --snapshot-update + +.PHONY: black +black: + black -l 100 . + +.PHONY: black-check +black-check: + black -l 100 --check . + +.PHONY: isort +isort: + isort --force-sort-within-sections --profile=black . + +.PHONY: isort-check +isort-check: + isort --force-sort-within-sections --profile=black --check . + +.PHONY: flake8 +flake8: + flake8 + +.PHONY: mypy +mypy: export MYPYPATH=stubs +mypy: + mypy cada_prio tests diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..ffd0837 --- /dev/null +++ b/Pipfile @@ -0,0 +1,17 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +logzero = ">=1.7.0,<2.0" +attrs = "<24.0,>=22.1.0" +cattrs = "<24.0,>=22.2.0" +click = ">=8.1.3,<9.0" +toml = "<0.11,>=0.10.2" +tqdm = ">=4.0" + +[dev-packages] + +[requires] +python_version = "3.10" diff --git a/README.md b/README.md new file mode 100644 index 0000000..973e882 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +[![CI](https://github.com/bihealth/cada-ng/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/bihealth/cada-ng/actions/workflows/main.yml) +[![codecov](https://codecov.io/gh/bihealth/cada-ng/branch/main/graph/badge.svg?token=059T45KAQM)](https://codecov.io/gh/bihealth/cada-ng) +[![Documentation Status](https://readthedocs.org/projects/cada-ng/badge/?version=latest)](https://cada-ng.readthedocs.io/en/latest/?badge=latest) +[![Bioconda](https://img.shields.io/conda/dn/bioconda/cada-ng.svg?label=Bioconda)](https://bioconda.github.io/recipes/cada-ng/README.html) +[![Pypi](https://img.shields.io/pypi/pyversions/cada-ng.svg)](https://pypi.org/project/cada-ng) + +# CADA: The Next Generation + +This is a re-implementation of the [CADA](https://github.com/Chengyao-Peng/CADA) method for phenotype-similarity prioritization. + +- Free software: MIT license +- Documentation: https://cada-ng.readthedocs.io/en/latest/ +- Discussion Forum: https://github.com/bihealth/cada-ng/discussions +- Bug Reports: https://github.com/bihealth/cada-ng/issues + + +## Managing GitHub Project with Terraform + +``` +# export GITHUB_OWNER=bihealth +# export GITHUB_TOKEN=ghp_ + +# cd utils/terraform + +# terraform init +# terraform import github_repository.cada-ng cada-ng +# terraform validate +# terraform fmt +# terraform plan +# terraform apply +``` diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..e69de29 diff --git a/cada_prio/__init__.py b/cada_prio/__init__.py new file mode 100644 index 0000000..ac3e86d --- /dev/null +++ b/cada_prio/__init__.py @@ -0,0 +1 @@ +from cada_prio._version import __version__ diff --git a/cada_prio/_version.py b/cada_prio/_version.py new file mode 100644 index 0000000..3dc1f76 --- /dev/null +++ b/cada_prio/_version.py @@ -0,0 +1 @@ +__version__ = "0.1.0" diff --git a/cada_prio/cli.py b/cada_prio/cli.py new file mode 100644 index 0000000..917ceb2 --- /dev/null +++ b/cada_prio/cli.py @@ -0,0 +1,15 @@ +"""Console script for CADA""" + +import click + +from cada_prio import _version + + +@click.group() +@click.version_option(_version.__version__) +@click.option("--verbose/--no-verbose", default=False) +@click.pass_context +def cli(ctx: click.Context, verbose: bool): + """Main entry point for CLI via click.""" + ctx.ensure_object(dict) + ctx.obj["verbose"] = verbose diff --git a/cada_prio/server.py b/cada_prio/server.py new file mode 100644 index 0000000..4f8a252 --- /dev/null +++ b/cada_prio/server.py @@ -0,0 +1 @@ +"""CADA web server""" diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..15db6b1 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = python -msphinx +SPHINXPROJ = clinvar_this +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/authors.rst b/docs/authors.rst new file mode 100644 index 0000000..e122f91 --- /dev/null +++ b/docs/authors.rst @@ -0,0 +1 @@ +.. include:: ../AUTHORS.rst diff --git a/docs/cli.rst b/docs/cli.rst new file mode 100644 index 0000000..c802d45 --- /dev/null +++ b/docs/cli.rst @@ -0,0 +1,9 @@ +.. _cli: + +====================== +Command Line Interface +====================== + +.. click:: cada.cli:cli + :prog: cada-prio + :nested: full diff --git a/docs/conf.py b/docs/conf.py new file mode 100755 index 0000000..ad0c5c4 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,160 @@ +#!/usr/bin/env python +# +# cada_prio documentation build configuration file, created by +# sphinx-quickstart on Fri Jun 9 13:47:02 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another +# directory, add these directories to sys.path here. If the directory is +# relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +# +import os +import sys + +sys.path.insert(0, os.path.abspath("..")) + +import cada_prio + +# -- General configuration --------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", + "sphinx_mdinclude", + "sphinx_rtd_theme", + "sphinx_click", +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = ".rst" + +# The master toctree document. +master_doc = "index" + +# General information about the project. +project = "cada-prio" +copyright = "2022, Manuel Holtgrewe" +author = "Manuel Holtgrewe" + +# The version info for the project you're documenting, acts as replacement +# for |version| and |release|, also used in various other places throughout +# the built documents. +# +# The short X.Y version. +version = cada_prio.__version__ +# The full version, including alpha/beta/rc tags. +release = cada_prio.__version__ + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = "en-US" + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "sphinx" + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_rtd_theme" + +# Theme options are theme-specific and customize the look and feel of a +# theme further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ["_static"] + + +# -- Options for HTMLHelp output --------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = "cada_priodoc" + + +# -- Options for LaTeX output ------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto, manual, or own class]). +latex_documents = [ + (master_doc, "cada_prio.tex", "CADA Documentation", "Manuel Holtgrewe", "manual") +] + + +# -- Options for manual page output ------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [(master_doc, "cada_prio", "CADA Documentation", [author], 1)] + + +# -- Options for Texinfo output ---------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + master_doc, + "cada_prio", + "CADA", + author, + "cada_prio", + "One line description of project.", + "Miscellaneous", + ) +] diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 0000000..e582053 --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1 @@ +.. include:: ../CONTRIBUTING.rst diff --git a/docs/history.rst b/docs/history.rst new file mode 100644 index 0000000..6336d76 --- /dev/null +++ b/docs/history.rst @@ -0,0 +1 @@ +.. mdinclude:: ../CHANGELOG.md diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..d89c4fb --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,34 @@ +==== +CADA +==== + +CADA is a method for the phenotype-based prioritization of variatns. + +.. toctree:: + :hidden: + :maxdepth: 1 + :caption: Contents + + installation + +.. toctree:: + :hidden: + :maxdepth: 1 + :caption: Project Info + + contributing + authors + history + +.. toctree:: + :hidden: + :maxdepth: 1 + :caption: CLI + + cli + +Indices and tables +================== +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..9bf5a51 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,33 @@ +.. highlight:: shell + +============ +Installation +============ + + +-------------------- +Stable Release (Pip) +-------------------- + +To install CADA, run this command in your terminal: + +.. code-block:: console + + $ pip install cada-prio + +This is the preferred method to install CADA, as it will always install the most recent stable release. + +If you don't have `pip `__ installed, this `Python installation guide `__ can guide you through the process. + + +------------ +From Sources +------------ + +The sources for CADA can be downloaded from the `Github repo `__. + +Clone the public repository: + +.. code-block:: console + + $ git clone https://github.com/bihealth/cada-ng.git diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..7c30dba --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=python -msphinx +) +set SOURCEDIR=. +set BUILDDIR=_build +set SPHINXPROJ=clinvar_this + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The Sphinx module was not found. Make sure you have Sphinx installed, + echo.then set the SPHINXBUILD environment variable to point to the full + echo.path of the 'sphinx-build' executable. Alternatively you may add the + echo.Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/requirements.txt b/requirements.txt new file mode 120000 index 0000000..2d8105f --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requirements/base.txt \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt new file mode 100644 index 0000000..c102d56 --- /dev/null +++ b/requirements/base.txt @@ -0,0 +1,6 @@ +logzero >=1.7.0, <2.0 +attrs >=22.1.0, <24.0 +cattrs >=22.2.0, <24.0 +click >=8.1.3, <9.0 +toml >=0.10.2, <0.11 +tqdm >=4.0 diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..a43a1b7 --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1 @@ +-r test.txt diff --git a/requirements/prod.txt b/requirements/prod.txt new file mode 100644 index 0000000..a3e81b8 --- /dev/null +++ b/requirements/prod.txt @@ -0,0 +1 @@ +-r base.txt diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..1b36e72 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,23 @@ +-r base.txt + +black ==23.7.0 +isort >=5.10.1, <6.0 +flake8 >=5.0.4, <7.0 +pytest +pytest-cov +pytest-snapshot + +mypy ==1.5.1 +types-python-dateutil >=2.8.19.3 +types-requests >=2.28.1, <3.0 +types-click >=7.1.8, <9.0 +types-toml >=0.10.8, <0.11 +types-tabulate >=0.9.0.0 +types-jsonschema >=4.17.0 +types-tqdm >=4.66.0 +types-xmltodict >=0.13.0.3 + +sphinx +sphinx_rtd_theme +sphinx-mdinclude +sphinx-click diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..33ae9d4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,21 @@ +[bdist_wheel] +universal = 1 + +[flake8] +exclude = + venv + docs + cada_prio/__init__.py + versioneer.py +ignore = E203, E266, E501, W503 +max-line-length = 80 +max-complexity = 18 +select = B,C,E,F,W,T4,B9 + +[tool:pytest] +addopts = --cov=cada_prio --cov-report=xml +testpaths = tests + +[coverage:run] +omit = + cada_prio/_version.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..5123b50 --- /dev/null +++ b/setup.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python +"""The setup script.""" + +import os + +from setuptools import find_packages, setup + + +def parse_requirements(path): + """Parse ``requirements.txt`` at ``path``.""" + requirements = [] + with open(path, "rt") as reqs_f: + for line in reqs_f: + line = line.strip() + if line.startswith("-r"): + fname = line.split()[1] + inner_path = os.path.join(os.path.dirname(path), fname) + requirements += parse_requirements(inner_path) + elif line != "" and not line.startswith("#"): + requirements.append(line) + return requirements + + +with open("README.md") as readme_file: + readme = readme_file.read() + +with open("CHANGELOG.md") as history_file: + history = history_file.read() + +test_requirements = parse_requirements("requirements/test.txt") +install_requirements = parse_requirements("requirements/base.txt") + + +package_root = os.path.abspath(os.path.dirname(__file__)) +version = {} +with open(os.path.join(package_root, "cada_prio/_version.py")) as fp: + exec(fp.read(), version) +version = version["__version__"] + +setup( + author="Manuel Holtgrewe", + author_email="manuel.holtgrewe@bih-charite.de", + python_requires=">=3.6", + classifiers=[ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + ], + description="Phenotype-based prioritization of variants with CADA", + entry_points={"console_scripts": ["cada-prio=cada_prio.cli:cli"]}, + install_requires=install_requirements, + license="MIT license", + long_description=readme + "\n\n" + history, + long_description_content_type="text/markdown", + include_package_data=True, + keywords="cada", + name="cada-prio", + packages=find_packages( + include=[ + "cada_prio", + "cada_prio.*", + ] + ), + test_suite="tests", + tests_require=test_requirements, + url="https://github.com/bihealth/cada-ng", + version=version, + zip_safe=False, +) diff --git a/stubs/logzero.pyi b/stubs/logzero.pyi new file mode 100644 index 0000000..6e0927f --- /dev/null +++ b/stubs/logzero.pyi @@ -0,0 +1,18 @@ +import logging +import typing + +DEFAULT_FORMAT: str +DEFAULT_DATE_FORMAT: str +DEFAULT_COLORS: typing.Dict[int, int] + +class LogFormatter(logging.Formatter): + def __init__( + self, + color: bool = True, + fmt: str = DEFAULT_FORMAT, + datefmt: str = DEFAULT_DATE_FORMAT, + colors: typing.Dict[int, int] = DEFAULT_COLORS, + ): ... + def format(self, record): ... + +logger: logging.Logger diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_dummy.py b/tests/test_dummy.py new file mode 100644 index 0000000..f4f5361 --- /dev/null +++ b/tests/test_dummy.py @@ -0,0 +1,2 @@ +def test_dummy(): + assert True diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile new file mode 100644 index 0000000..da9ec47 --- /dev/null +++ b/utils/docker/Dockerfile @@ -0,0 +1,54 @@ +# syntax=docker/dockerfile:1.3 + +# --------------------------------------------------------------------------- +# Base +# --------------------------------------------------------------------------- + +FROM python:3.11-slim AS base + +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONFAULTHANDLER 1 + +RUN apt-get update && apt-get install -y curl +RUN apt-get clean autoclean && \ + apt-get autoremove --yes && \ + rm -rf /var/lib/{apt,dpkg,cache,log}/ + + +# --------------------------------------------------------------------------- +# Dependencies +# --------------------------------------------------------------------------- + +FROM base AS deps + +RUN pip install pipenv +RUN apt-get update && apt-get install -y --no-install-recommends gcc + +COPY requirements requirements +RUN virtualenv /.venv && \ + . /.venv/bin/activate && \ + pip install -r requirements/prod.txt + +# --------------------------------------------------------------------------- +# Runtime +# --------------------------------------------------------------------------- + +FROM base AS runtime + +COPY --from=deps /.venv /.venv + +ENV PATH="/.venv/bin:$PATH" + +COPY cada_prio cada_prio +COPY requirements requirements +COPY setup.py requirements.txt README.md CHANGELOG.md . +RUN pip install . + +RUN useradd --create-home cada_prio +WORKDIR /home/cada_prio +USER cada_prio + +CMD ["uvicorn", "cada_prio.server:app", "--host", "0.0.0.0", "--port", "8080"] +EXPOSE 8080 diff --git a/utils/docker/build-docker.sh b/utils/docker/build-docker.sh new file mode 100755 index 0000000..75b7cc5 --- /dev/null +++ b/utils/docker/build-docker.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Utility script to start the Docker build process. + +set -x +set -euo pipefail + +ORG=bihealth +REPO=cada-ng +DOCKER_VERSION=${DOCKER_VERSION-adhoc} + +sudo docker build . \ + --file utils/docker/Dockerfile \ + --pull \ + -t ghcr.io/$ORG/$REPO:$DOCKER_VERSION \ + "$@" diff --git a/utils/docker/empty-file-dont-remove b/utils/docker/empty-file-dont-remove new file mode 100644 index 0000000..e69de29 diff --git a/utils/docker/entrypoint.sh b/utils/docker/entrypoint.sh new file mode 100644 index 0000000..c9812be --- /dev/null +++ b/utils/docker/entrypoint.sh @@ -0,0 +1,93 @@ +#!/usr/bin/bash + +set -x +set -euo pipefail + +# Interpreted environment variables. +# +# PATH_DB_BASE -- base directory for database defaults +# default: /data/annonars +# HTTP_HOST -- host to listen on +# default: 0.0.0.0 +# HTTP_PORT -- port +# default: 8080 +# +# PATH_DB_CADD_37 -- path to CADD database for GRCh37, defaults to $PATH_DB_BASE/grch37/cadd/rocksdb +# PATH_DB_CADD_38 -- path to CADD database for GRCh38, defaults to $PATH_DB_BASE/grch38/cadd/rocksdb +# PATH_DB_DBSNP_37 -- path to dbSNP database for GRCh37, defaults to $PATH_DB_BASE/grch37/dbsnp/rocksdb +# PATH_DB_DBSNP_38 -- path to dbSNP database for GRCh38, defaults to $PATH_DB_BASE/grch38/dbsnp/rocksdb +# PATH_DB_DBNSFP_37 -- path to dbNSFP database for GRCh37, defaults to $PATH_DB_BASE/grch37/dbnsfp/rocksdb +# PATH_DB_DBNSFP_38 -- path to dbNSFP database for GRCh38, defaults to $PATH_DB_BASE/grch38/dbnsfp/rocksdb +# PATH_DB_DBSCSNV_37 -- path to dbscSNV database for GRCh37, defaults to $PATH_DB_BASE/grch37/dbscsnv/rocksdb +# PATH_DB_DBSCSNV_38 -- path to dbscSNV database for GRCh38, defaults to $PATH_DB_BASE/grch38/dbscsnv/rocksdb +# PATH_DB_GNOMAD_MTDNA_37 -- path to gnomAD mtDNA database for GRCh37, defaults to $PATH_DB_BASE/grch37/gnomad-mtdna/rocksdb +# PATH_DB_GNOMAD_MTDNA_38 -- path to gnomAD mtDNA database for GRCh38, defaults to $PATH_DB_BASE/grch38/gnomad-mtdna/rocksdb +# PATH_DB_GNOMAD_EXOMES_37 -- path to gnomAD exomes database for GRCh37, defaults to $PATH_DB_BASE/grch37/gnomad-exomes/rocksdb +# PATH_DB_GNOMAD_EXOMES_38 -- path to gnomAD exomes database for GRCh38, defaults to $PATH_DB_BASE/grch38/gnomad-exomes/rocksdb +# PATH_DB_GNOMAD_GENOMES_37 -- path to gnomAD genomes database for GRCh37, defaults to $PATH_DB_BASE/grch37/gnomad-genomes/rocksdb +# PATH_DB_GNOMAD_GENOMES_38 -- path to gnomAD genomes database for GRCh38, defaults to $PATH_DB_BASE/grch38/gnomad-genomes/rocksdb +# PATH_DB_HELIXMTDB_37 -- path to HelixMTdb database for GRCh37, defaults to $PATH_DB_BASE/grch37/helixmtdb/rocksdb +# PATH_DB_HELIXMTDB_38 -- path to HelixMTdb database for GRCh38, defaults to $PATH_DB_BASE/grch38/helixmtdb/rocksdb +# PATH_DB_CONS_37 -- path to UCSC conservation database for GRCh37, defaults to $PATH_DB_BASE/grch37/cons/rocksdb +# PATH_DB_CONS_38 -- path to UCSC conservation database for GRCh38, defaults to $PATH_DB_BASE/grch38/cons/rocksdb +# +# PATH_GENES -- path to the genes RocksDB, defaults to $PATH_DB_BASE/genes/rocksdb + +PATH_DB_BASE=${PATH_HPO_DIR-/data/annonars} +HTTP_HOST=${HTTP_HOST-0.0.0.0} +HTTP_PORT=${HTTP_PORT-8080} + +PATH_DB_CADD_37=${PATH_DB_CADD_37-$PATH_DB_BASE/grch37/cadd/rocksdb} +PATH_DB_CADD_38=${PATH_DB_CADD_38-$PATH_DB_BASE/grch38/cadd/rocksdb} +PATH_DB_DBSNP_37=${PATH_DB_DBSNP_37-$PATH_DB_BASE/grch37/dbsnp/rocksdb} +PATH_DB_DBSNP_38=${PATH_DB_DBSNP_38-$PATH_DB_BASE/grch38/dbsnp/rocksdb} +PATH_DB_DBNSFP_37=${PATH_DB_DBNSFP_37-$PATH_DB_BASE/grch37/dbnsfp/rocksdb} +PATH_DB_DBNSFP_38=${PATH_DB_DBNSFP_38-$PATH_DB_BASE/grch38/dbnsfp/rocksdb} +PATH_DB_DBSCSNV_37=${PATH_DB_DBSCSNV_37-$PATH_DB_BASE/grch37/dbscsnv/rocksdb} +PATH_DB_DBSCSNV_38=${PATH_DB_DBSCSNV_38-$PATH_DB_BASE/grch38/dbscsnv/rocksdb} +PATH_DB_GNOMAD_MTDNA_37=${PATH_DB_GNOMAD_MTDNA_37-$PATH_DB_BASE/grch37/gnomad-mtdna/rocksdb} +PATH_DB_GNOMAD_MTDNA_38=${PATH_DB_GNOMAD_MTDNA_38-$PATH_DB_BASE/grch38/gnomad-mtdna/rocksdb} +PATH_DB_GNOMAD_EXOMES_37=${PATH_DB_GNOMAD_EXOMES_37-$PATH_DB_BASE/grch37/gnomad-exomes/rocksdb} +PATH_DB_GNOMAD_EXOMES_38=${PATH_DB_GNOMAD_EXOMES_38-$PATH_DB_BASE/grch38/gnomad-exomes/rocksdb} +PATH_DB_GNOMAD_GENOMES_37=${PATH_DB_GNOMAD_GENOMES_37-$PATH_DB_BASE/grch37/gnomad-genomes/rocksdb} +PATH_DB_GNOMAD_GENOMES_38=${PATH_DB_GNOMAD_GENOMES_38-$PATH_DB_BASE/grch38/gnomad-genomes/rocksdb} +PATH_DB_HELIXMTDB_37=${PATH_DB_HELIXMTDB_37-$PATH_DB_BASE/grch37/helixmtdb/rocksdb} +PATH_DB_HELIXMTDB_38=${PATH_DB_HELIXMTDB_38-$PATH_DB_BASE/grch38/helixmtdb/rocksdb} +PATH_DB_CONS_37=${PATH_DB_CONS_37-$PATH_DB_BASE/grch37/cons/rocksdb} +PATH_DB_CONS_38=${PATH_DB_CONS_38-$PATH_DB_BASE/grch38/cons/rocksdb} +PATH_GENES=${PATH_GENES-$PATH_DB_BASE/genes/rocksdb} + +first=${1-} + +if [ "$first" == exec ]; then + shift + exec "$@" +else + exec \ + annonars \ + run-server \ + $(test -e $PATH_DB_CADD_37 && echo --path-cadd $PATH_DB_CADD_37) \ + $(test -e $PATH_DB_CADD_38 && echo --path-cadd $PATH_DB_CADD_38) \ + $(test -e $PATH_DB_DBSNP_37 && echo --path-dbsnp $PATH_DB_DBSNP_37) \ + $(test -e $PATH_DB_DBSNP_38 && echo --path-dbsnp $PATH_DB_DBSNP_38) \ + $(test -e $PATH_DB_DBNSFP_37 && echo --path-dbnsfp $PATH_DB_DBNSFP_37) \ + $(test -e $PATH_DB_DBNSFP_38 && echo --path-dbnsfp $PATH_DB_DBNSFP_38) \ + $(test -e $PATH_DB_DBSCSNV_37 && echo --path-dbscsnv $PATH_DB_DBSCSNV_37) \ + $(test -e $PATH_DB_DBSCSNV_38 && echo --path-dbscsnv $PATH_DB_DBSCSNV_38) \ + $(test -e $PATH_DB_GNOMAD_MTDNA_37 && echo --path-gnomad-mtdna $PATH_DB_GNOMAD_MTDNA_37) \ + $(test -e $PATH_DB_GNOMAD_MTDNA_38 && echo --path-gnomad-mtdna $PATH_DB_GNOMAD_MTDNA_38) \ + $(test -e $PATH_DB_GNOMAD_EXOMES_37 && echo --path-gnomad-exomes $PATH_DB_GNOMAD_EXOMES_37) \ + $(test -e $PATH_DB_GNOMAD_EXOMES_38 && echo --path-gnomad-exomes $PATH_DB_GNOMAD_EXOMES_38) \ + $(test -e $PATH_DB_GNOMAD_GENOMES_37 && echo --path-gnomad-genomes $PATH_DB_GNOMAD_GENOMES_37) \ + $(test -e $PATH_DB_GNOMAD_GENOMES_38 && echo --path-gnomad-genomes $PATH_DB_GNOMAD_GENOMES_38) \ + $(test -e $PATH_DB_HELIXMTDB_37 && echo --path-helixmtdb $PATH_DB_HELIXMTDB_37) \ + $(test -e $PATH_DB_HELIXMTDB_38 && echo --path-helixmtdb $PATH_DB_HELIXMTDB_38) \ + $(test -e $PATH_DB_CONS_37 && echo --path-ucsc-conservation $PATH_DB_CONS_37) \ + $(test -e $PATH_DB_CONS_38 && echo --path-ucsc-conservation $PATH_DB_CONS_38) \ + $(test -e $PATH_GENES && echo --path-ucsc-conservation $PATH_GENES) \ + \ + --listen-host "$HTTP_HOST" \ + --listen-port "$HTTP_PORT" +fi + +exit $? diff --git a/utils/terraform/.gitignore b/utils/terraform/.gitignore new file mode 100644 index 0000000..5dfe310 --- /dev/null +++ b/utils/terraform/.gitignore @@ -0,0 +1,2 @@ +.terraform* +terraform.tfstate* diff --git a/utils/terraform/main.tf b/utils/terraform/main.tf new file mode 100644 index 0000000..f40eeb9 --- /dev/null +++ b/utils/terraform/main.tf @@ -0,0 +1,19 @@ +# Mangement of the GitHub project. + +resource "github_repository" "cada-ng" { + name = "cada-ng" + description = "Re-implementation of the CADA phenotype-based prioritization algorithm" + + has_issues = true + visibility = "public" + + allow_auto_merge = true + allow_rebase_merge = false + allow_merge_commit = false + has_downloads = true + has_discussions = true + delete_branch_on_merge = true + + squash_merge_commit_message = "BLANK" + squash_merge_commit_title = "PR_TITLE" +} diff --git a/utils/terraform/provider.tf b/utils/terraform/provider.tf new file mode 100644 index 0000000..0349641 --- /dev/null +++ b/utils/terraform/provider.tf @@ -0,0 +1 @@ +provider "github" {}