Skip to content

Commit

Permalink
chore: Rename the repo to ss-python. (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Nov 16, 2023
1 parent ebe51f9 commit c0c7105
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/readthedocs-preview.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: serious-scaffold-python
project-slug: ss-python
name: Read the Docs Pull Request Preview
on:
pull_request_target:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -17,7 +17,7 @@ CONSTRAINTS_FILE := constraints/$(PYTHON_VERSION).txt
PUBLIC_DIR := $(shell [ "$$READTHEDOCS" = "True" ] && echo "$$READTHEDOCS_OUTPUT/html" || echo "public")

# URL and Path of changelog source code.
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://serious-scaffold.github.io/serious-scaffold-python}/_sources/changelog.md.txt)
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://serious-scaffold.github.io/ss-python}/_sources/changelog.md.txt)
CHANGELOG_PATH := docs/changelog.md

########################################################################################
Expand Down
32 changes: 16 additions & 16 deletions README.md
Expand Up @@ -2,29 +2,29 @@

A Python project template covering the entire development lifecycle with various integrations, configurations and modules.

[![CI](https://github.com/serious-scaffold/serious-scaffold-python/actions/workflows/ci.yml/badge.svg)](https://github.com/serious-scaffold/serious-scaffold-python/actions/workflows/ci.yml)
[![Release](https://github.com/serious-scaffold/serious-scaffold-python/actions/workflows/release.yml/badge.svg)](https://github.com/serious-scaffold/serious-scaffold-python/actions/workflows/release.yml)
[![Coverage](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/coverage.json)](https://serious-scaffold.github.io/serious-scaffold-python/reports/coverage)
[![PyPI](https://img.shields.io/pypi/v/serious-scaffold)](https://pypi.org/project/serious-scaffold/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/serious-scaffold)](https://pypi.org/project/serious-scaffold/)
[![GitHub](https://img.shields.io/github/license/serious-scaffold/serious-scaffold-python)](https://github.com/serious-scaffold/serious-scaffold-python/blob/main/LICENSE)
[![CI](https://github.com/serious-scaffold/ss-python/actions/workflows/ci.yml/badge.svg)](https://github.com/serious-scaffold/ss-python/actions/workflows/ci.yml)
[![Release](https://github.com/serious-scaffold/ss-python/actions/workflows/release.yml/badge.svg)](https://github.com/serious-scaffold/ss-python/actions/workflows/release.yml)
[![Coverage](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/ss-python/_static/badges/coverage.json)](https://serious-scaffold.github.io/ss-python/reports/coverage)
[![PyPI](https://img.shields.io/pypi/v/ss-python)](https://pypi.org/project/ss-python/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ss-python)](https://pypi.org/project/ss-python/)
[![GitHub](https://img.shields.io/github/license/serious-scaffold/ss-python)](https://github.com/serious-scaffold/ss-python/blob/main/LICENSE)

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/5697b1e4c4a9790ece607654e6c02a160620c7e1/docs/badge/v2.json)](https://pydantic.dev)
[![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json)](https://serious-scaffold.github.io/serious-scaffold-python)
[![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/ss-python/_static/badges/logo.json)](https://serious-scaffold.github.io/ss-python)

> [!WARNING]
> _Serious Scaffold Python_ is in the **Alpha** phase.
> Frequent changes and instability should be anticipated.
> Any feedback, comments, suggestions and contributions are welcome!
[![Serious Scaffold Python](https://serious-scaffold.github.io/serious-scaffold-python/_static/images/logo.svg)](https://github.com/serious-scaffold/serious-scaffold-python)
[![Serious Scaffold Python](https://serious-scaffold.github.io/ss-python/_static/images/logo.svg)](https://github.com/serious-scaffold/ss-python)

Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring lint, test and documentation, as well as implementing settings, logging and other frequently used modules. [Serious Scaffold Python](https://github.com/serious-scaffold/serious-scaffold-python) streamlines this process. Powered by [`copier`](https://copier.readthedocs.io/), bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template.
Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring lint, test and documentation, as well as implementing settings, logging and other frequently used modules. [Serious Scaffold Python](https://github.com/serious-scaffold/ss-python) streamlines this process. Powered by [`copier`](https://copier.readthedocs.io/), bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template.

If you find this helpful, please consider [sponsorship](https://github.com/sponsors/huxuan).

Expand Down Expand Up @@ -63,7 +63,7 @@ pipx install pre-commit
1. Generate the project.

```bash
copier copy gh:serious-scaffold/serious-scaffold-python /path/to/project
copier copy gh:serious-scaffold/ss-python /path/to/project
```

2. Navigate to the project directory and initialize a git repository.
Expand All @@ -83,7 +83,7 @@ pipx install pre-commit

```bash
git add .
git commit -m "Initialize from serious-scaffold-python."
git commit -m "Initialize from serious-scaffold."
```

5. That's it! Feel free to focus on the coding within `src` folder.
Expand All @@ -93,18 +93,18 @@ pipx install pre-commit
Badge for markdown:

```markdown
[![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json)](https://serious-scaffold.github.io/serious-scaffold-python)
[![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/ss-python/_static/badges/logo.json)](https://serious-scaffold.github.io/ss-python)
```

Badge for restructuredtext:

```restructuredtext
.. image:: https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json
:target: serious-scaffold.github.io/serious-scaffold-python
.. image:: https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/ss-python/_static/badges/logo.json
:target: serious-scaffold.github.io/ss-python
```

It will look like this: [![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json)](https://serious-scaffold.github.io/serious-scaffold-python)
It will look like this: [![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/ss-python/_static/badges/logo.json)](https://serious-scaffold.github.io/ss-python)

## 📜 License

MIT License, for more details, see the [LICENSE](https://github.com/serious-scaffold/serious-scaffold-python/blob/main/LICENSE) file.
MIT License, for more details, see the [LICENSE](https://github.com/serious-scaffold/ss-python/blob/main/LICENSE) file.
14 changes: 12 additions & 2 deletions copier.yaml
Expand Up @@ -100,11 +100,21 @@ repo_namespace:
help: 'Indicate the GitHub Repository Owner or GitLab Namespace. This is typically the account name of the author or the organization:'
type: str
repo_name:
default: '{{ project_name|lower|replace(" ", "-") }}'
default: |-
[% if project_name == 'Serious Scaffold Python' -%]
ss-python
[%- else -%]
{{ project_name|lower|replace(" ", "-") }}
[%- endif %]
help: 'Provide a name for the repository:'
type: str
package_name:
default: '{{ repo_name|regex_replace("-python$", "") }}'
default: |-
[% if project_name == 'Serious Scaffold Python' -%]
{{ repo_name }}
[%- else -%]
{{ repo_name|regex_replace("-python$", "") }}
[%- endif %]
help: 'Specify the name of the distributable package for the project (often used in "pip install <package_name>"):'
type: str
module_name:
Expand Down
4 changes: 2 additions & 2 deletions docs/api/settings.md
@@ -1,5 +1,5 @@
# serious_scaffold.settings
# ss_python.settings

```{eval-rst}
.. automodule:: serious_scaffold.settings
.. automodule:: ss_python.settings
```
4 changes: 2 additions & 2 deletions docs/cli/index.md
@@ -1,7 +1,7 @@
# CLI Reference

```{eval-rst}
.. click:: serious_scaffold.cli:typer_click_object
:prog: serious-scaffold-cli
.. click:: ss_python.cli:typer_click_object
:prog: ss-python-cli
:nested: full
```
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -12,7 +12,7 @@
author = "huxuan"
copyright = "2023, huxuan" # noqa: A001
project = "Serious Scaffold Python"
release = metadata.version("serious-scaffold")
release = metadata.version("ss-python")
version = ".".join(release.split(".")[:2])


Expand Down
6 changes: 3 additions & 3 deletions docs/dev/proj.md
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

[`copier`](https://copier.readthedocs.io/) serves as a key tool in `serious-scaffold-python`, differentiating it from other project templates. The installation can be done with the following command.
[`copier`](https://copier.readthedocs.io/) serves as a key tool in `serious-scaffold`, differentiating it from other project templates. The installation can be done with the following command.

```{note}
Using `pipx` for management is recommended and you can find pipx's installation instructions [here](https://pypa.github.io/pipx/installation/).
Expand Down Expand Up @@ -33,7 +33,7 @@ pipx install copier
```

```bash
copier copy gh:serious-scaffold/serious-scaffold-python .
copier copy gh:serious-scaffold/ss-python .
```

1. Set up the development environment.
Expand All @@ -46,7 +46,7 @@ pipx install copier

```bash
git add .
git commit -m "chore: Initialize from serious-scaffold-python."
git commit -m "chore: Initialize from ss-python."
SKIP=no-commit-to-branch git push
```

Expand Down
4 changes: 2 additions & 2 deletions includes/variable.jinja
Expand Up @@ -23,11 +23,11 @@
[%- endmacro %]

[% macro logo_badge() -%]
[![Serious Scaffold Python]({{ logo_badge_url() }})](https://serious-scaffold.github.io/serious-scaffold-python)
[![Serious Scaffold Python]({{ logo_badge_url() }})](https://serious-scaffold.github.io/ss-python)
[%- endmacro %]

[% macro logo_badge_url() -%]
https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json
https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/ss-python/_static/badges/logo.json
[%- endmacro %]

[% macro page_url() -%]
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Expand Up @@ -31,16 +31,16 @@ keywords = [
"project-template",
"serious-scaffold",
]
name = "serious-scaffold"
name = "ss-python"
readme = "README.md"
requires-python = ">=3.8"

[project.scripts]
serious-scaffold-cli = "serious_scaffold.cli:app"
ss-python-cli = "ss_python.cli:app"

[project.urls]
homepage = "https://github.com/serious-scaffold/serious-scaffold-python/"
issue = "https://github.com/serious-scaffold/serious-scaffold-python/issues"
homepage = "https://github.com/serious-scaffold/ss-python/"
issue = "https://github.com/serious-scaffold/ss-python/issues"

[tool.black]
force-exclude = '''
Expand All @@ -54,7 +54,7 @@ fail_under = 100

[tool.coverage.run]
source = [
"serious_scaffold",
"ss_python",
]

[tool.isort]
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -24,7 +24,7 @@ class Settings(BaseSettings):
"""Default logging level for the project."""

model_config = SettingsConfigDict(
env_prefix="SERIOUS_SCAFFOLD_",
env_prefix="SS_PYTHON_",
)


Expand Down
2 changes: 1 addition & 1 deletion template/Makefile.jinja
Expand Up @@ -18,7 +18,7 @@ CONSTRAINTS_FILE := constraints/$(PYTHON_VERSION).txt
PUBLIC_DIR := $(shell [ "$$READTHEDOCS" = "True" ] && echo "$$READTHEDOCS_OUTPUT/html" || echo "public")

# URL and Path of changelog source code.
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://serious-scaffold.github.io/serious-scaffold-python}/_sources/changelog.md.txt)
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://{{ page_url() }}}/_sources/changelog.md.txt)
CHANGELOG_PATH := docs/changelog.md

########################################################################################
Expand Down
6 changes: 3 additions & 3 deletions template/README.md.jinja
Expand Up @@ -42,7 +42,7 @@

[![{{ project_name }}](https://{{ page_url() }}/_static/images/logo.svg)](https://{{ repo_url() }})

Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring lint, test and documentation, as well as implementing settings, logging and other frequently used modules. [Serious Scaffold Python](https://github.com/serious-scaffold/serious-scaffold-python) streamlines this process. Powered by [`copier`](https://copier.readthedocs.io/), bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template.
Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring lint, test and documentation, as well as implementing settings, logging and other frequently used modules. [Serious Scaffold Python](https://github.com/serious-scaffold/ss-python) streamlines this process. Powered by [`copier`](https://copier.readthedocs.io/), bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template.

[% if repo_host_type == 'github.com' -%]
If you find this helpful, please consider [sponsorship](https://github.com/sponsors/{{ author_name }}).
Expand Down Expand Up @@ -84,7 +84,7 @@ pipx install pre-commit
1. Generate the project.

```bash
copier copy gh:serious-scaffold/serious-scaffold-python /path/to/project
copier copy gh:serious-scaffold/ss-python /path/to/project
```

2. Navigate to the project directory and initialize a git repository.
Expand All @@ -104,7 +104,7 @@ pipx install pre-commit

```bash
git add .
git commit -m "Initialize from serious-scaffold-python."
git commit -m "Initialize from serious-scaffold."
```

5. That's it! Feel free to focus on the coding within `src` folder.
Expand Down
6 changes: 3 additions & 3 deletions template/docs/dev/proj.md
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

[`copier`](https://copier.readthedocs.io/) serves as a key tool in `serious-scaffold-python`, differentiating it from other project templates. The installation can be done with the following command.
[`copier`](https://copier.readthedocs.io/) serves as a key tool in `serious-scaffold`, differentiating it from other project templates. The installation can be done with the following command.

```{note}
Using `pipx` for management is recommended and you can find pipx's installation instructions [here](https://pypa.github.io/pipx/installation/).
Expand Down Expand Up @@ -33,7 +33,7 @@ pipx install copier
```

```bash
copier copy gh:serious-scaffold/serious-scaffold-python .
copier copy gh:serious-scaffold/ss-python .
```

1. Set up the development environment.
Expand All @@ -46,7 +46,7 @@ pipx install copier

```bash
git add .
git commit -m "chore: Initialize from serious-scaffold-python."
git commit -m "chore: Initialize from ss-python."
SKIP=no-commit-to-branch git push
```

Expand Down
2 changes: 1 addition & 1 deletion test/cli_test.py
@@ -1,7 +1,7 @@
"""Test for cli."""
from typer.testing import CliRunner

from serious_scaffold.cli import app
from ss_python.cli import app

runner = CliRunner()

Expand Down
4 changes: 2 additions & 2 deletions test/pkg_test.py
@@ -1,8 +1,8 @@
"""Test for pkg."""

import serious_scaffold
import ss_python


def test_pkg() -> None:
"""Test for pkg."""
assert serious_scaffold.__package__ == "serious_scaffold"
assert ss_python.__package__ == "ss_python"
4 changes: 2 additions & 2 deletions test/settings_test.py
@@ -1,13 +1,13 @@
"""Test for settings."""
import os

from serious_scaffold.settings import global_settings, settings
from ss_python.settings import global_settings, settings


def test_settings() -> None:
"""Test for settings."""
assert settings.logging_level == os.getenv(
"SERIOUS_SCAFFOLD_LOGGING_LEVEL",
"SS_PYTHON_LOGGING_LEVEL",
"INFO",
)
assert str(global_settings.ci).lower() == os.getenv("CI", "False").lower()

0 comments on commit c0c7105

Please sign in to comment.