Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Change Log
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->

74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
48 changes: 36 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
# Contributing
Contributions are welcome, and they are greatly appreciated!

Contributions are welcome, and they are greatly appreciated!
Every little bit helps, and credit will always be given.

## Types of Contributions
## Environment setup

You need to install [Copier](https://github.com/copier-org/copier).

```bash
python3 -m pip install --user pipx
pipx install copier
pipx inject copier copier-templates-extensions
```

## Running tests

To run the tests, use:

```bash
make test
```

### Bug Reports, Feature Requests, and Feedback
Create a [new project issue][1]! Try to be as descriptive as possible.
## Serving docs

### Bug Fixes, New Features and Documentation
Create a [new merge/pull request][2]! Make sure to follow the guidelines.
You can create a new virtualenv
and install `mkdocs` and `mkdocs-material`:

## Merge/Pull Request Guidelines
Make sure to have atomic commits and contextual commit messages!
```bash
python3 -m venv venv
. venv/bin/activate
pip install mkdocs mkdocs-material
mkdocs serve
```

[Check out this awesome blog post by Chris Beams for more information.][3]
You can also install `mkdocs` with `pipx` and
inject `mkdocs-material` in its venv,
this way you don't need to create one yourself:

[1]: https://github.com/shellm-org/cookiecutter-shellm/issues/new
[2]: https://github.com/shellm-org/cookiecutter-shellm/compare
[3]: http://chris.beams.io/posts/git-commit/
```bash
python3 -m pip install --user pipx
pipx install mkdocs
pipx inject mkdocs mkdocs-material
mkdocs serve
```
61 changes: 61 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.PHONY: $(MAKECMDGOALS)

clean:
@rm -rf tests/tmp

cleantests:
@rm -rf tests/tmp/.git
<<<<<<< Updated upstream
@rm -rf tests/tmp/empty
@rm -f tests/tmp/CHANGELOG.md
=======
@rm -rf tests/tmp/CHANGELOG.md
>>>>>>> Stashed changes

docs:
@mkdocs serve

docs-deploy:
@mkdocs gh-deploy

format:
@ruff format

gen generate:
@bash -c 'source tests/helpers.sh && generate ${PWD} tests/tmp'

reset-history: gen
@./reset-history.sh

test: cleantests
@./runtests.sh

changelog:
@git-changelog -Tio CHANGELOG.md -Bauto -c angular

release:
@test -n "$(version)" || { echo "error: usage: make release version=x.y.z" >&2; exit 1; }
@git add CHANGELOG.md
@git commit -m "docs: Update changelog for version $(version)"
@git tag "$(version)"
@git push
@git push --tags

DUTIES = \
test-changelog \
test-check \
test-check-api \
test-check-docs \
test-check-quality \
test-clean \
test-coverage \
test-docs \
test-docs-deploy \
test-format \
test-help \
test-release \
test-setup \
test-test

$(DUTIES):
@cd tests/tmp && make $(subst test-,,$@)
54 changes: 33 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
# cookiecutter-shellm
Cookiecutter to create a shellm app.
# shellm template

- Changelog: https://github.com/shellm-org/cookiecutter-shellm/CHANGELOG.md
- Contributing: https://github.com/shellm-org/cookiecutter-shellm/CONTRIBUTING.md
- Documentation: https://github.com/shellm-org/cookiecutter-shellm/wiki
- License: ISC - https://github.com/shellm-org/cookiecutter-shellm/LICENSE
[![ci](https://github.com/shellm-org/template/workflows/ci/badge.svg)](https://github.com/shellm-org/template/actions?query=workflow%3Aci)
[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://shellm-org.github.io/template/)
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#shellm-org/community:gitter.im)

- [Requirements](#requirements)
- [Usage](#usage)
- [Example](#example)
[Copier](https://github.com/copier-org/copier) template
for [shellm](https://github.com/shellm-org) projects.

## Requirements
- [git](https://git-scm.com/downloads)
- [python](https://www.python.org/downloads/)
- [cookiecutter](https://github.com/audreyr/cookiecutter)
## Features

- [Basher](https://github.com/basherpm/basher#readme) setup (installation, dependencies)
- Pre-configured tools for quality analysis and testing:
[shellcheck](https://github.com/koalaman/shellcheck#readme),
[bats](https://github.com/bats-core/bats-core#readme)
- Documentation built with [MkDocs](https://github.com/mkdocs/mkdocs#readme)
([Material theme](https://github.com/squidfunk/mkdocs-material#readme)
and "autodoc" [mkdocstrings plugin](https://github.com/mkdocstrings/mkdocstrings#readme))
- Support for GitHub workflows
- Auto-generated `CHANGELOG.md` from Git (conventional) commits
- All licenses from [choosealicense.com](https://choosealicense.com/appendix/)

## Quick setup and usage

Make sure all the
[requirements](https://shellm-org.github.io/template/requirements)
are met, then:

```bash
copier copy --trust "https://github.com/shellm-org/template.git" /path/to/your/new/project
```

Or even shorter:

## Usage
```bash
cookiecutter gl:shellm/cookiecutter-shellm
# OR
cookiecutter https://gitlab.com/shellm/cookiecutter-shellm
copier copy --trust "gh:shellm-org/template" /path/to/your/new/project
```

## Example
See the [shellm-example app on GitLab](https://gitlab.com/shellm/example-shellm)
(or [GitHub](https://github.com/shellm-org/example-shellm))
generated by this very cookiecutter.
See the [documentation](https://shellm-org.github.io/template)
for more details.
118 changes: 118 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# CONFIGURATION -------------------------
_min_copier_version: "9"
_envops:
autoescape: false
keep_trailing_newline: true
_subdirectory: project
_templates_suffix: .jinja
_jinja_extensions:
- copier_templates_extensions.TemplateExtensionLoader
- extensions.py:GitExtension
- extensions.py:SlugifyExtension
_skip_if_exists:
- CHANGELOG.md

# PROMPT --------------------------------
project_name:
type: str
help: Your project name

project_description:
type: str
help: Your project description

author_fullname:
type: str
help: Your full name
default: "{{ 'Timothée Mazzucotelli' | git_user_name }}"

author_email:
type: str
help: Your email
default: "{{ '[email protected]' | git_user_email }}"

author_username:
type: str
help: Your username (e.g. on GitHub)
default: pawamoy

repository_provider:
type: str
help: Your repository provider
default: github.com
choices:
- github.com

repository_namespace:
type: str
help: Your repository namespace
default: "{{ author_username }}"

repository_name:
type: str
help: Your repository name
default: "{{ project_name | slugify }}"

copyright_holder:
type: str
help: The name of the person/entity holding the copyright
default: "{{ author_fullname }}"

copyright_holder_email:
type: str
help: The email of the person/entity holding the copyright
default: "{{ author_email }}"

copyright_date:
type: str
help: The copyright date
default: "{{ '%Y' | strftime }}"

copyright_license:
type: str
help: Your project's license
default: ISC License
choices:
- Academic Free License v3.0
- Apache License 2.0
- Artistic License 2.0
- BSD 2-Clause "Simplified" License
- BSD 3-Clause Clear License
- BSD 3-Clause "New" or "Revised" License
- Boost Software License 1.0
- Creative Commons Attribution 4.0
- Creative Commons Attribution Share Alike 4.0
- Creative Commons Zero v1.0 Universal
- Do What The F*ck You Want To Public License
- Educational Community License v2.0
- Eclipse Public License 1.0
- Eclipse Public License 2.0
- European Union Public License 1.1
- European Union Public License 1.2
- GNU Affero General Public License v3.0
- GNU General Public License v2.0
- GNU General Public License v3.0
- GNU Lesser General Public License v2.1
- GNU Lesser General Public License v3.0
- ISC License
- LaTeX Project Public License v1.3c
- MIT License
- Mozilla Public License 2.0
- Microsoft Public License
- Microsoft Reciprocal License
- University of Illinois/NCSA Open Source License
- SIL Open Font License 1.1
- Open Software License 3.0
- PostgreSQL License
- The Unlicense
- zlib License

shellm_package_source_name:
type: str
help: Your shellm package source name (for `shellm source NAME` in scripts/libraries)
default: "{{ project_name | slugify('_') }}"

shellm_package_script_name:
type: str
help: Your CLI name if any (for use in the shell)
default: "{{ project_name | slugify }}"
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "CHANGELOG.md"
1 change: 1 addition & 0 deletions docs/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "CODE_OF_CONDUCT.md"
1 change: 1 addition & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "CONTRIBUTING.md"
4 changes: 4 additions & 0 deletions docs/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* More space at the bottom of the page */
.md-main__inner {
margin-bottom: 1.5rem;
}
Loading