Skip to content

Commit

Permalink
Merge pull request #5 from linkml/test-placeholder-update
Browse files Browse the repository at this point in the history
Placeholder updates and bug fixes
  • Loading branch information
hrshdhgd authored Sep 15, 2022
2 parents 307dec7 + 1e2af55 commit 23b138e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"create_python_classes": ["Yes", "No"],
"use_schemasheets": [
"Yes",
"No (next two questions are ignored)"
"No"
],
"google_sheet_id": "1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ",
"google_sheet_tabs": "personinfo enums",
"__google_sheet_module": "{{ cookiecutter.google_sheet_tabs|lower()|replace(' ', '_')|replace('-', '_') }}",
"github_token_for_pypi_deployment": "PYPI_PASSWORD (leave blank if not a python project)"
"github_token_for_pypi_deployment": "PYPI_PASSWORD"
}
2 changes: 1 addition & 1 deletion hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
shutil.rmtree("licenses")

project_slug = '{{ cookiecutter.__project_slug}}'
create_python_classes = '{{ cookiecutter.create_python_classes}}'
create_python_classes = '{{ cookiecutter.create_python_classes }}'

if create_python_classes == "No":
print("TODO - cleanup python")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

- name: Build documentation.
run: |
mkdir -p docs
touch docs/.nojekyll
poetry run gen-doc -d docs src/{{cookiecutter.__project_slug}}/schema/{{cookiecutter.__project_slug}}.yaml
poetry run mkdocs gh-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.8
python-version: 3.9

- name: Install Poetry
uses: snok/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ site: gen-project gendoc
deploy: all mkd-gh-deploy

compile-sheets:
{% if cookiecutter.use_schemasheets %}
{% if cookiecutter.use_schemasheets == "Yes" %}
$(RUN) sheets2linkml --gsheet-id $(SHEET_ID) $(SHEET_TABS) > $(SHEET_MODULE_PATH).tmp && mv $(SHEET_MODULE_PATH).tmp $(SHEET_MODULE_PATH)
{% endif %}

Expand Down
5 changes: 4 additions & 1 deletion {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "{{cookiecutter.__project_slug}}"
version = "0.1.0"
description = "Enter description of your project here"
description = "{{cookiecutter.description}}"
authors = ["{{cookiecutter.__author}}"]
license = "{{cookiecutter.license}}"
readme = "README.md"
Expand All @@ -20,3 +20,6 @@ schemasheets = "^0.1.14"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.extras]
docs = ["linkml", "mkdocs-material"]
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ classes:
- id
- name
- description
class_uri:
- schema:Thing
class_uri: schema:Thing

{{cookiecutter.main_schema_class}}:
is_a: NamedThing
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name}}/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import unittest

from linkml_runtime.loaders import yaml_loader
from my_awesome_schema.datamodel import {{cookiecutter.main_schema_class}}
from {{cookiecutter.__project_slug}}.datamodel import {{cookiecutter.main_schema_class}}

ROOT = os.path.join(os.path.dirname(__file__), '..')
DATA_DIR = os.path.join(ROOT, "src", "data", "examples")
Expand Down

0 comments on commit 23b138e

Please sign in to comment.