Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
amc-corey-cox committed Jan 6, 2025
0 parents commit d43bd27
Show file tree
Hide file tree
Showing 27 changed files with 5,936 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"template": "https://github.com/monarch-initiative/cookiecutter-monarch-ingest.git",
"commit": "f8680f4f40af1832b99b0acf5b700eb904ff3d71",
"checkout": null,
"context": {
"cookiecutter": {
"github_org_name": "monarch-initiative",
"project_name": "mic-ingest",
"project_description": "Ingest for Micronutrient Information Center using OntoGPT",
"__repo_name": "mic-ingest",
"__project_slug": "mic_ingest",
"__project_url": "https://github.com/monarch-initiative/mic-ingest",
"ingest_source": "lpi",
"ingest_type": "chemical_to_pathway",
"__ingest_name": "lpi_chemical_to_pathway",
"min_python_version": "3.10",
"full_name": "Corey Cox",
"email": "[email protected]",
"__author": "Corey Cox <[email protected]>",
"license": "BSD-3",
"_template": "https://github.com/monarch-initiative/cookiecutter-monarch-ingest.git",
"_commit": "f8680f4f40af1832b99b0acf5b700eb904ff3d71"
}
},
"directory": null
}
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
56 changes: 56 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
### This workflow can be run manually from Actions tab in your repository by selecting the "Create Release" workflow.
### When your project is ready for releases, you should:
### - Uncomment the `schedule` section to run this workflow automatically on a schedule.
### - As written, this workflow will run every Sunday at midnight UTC.
### - Remove the `draft: true` line from the `Create Release` step to publish the release immediately.
# TODO: QC/Validation (ex. 0 rows)

name: Create Release

on:
workflow_dispatch:
# schedule:
# - cron: '0 0 * * 0'

jobs:
create-release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Dependencies
run: poetry install --no-interaction

- name: Run Tests
run: make test

- name: Run Transform
run: |
make run
poetry run python scripts/generate-rdf.py
- name: Get Date for Release Tag
run: echo "DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV

# Further customization for this action is available. See:
# https://github.com/softprops/action-gh-release/?tab=readme-ov-file#-customizing
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.DATE }}
files: |
output/*
generate_release_notes: true
draft: true
38 changes: 38 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Auto-Deploy Documentation

on:
push:
branches: [main]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Dependencies
run: poetry install --with dev --no-interaction

- name: Build Documentation
run: make docs

- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: site
target-folder: docs
clean: true
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
test-backend:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest]
#os: [ ubuntu-latest, windows-latest ]

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

#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction

#----------------------------------------------
# run pytest
#----------------------------------------------
- name: Run tests
run: poetry run pytest tests

43 changes: 43 additions & 0 deletions .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This GitHub Action updates the documentation with information about the latest KG build/release.

name: Update Documentation

on:
workflow_dispatch:
workflow_run:
workflows: ["Create Release"]
types:
- completed

jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Dependencies
run: |
poetry install --with dev --no-interaction
- name: Build Documentation
run: |
poetry run python scripts/get-latest-report.py
make docs
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: site
target-folder: docs
clean: true
143 changes: 143 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# 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/
pip-wheel-metadata/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
*-env/
# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# data input and ouptut
data/
output/
test-output/

#IDE stuff
.idea/

#MacOS DS Store
.DS_STORE

# Transform logs
logs/
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Contribution Guidelines

When contributing to this repository, please first discuss the changes you wish to make via an issue, email, or any other method, with the owners of this repository before issuing a pull request.

## How to contribute

### Reporting bugs or making feature requests

To report a bug or suggest a new feature, please go to the [monarch-initiative/mic-ingest issue tracker](https://github.com/monarch-initiative/mic-ingest/issues), as we consolidate issues there.

Please supply enough details to the developers to enable them to verify and troubleshoot your issue:

* Provide a clear and descriptive title as well as a concise summary of the issue to identify the problem.
* Describe the exact steps which reproduce the problem in as many details as possible.
* Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
* Explain which behavior you expected to see instead and why.
* Provide screenshots of the expected or actual behaviour where applicable.


### The development lifecycle

1. Create a bug fix or feature development branch, based off the `main` branch of the upstream repo, and not your fork. Name the branch appropriately, briefly summarizing the bug fix or feature request. If none come to mind, you can include the issue number in the branch name. Some examples of branch names are, `bugfix/breaking-pipfile-error` or `feature/add-click-cli-layer`, or `bugfix/issue-414`
2. Make sure your development branch has all the latest commits from the `main` branch.
3. After completing work and testing locally, push the code to the appropriate branch on your fork or origin repository.
4. Create a pull request from the bug/feature branch of your fork to the `main` branch of the upstream repository.

**NOTE**: All the development must be done on a separate branch, either in your fork or in the origin repository. The `main` branch of the upstream repository should never be used for development.

**ALSO NOTE**: github.com lets you create a pull request from the main branch, automating the steps above.

> A code review (which happens with both the contributor and the reviewer present) is required for contributing.
Loading

0 comments on commit d43bd27

Please sign in to comment.