-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from moremoban/dev
release 0.1.0
- Loading branch information
Showing
20 changed files
with
238 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: [push] | ||
|
||
jobs: | ||
run_moban: | ||
runs-on: ubuntu-latest | ||
name: synchronize templates via moban | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' | ||
- name: check changes | ||
run: | | ||
pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible | ||
make upstreaming | ||
git status | ||
git diff --exit-code | ||
- name: Auto-commit | ||
if: failure() | ||
uses: docker://cdssnc/auto-commit-github-action | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: >- | ||
This is an auto-commit, updating project meta data, | ||
such as changelog.rst, contributors.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Change log | ||
=========== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% extends 'README.rst.jj2' %} | ||
|
||
{%block documentation_link%} | ||
.. image:: https://dev.azure.com/{{organisation}}/{{name}}/_apis/build/status/{{organisation}}.{{name}}?branchName=master | ||
:target: https://dev.azure.com/{{organisation}}/{{name}}/_build/latest?definitionId=2&branchName=master | ||
{%endblock%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include README.rst | ||
include CHANGELOG.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% extends "setup.py.jj2" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[bdist_wheel] | ||
universal = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "tests/requirements.txt.jj2" %} | ||
|
||
{%block extras %} | ||
moban | ||
black;python_version>="3.6" | ||
isort;python_version>="3.6" | ||
{%endblock%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
all: test | ||
|
||
test: lint | ||
bash test.sh | ||
|
||
install_test: | ||
pip install -r tests/requirements.txt | ||
|
||
git-diff-check: | ||
git diff --exit-code | ||
|
||
lint: | ||
bash lint.sh | ||
|
||
format: | ||
isort -y $(find {{project_name | replace('-', '_')}} -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo) | ||
black -l 79 {{project_name | replace('-', '_')}} | ||
black -l 79 tests | ||
|
||
git-diff-check: | ||
git diff --exit-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# flake8: noqa | ||
from {{project_name | replace('-', '_')}}._version import __version__ | ||
from {{project_name | replace('-', '_')}}._version import __author__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: {{project_name}} | ||
organisation: {{organisation}} | ||
releases: | ||
- changes: | ||
- action: first release | ||
details: | ||
- what a feat! | ||
version: 0.0.1 | ||
date: {{today}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
configuration: | ||
template_dir: | ||
- "pypi://pypi-mobans-pkg/resources/templates" | ||
- "pypi://pypi-mobans-pkg/resources/statics" | ||
- ".moban.d" | ||
configuration: {{ project_name }}.yml | ||
targets: | ||
- README.rst: CUSTOM_README.rst.jj2 | ||
- setup.py: custom_setup.py.jj2 | ||
- requirements.txt: requirements.txt.jj2 | ||
- "tests/requirements.txt": "tests/custom_requirements.txt.jj2" | ||
- "docs/source/conf.py": "docs/conf.py_t" | ||
- test.sh: test.script.jj2 | ||
- test.bat: test.script.jj2 | ||
- "{{ project_name | replace('-', '_') }}/_version.py": "_version.py.jj2" | ||
- .gitignore: gitignore.jj2 | ||
- .travis.yml: travis.yml.jj2 | ||
- Pipfile: Pipfile.jj2 | ||
- output: CHANGELOG.rst | ||
configuration: changelog.yml | ||
template: CHANGELOG.rst.jj2 | ||
- lint.sh: lint.script.jj2 | ||
- LICENSE: "{{ license|lower }}_license.jj2" | ||
- MANIFEST.in: MANIFEST.in.jj2 | ||
- ".github/workflows/pythonpublish.yml": "pythonpublish.yml" | ||
- ".github/workflows/moban-update.yml": "moban-update.yml" | ||
- "azure-pipelines.yml": "azure/azure-pipelines.yml" | ||
- ".azure-pipelines-steps-macos.yml": "azure/pipelines-steps-macos.yml" | ||
- ".azure-pipelines-steps.yml": "azure/pipelines-steps.yml" | ||
- Makefile: Makefile.jj2 | ||
- format.sh: format.sh.jj2 | ||
- .isort.cfg: isort.cfg.jj2 | ||
- CONTRIBUTORS.rst: CONTRIBUTORS.rst.jj2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "{{project_name}}" | ||
organisation: "{{organisation}}" | ||
author: "{{author}}" | ||
contact: "{{contact}}" | ||
company: "{{company}}" | ||
version: "0.0.1" | ||
current_version: "0.0.1" | ||
release: "0.0.0" | ||
copyright_year: {{now.year}} | ||
{% if project_type == 'command line interface'%} | ||
command_line_interface: "{{cli}}" | ||
entry_point: "{{project_name | replace('-', '_')}}.main:main" | ||
{% endif %} | ||
{% if project_type == 'C extension'%} | ||
external_module_library: {{project_name}} | ||
sources: | ||
{% for source in sources: %} | ||
- '{{source}}' | ||
{% endfor %} | ||
{% endif %} | ||
license: {{license}} | ||
dependencies: [] | ||
description: "{{description}}" | ||
lint_command: make install_test lint format git-diff-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
gease | ||
codecov | ||
moban>=0.6.4 | ||
moban>=0.8.2 | ||
pytest~=3.6.1 | ||
flake8 | ||
moban_jinja2_github | ||
yamllint | ||
moban-jinja2-github | ||
moban-ansible | ||
gitfs2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
introduction: |+ | ||
[info]Yehua /'jɛhwa/[/info] will walk you through. | ||
Press ^C to quit at any time. | ||
configuration: | ||
template_path: ./new-project/templates | ||
static_path: ./new-project/static | ||
questions: | ||
- project_name: "project name [yehua-boilerplate]: " | ||
- description: "description [Moremoban organisation's best template]: " | ||
- license: | ||
- question: "license: " | ||
"1. mit": "N/A" | ||
"2. newbsd": "N/A" | ||
- author: "author: " | ||
- contact: "contact email: " | ||
- organisation: "github profile/organisation: " | ||
- company: "copyright owner [{{author}}]: " | ||
- project_type: | ||
- question: "project type: " | ||
"1. library": "N/A" | ||
"2. command line interface": | ||
- cli: "cli executable name: " | ||
layout: | ||
- "{{project_name|lower|replace('-', '_')}}" | ||
- tests | ||
- docs: | ||
- source | ||
- .moban.d: | ||
- tests | ||
- docs: | ||
- source | ||
templates: | ||
- "{{project_name}}.yml": project.yml.jj2 | ||
- "{{project_name | replace('-', '_')}}/__init__.py": "__init__.py.jj2" | ||
- .moban.yml: project-moban.yml.jj2 | ||
- changelog.yml: changelog.yml.jj2 | ||
- Makefile: Makefile | ||
static: | ||
- ".moban.d/CUSTOM_README.rst.jj2": "CUSTOM_README.rst" | ||
- ".moban.d/custom_setup.py.jj2": custom_setup.py.jj2 | ||
- ".moban.d/tests/custom_requirements.txt.jj2": "tests/requirements.txt.jj2" | ||
- CHANGELOG.rst: CHANGELOG.rst | ||
- setup.cfg: setup.cfg | ||
post-moban: | ||
git-repo-files: | ||
- "CHANGELOG.rst" | ||
- "MANIFEST.in" | ||
- "Makefile" | ||
- "README.rst" | ||
- "{{project_name}}.yml" | ||
- "{{project_name | replace('-', '_')}}" | ||
- "docs" | ||
- "requirements.txt" | ||
- "setup.cfg" | ||
- "setup.py" | ||
- "test.sh" | ||
- "tests" | ||
- ".gitignore" | ||
- ".github" | ||
- ".moban.d" | ||
- ".travis.yml" | ||
- ".moban.yml" | ||
- "Pipfile" | ||
- "changelog.yml" | ||
- "lint.sh" | ||
- "test.bat" | ||
- "azure-pipelines.yml" | ||
- ".azure-pipelines-steps-macos.yml" | ||
- ".azure-pipelines-steps.yml" | ||
- "LICENSE" | ||
- format.sh | ||
- lint.sh | ||
- .isort.cfg | ||
- CONTRIBUTORS.rst |