Skip to content

Commit

Permalink
feat: Make the project public!
Browse files Browse the repository at this point in the history
Contents are copied over from the Insiders version since the relevant funding goal has been reached.
  • Loading branch information
pawamoy committed Oct 12, 2024
1 parent 87afb55 commit 5d06482
Show file tree
Hide file tree
Showing 37 changed files with 877 additions and 504 deletions.
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 1.0.0
_commit: 1.2.0
_src_path: gh:mkdocstrings/handler-template
author_email: dev@pawamoy.fr
author_fullname: Timothée Mazzucotelli
Expand All @@ -14,7 +14,7 @@ insiders_repository_name: mkdocstrings-shell
language: Shell
project_description: A shell scripts/libraries handler for mkdocstrings.
project_name: mkdocstrings-shell
public_release: false
public_release: true
python_package_distribution_name: mkdocstrings-shell
python_package_import_name: shell
repository_name: shell
Expand Down
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: Bug report
about: Create a bug report to help us improve.
title: "bug: "
labels: unconfirmed
assignees: [pawamoy]
---

### Description of the bug
<!-- Please provide a clear and concise description of what the bug is. -->

### To Reproduce
<!-- Please provide a Minimal Reproducible Example (MRE) if possible.
Try to boil down the problem to a few lines of code.
Your code should run by simply copying and pasting it.
Example:
```
git clone https://github.com/username/repro
cd repro
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
... # command or code showing the issue
```
-->

```
WRITE MRE / INSTRUCTIONS HERE
```

### Full traceback
<!-- Please provide the full error message / traceback if any, by pasting it in the code block below.
No screenshots! -->

<details><summary>Full traceback</summary>

```python
PASTE TRACEBACK HERE
```

</details>

### Expected behavior
<!-- Please provide a clear and concise description of what you expected to happen. -->

### Environment information
<!-- Please run the following command in your repository and paste its output below it,
redacting sensitive information. -->

```bash
python -m mkdocstrings_handlers.shell.debug # | xclip -selection clipboard
```

PASTE MARKDOWN OUTPUT HERE

### Additional context
<!-- Add any other relevant context about the problem here,
like links to other issues or pull requests, screenshots, etc.
-->
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project.
title: "feature: "
labels: feature
assignees: pawamoy
---

### Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]. -->

### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->

### Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

### Additional context
<!-- Add any other context or screenshots about the feature request here. -->
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/3-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Documentation update
about: Point at unclear, missing or outdated documentation.
title: "docs: "
labels: docs
assignees: pawamoy
---

### Is something unclear, missing or outdated in our documentation?
<!-- A clear and concise description of what the documentation issue is. Ex. I can't find an explanation on feature [...]. -->

### Relevant code snippets
<!-- If the documentation issue is related to code, please provide relevant code snippets. -->

### Link to the relevant documentation section
<!-- Add a link to the relevant section of our documentation, or any addition context. -->
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/4-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Change request
about: Suggest any other kind of change for this project.
title: "change: "
assignees: pawamoy
---

### Is your change request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. -->

### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->

### Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions you've considered. -->

### Additional context
<!-- Add any other context or screenshots about the change request here. -->
44 changes: 29 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ jobs:
- name: Fetch all tags
run: git fetch --depth=1 --tags

- name: Set up Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install uv
run: pip install uv
- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Install dependencies
run: make setup
Expand All @@ -49,9 +52,6 @@ jobs:
- name: Check if the code is correctly typed
run: make check-types

- name: Check for vulnerabilities in dependencies
run: make check-dependencies

- name: Check for breaking changes in the API
run: make check-api

