Skip to content

Commit

Permalink
chore: make setup was run
Browse files Browse the repository at this point in the history
  • Loading branch information
dbujold committed Jul 8, 2024
0 parents commit d414ffe
Show file tree
Hide file tree
Showing 38 changed files with 4,428 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"template": "https://github.com/linkml/linkml-project-cookiecutter",
"commit": "b2da87eb7835bfec748a76823d098cac85e8363a",
"checkout": null,
"context": {
"cookiecutter": {
"project_name": "linkml-tutorial-2024",
"__project_slug": "linkml_tutorial_2024",
"github_org": "my-org",
"__source_path": "src/linkml_tutorial_2024/schema/linkml_tutorial_2024.yaml",
"project_description": "This is the project description.",
"full_name": "My Name",
"email": "[email protected]",
"__author": "My Name <[email protected]>",
"license": "Apache Software License 2.0",
"main_schema_class": "Person",
"create_python_classes": "Yes",
"use_schemasheets": "No",
"google_sheet_id": "1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ",
"google_sheet_tabs": "personinfo enums",
"__google_sheet_module": "personinfo_enums",
"github_token_for_pypi_deployment": "PYPI_PASSWORD",
"_template": "https://github.com/linkml/linkml-project-cookiecutter"
}
},
"directory": null
}
27 changes: 27 additions & 0 deletions .env.public
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is public in git. No sensitive info allowed.

###### schema definition variables, used by makefile

LINKML_SCHEMA_NAME="linkml_tutorial_2024"
LINKML_SCHEMA_AUTHOR="My Name <[email protected]>"
LINKML_SCHEMA_DESCRIPTION="This is the project description."
LINKML_SCHEMA_SOURCE_PATH="src/linkml_tutorial_2024/schema/linkml_tutorial_2024.yaml"
LINKML_SCHEMA_GOOGLE_SHEET_ID="1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ"
LINKML_SCHEMA_GOOGLE_SHEET_TABS="personinfo enums"

###### linkml generator variables, used by makefile

## gen-project configuration file
LINKML_GENERATORS_CONFIG_YAML= --config-file config.yaml

## pass args if gendoc ignores config.yaml (i.e. --no-mergeimports)
LINKML_GENERATORS_DOC_ARGS=

## pass args to workaround genowl rdfs config bug (linkml#1453)
## (i.e. --no-type-objects --no-metaclasses --metadata-profile rdfs)
LINKML_GENERATORS_OWL_ARGS=

## pass args to trigger experimental java/typescript generation
LINKML_GENERATORS_JAVA_ARGS=
LINKML_GENERATORS_TYPESCRIPT_ARGS=

40 changes: 40 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Auto-deployment of linkml_tutorial_2024 Documentation
on:
push:
branches: [main]

jobs:
build-docs:
runs-on: ubuntu-latest

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: write # to let mkdocs write the new docs
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

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.
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Poetry.
run: pipx install poetry

- name: Install dependencies.
run: poetry install -E docs

- name: Build documentation.
run: |
mkdir -p docs
touch docs/.nojekyll
make gendoc
([ ! -f docs/about.md ] && cp src/docs/about.md docs/) || true
make mkd-gh-deploy
36 changes: 36 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Built from:
# https://docs.github.com/en/actions/guides/building-and-testing-python
---
name: Build and test linkml_tutorial_2024

on: [pull_request]

jobs:
test:

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

steps:

- name: Check out repository
uses: actions/checkout@v3

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

- name: Install Poetry
run: pipx install poetry

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

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

- name: Run test suite
run: make test
36 changes: 36 additions & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Publish Python Package

on:
release:
types: [created]

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

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Poetry
run: |
pipx install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
# - 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_PASSWORD }}
44 changes: 44 additions & 0 deletions .github/workflows/test_pages_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Preview linkml_tutorial_2024 documentation build

on:
pull_request:
types:
- opened
- reopened
- synchronize

concurrency: preview-${{ github.ref }}

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Install Poetry
run: pipx install poetry

- name: Install dependencies
run: poetry install -E docs

- name: Build documentation
run: |
mkdir -p site
touch site/.nojekyll
make gendoc
([ ! -f docs/about.md ] && cp src/docs/about.md docs/) || true
poetry run mkdocs build -d site
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: site/
preview-branch: gh-pages
133 changes: 133 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/docs/
/project/docs/
/tmp/

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

Please sign in to comment.