Skip to content

Commit

Permalink
Minor updates to docs and template (#22)
Browse files Browse the repository at this point in the history
* chore: update nomad versions

* refactor: change the module name prompt

* refactor: add a test for apps

* docs: change icon and edit button

* refactor: avoid updating github workflow files
  • Loading branch information
blueraft authored Jun 24, 2024
1 parent dbf4193 commit c40010c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
5 changes: 4 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"include_app": true,
"_copy_without_render": [
"*.html"
]
],
"__prompts__": {
"module_name": "module_name (recommended: press enter to use the default module name)"
}
}
3 changes: 3 additions & 0 deletions nomad-{{cookiecutter.plugin_name}}/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ site_description: {{cookiecutter.short_description}}
site_author: {{cookiecutter.full_name}}

repo_url: https://github.com/{{cookiecutter.github_username}}/nomad-{{cookiecutter.plugin_name}}
edit_uri: ""

nav:
- Home: index.md
Expand All @@ -28,6 +29,8 @@ theme:
features:
- navigation.instant
custom_dir: docs/theme
icon:
repo: fontawesome/brands/github
markdown_extensions:
- attr_list
- md_in_html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ def test_importing_app():
# this will raise an exception if pydantic model validation fails for th app
from nomad_{{cookiecutter.module_name}}.apps import myapp

assert myapp.app.label == 'MyApp'

7 changes: 5 additions & 2 deletions nomad-{{cookiecutter.plugin_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
name = "nomad-{{cookiecutter.plugin_name}}"
description = "{{cookiecutter.short_description}}"
version = "{{cookiecutter.version}}"
readme = "README.rst"
readme = "README.md"
requires-python = ">=3.9"
authors = [
{ name = "{{cookiecutter.full_name}}", email = "{{cookiecutter.email}}" },
Expand All @@ -35,7 +35,7 @@ maintainers = [
{ name = "{{cookiecutter.full_name}}", email = "{{cookiecutter.email}}" },
]
license = { file = "LICENSE" }
dependencies = ["nomad-lab>=1.2.2dev578"]
dependencies = ["nomad-lab>=1.3.0"]

[project.urls]
Repository = "https://github.com/{{cookiecutter.github_username}}/nomad-{{cookiecutter.plugin_name}}"
Expand Down Expand Up @@ -134,3 +134,6 @@ mynormalizer = "nomad_{{cookiecutter.module_name}}.normalizers:mynormalizer"
myapp = "nomad_{{cookiecutter.module_name}}.apps:myapp"

{%- endif %}
[tool.cruft]
# Avoid updating workflow files, this leads to permissions issues
skip = [".github/*"]
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ envlist = py39
[testenv]
setenv =
UV_EXTRA_INDEX_URL=https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
UV_PRERELEASE=allow

deps = pytest
pytest-cookies
tox
nomad-lab>=1.2.2dev578
nomad-lab>=1.3.0

commands = pytest {posargs:tests}

Expand Down

0 comments on commit c40010c

Please sign in to comment.