Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Jan 11, 2023
0 parents commit de4eae2
Show file tree
Hide file tree
Showing 74 changed files with 11,876 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"template": "https://github.com/hrshdhgd/sphintoxetry-cookiecutter",
"commit": "2178e57e0567b44989336bfe032fd51f466e3164",
"checkout": null,
"context": {
"cookiecutter": {
"project_name": "linkml-renderer",
"__project_slug": "linkml_renderer",
"project_description": "Generating HTML and RDFa from LinkML data.",
"min_python_version": "3.7",
"file_name": "main",
"greeting_recipient": "World",
"full_name": "Harshad Hegde",
"email": "[email protected]",
"__author": "Harshad Hegde <[email protected]>",
"license": "Apache Software License 2.0",
"github_token_for_doc_deployment": "GH_TOKEN",
"github_token_for_pypi_deployment": "PYPI_TOKEN",
"_template": "https://github.com/hrshdhgd/sphintoxetry-cookiecutter"
}
},
"directory": null
}
42 changes: 42 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Auto-deployment of Documentation
on:
push:
branches: [ main ]
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Set up Python 3.
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: Install Poetry.
uses: snok/[email protected]

- name: Install dependencies.
run: |
poetry install -E docs
- name: Build documentation.
run: |
echo ${{ secrets.GH_TOKEN }} >> src/linkml_renderer/token.txt
mkdir gh-pages
touch gh-pages/.nojekyll
cd docs/
poetry run sphinx-apidoc -o . ../src/linkml_renderer/ --ext-autodoc -f
poetry run sphinx-build -b html . _build
cp -r _build/* ../gh-pages/
- name: Deploy documentation.
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
force: true
folder: gh-pages
36 changes: 36 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Python Package

on:
workflow_dispatch:
release:
types: [created]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]

- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.9

- name: Install Poetry
run: pip install poetry poetry-dynamic-versioning

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

- name: Build source and wheel archives
run: poetry build

- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}


37 changes: 37 additions & 0 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: linkml-html QC

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

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]

steps:
- uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/[email protected]
- name: Install dependencies
run: poetry install --no-interaction

- name: Check code quality with flake8
run: poetry run tox -e flake8
# - name: Check package metadata with Pyroma
# run: poetry run tox -e pyroma
- name: Check static typing with MyPy
run: poetry run tox -e mypy

- name: Test with pytest and generate coverage file
run: poetry run tox -e py
134 changes: 134 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
docs/
*.old
tests/*/output/
.idea

# 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/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

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

# Pyre type checker
.pyre/
Loading

0 comments on commit de4eae2

Please sign in to comment.