Expand All @@ -66,13 +66,17 @@ jobs:
echo 'jobs=[
{"os": "macos-latest"},
{"os": "windows-latest"},
{"python-version": "3.9"},
{"python-version": "3.10"},
{"python-version": "3.11"},
{"python-version": "3.12"}
{"python-version": "3.12"},
{"python-version": "3.13"},
{"python-version": "3.14"}
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
else
echo 'jobs=[]' >> $GITHUB_OUTPUT
echo 'jobs=[
{"os": "macos-latest", "resolution": "lowest-direct"},
{"os": "windows-latest", "resolution": "lowest-direct"}
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
fi
tests:
Expand All @@ -85,29 +89,39 @@ jobs:
- macos-latest
- windows-latest
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
resolution:
- highest
- lowest-direct
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.python-version == '3.12' }}
continue-on-error: ${{ matrix.python-version == '3.14' }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install uv
run: pip install uv
- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
cache-suffix: py${{ matrix.python-version }}

- name: Install dependencies
env:
UV_RESOLUTION: ${{ matrix.resolution }}
run: make setup

- name: Run the test suite
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,30 @@ jobs:
- name: Fetch all tags
run: git fetch --depth=1 --tags
- name: Setup Python
uses: actions/setup-python@v4
- name: Install build
if: github.repository_owner == 'pawamoy-insiders'
run: python -m pip install build
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup uv
uses: astral-sh/setup-uv@v3
- name: Build dists
if: github.repository_owner == 'pawamoy-insiders'
run: python -m build
run: uv tool run --from build pyproject-build
- name: Upload dists artifact
uses: actions/upload-artifact@v4
if: github.repository_owner == 'pawamoy-insiders'
with:
name: shell-insiders
path: ./dist/*
- name: Install git-changelog
if: github.repository_owner != 'pawamoy-insiders'
run: pip install git-changelog
- name: Prepare release notes
if: github.repository_owner != 'pawamoy-insiders'
run: git-changelog --release-notes > release-notes.md
run: uv tool run git-changelog --release-notes > release-notes.md
- name: Create release with assets
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: github.repository_owner == 'pawamoy-insiders'
with:
files: ./dist/*
- name: Create release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: github.repository_owner != 'pawamoy-insiders'
with:
body_path: release-notes.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
/.pdm-build/
/htmlcov/
/site/
uv.lock

# cache
.cache/
Expand Down
17 changes: 7 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,23 @@ make setup
> You can install it with:
>
> ```bash
> python3 -m pip install --user pipx
> pipx install uv
> curl -LsSf https://astral.sh/uv/install.sh | sh
> ```
>
> Now you can try running `make setup` again,
> or simply `uv install`.
> or simply `uv sync`.
You now have the dependencies installed.
Run `make help` to see all the available actions!
## Tasks
This project uses [duty](https://github.com/pawamoy/duty) to run tasks.
A Makefile is also provided. The Makefile will try to run certain tasks
on multiple Python versions. If for some reason you don't want to run the task
on multiple Python versions, you run the task directly with `make run duty TASK`.
The Makefile detects if a virtual environment is activated,
so `make` will work the same with the virtualenv activated or not.
The entry-point to run commands and tasks is the `make` Python script,
located in the `scripts` directory. Try running `make` to show the available commands and tasks.
The *commands* do not need the Python dependencies to be installed,
while the *tasks* do.
The cross-platform tasks are written in Python, thanks to [duty](https://github.com/pawamoy/duty).
If you work in VSCode, we provide
[an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup)
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# This Makefile is just here to allow auto-completion in the terminal.

actions = \
allrun \
changelog \
check \
check-api \
check-dependencies \
check-docs \
check-quality \
check-types \
Expand All @@ -16,6 +16,7 @@ actions = \
docs-deploy \
format \
help \
multirun \
release \
run \
setup \
Expand All @@ -24,4 +25,4 @@ actions = \

.PHONY: $(actions)
$(actions):
@bash scripts/make "$@"
@python scripts/make "$@"
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# mkdocstrings-shell

[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://mkdocstrings.github.io/shell/)
[![gitpod](https://img.shields.io/badge/gitpod-workspace-blue.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/shell)
[![ci](https://github.com/mkdocstrings/shell/workflows/ci/badge.svg)](https://github.com/mkdocstrings/shell/actions?query=workflow%3Aci)
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/shell/)
[![pypi version](https://img.shields.io/pypi/v/mkdocstrings-shell.svg)](https://pypi.org/project/mkdocstrings-shell/)
[![gitpod](https://img.shields.io/badge/gitpod-workspace-708FCC.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/shell)
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#shell:gitter.im)

A shell scripts/libraries handler for mkdocstrings.
Expand All @@ -10,9 +12,9 @@ to collect documentation from shell scripts.

## Installation

This project is available to sponsors only, through my Insiders program.
See Insiders [explanation](https://mkdocstrings.github.io/shell/insiders/)
and [installation instructions](https://mkdocstrings.github.io/shell/insiders/installation/).
```bash
pip install mkdocstrings-shell
```

## Configuration

Expand Down
1 change: 1 addition & 0 deletions config/git-changelog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ parse-refs = false
parse-trailers = true
sections = ["build", "deps", "feat", "fix", "refactor"]
template = "keepachangelog"
versioning = "pep440"
2 changes: 0 additions & 2 deletions config/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[pytest]
python_files =
test_*.py
*_test.py
tests.py
addopts =
--cov
--cov-config config/coverage.ini
Expand Down
2 changes: 1 addition & 1 deletion config/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
target-version = "py38"
target-version = "py39"
line-length = 120

[lint]
Expand Down
6 changes: 0 additions & 6 deletions config/vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
"command": "scripts/make",
"args": ["check-docs"]
},
{
"label": "check-dependencies",
"type": "process",
"command": "scripts/make",
"args": ["check-dependencies"]
},
{
"label": "check-api",
"type": "process",
Expand Down
Loading

0 comments on commit 5d06482

Please # to comment.