Skip to content

Commit

Permalink
Release 0.1.0 (#33)
Browse files Browse the repository at this point in the history
* Release 0.1.0
  • Loading branch information
hasansezertasan authored Feb 4, 2024
1 parent ffef665 commit 49b06bb
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 8 deletions.
File renamed without changes.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish
on:
workflow_dispatch:
release:
types: [published]

permissions:
contents: read

jobs:
publish:
name: "Publish release"
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.10"
cache: "pip"
- name: Install Dependencies
run: pip install hatch
- name: Build
run: hatch build
- name: Publish
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
run: hatch publish
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

## [Unreleased]

## [0.1.0] - 2024-02-04

### Added

* The contents of the PRs opened in the `starlette-admin` repo have been transferred by [@hasansezertasan](https://github.com/hasansezertasan) in [#1](https://github.com/hasansezertasan/starlette-admin-fields/pull/1)
* Add examples structure by [@hasansezertasan](https://github.com/hasansezertasan) in [#2](https://github.com/hasansezertasan/starlette-admin-fields/pull/2)
* Add support for `SimpleMDE`, `CKEditor4`, and `CKEditor4` by [@hasansezertasan](https://github.com/hasansezertasan) in [#10](https://github.com/hasansezertasan/starlette-admin-fields/pull/10)
* Add Project Structure by [@hasansezertasan](https://github.com/hasansezertasan) in [#11](https://github.com/hasansezertasan/starlette-admin-fields/pull/11)
* Add support for `Bootstrap Show Password` and fix some docstrings by [@hasansezertasan](https://github.com/hasansezertasan) in [#17](https://github.com/hasansezertasan/starlette-admin-fields/pull/17)
* Add Example: Kitchensink by [@hasansezertasan](https://github.com/hasansezertasan) in [#22](https://github.com/hasansezertasan/starlette-admin-fields/pull/22)
* Rename `extend_admin` as `StarletteAdminFields` and add placeholder template by [@hasansezertasan](https://github.com/hasansezertasan) in [#29](https://github.com/hasansezertasan/starlette-admin-fields/pull/29)
* Add tests and update CI/CD by [@hasansezertasan](https://github.com/hasansezertasan) in [#30](https://github.com/hasansezertasan/starlette-admin-fields/pull/30)
* Remove `examples.fields` folder and put the entire example in one directory: `example` by [@hasansezertasan](https://github.com/hasansezertasan) in [#32](https://github.com/hasansezertasan/starlette-admin-fields/pull/32)

<!-- Links -->
[keep a changelog]: https://keepachangelog.com/en/1.1.0/
[semantic versioning]: https://semver.org
Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# starlette-admin-fields

[![CI](https://github.com/hasansezertasan/starlette-admin-fields/actions/workflows/ci.yml/badge.svg)](https://github.com/hasansezertasan/starlette-admin-fields/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
[![PyPI - Version](https://img.shields.io/pypi/v/starlette-admin-fields.svg)](https://pypi.org/project/starlette-admin-fields)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/starlette-admin-fields.svg)](https://pypi.org/project/starlette-admin-fields)
[![License](https://img.shields.io/github/license/hasansezertasan/starlette-admin-fields.svg)](https://github.com/hasansezertasan/starlette-admin-fields/blob/main/LICENSE)
[![Latest Commit](https://img.shields.io/github/last-commit/hasansezertasan/starlette-admin-fields)](https://github.com/hasansezertasan/starlette-admin-fields)

[![Downloads](https://pepy.tech/badge/starlette-admin-fields)](https://pepy.tech/project/starlette-admin-fields)
[![Downloads/Month](https://pepy.tech/badge/starlette-admin-fields/month)](https://pepy.tech/project/starlette-admin-fields)
[![Downloads/Week](https://pepy.tech/badge/starlette-admin-fields/week)](https://pepy.tech/project/starlette-admin-fields)

Extra fields to use with Starlette Admin

Expand All @@ -10,9 +17,29 @@ Extra fields to use with Starlette Admin
**Table of Contents**

- [starlette-admin-fields](#starlette-admin-fields)
- [Features](#features)
- [Fields](#fields)
- [Installation](#installation)
- [Usage](#usage)
- [Motivation](#motivation)
- [Author](#author)
- [License](#license)

## Features

- Quick integration with Starlette Admin
- Zero dependencies
- Fully typed

### Fields

| Field | Name |
| ---------------------------------------------------------------------------- | ---------------------------- |
| [Bootstrap Show Password](https://bootstrap-show-password.wenzhixin.net.cn/) | `BootstrapShowPasswordField` |
| [CKEditor4](https://ckeditor.com/) | `CKEditor4Field` |
| [CKEditor5](https://ckeditor.com/) | `CKEditor5Field` |
| [SimpleMDE](https://simplemde.com/) | `SimpleMDEField` |

## Installation

> Latest Release
Expand All @@ -27,6 +54,18 @@ pip install starlette-admin-fields
pip install git+https://github.com/hasansezertasan/starlette-admin-fields.git
```

## Usage

I didn't write the documentation yet but it's pretty straightforward. You can check the [example](https://github.com/hasansezertasan/starlette-admin-fields/tree/main/example) directory for usage.

## Motivation

I implemented these fields for my own projects and decided to share them.

## Author

- [Hasan Sezer Tasan](https://www.github.com/hasansezertasan), It's me :wave:

## License

`starlette-admin-fields` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
22 changes: 15 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ keywords = [
"jinja2",
"template",
"starlette",
"fastapi",
"admin",
"dashboard",
"starlette-admin",
"fields",
"ckeditor4",
"ckeditor5",
"simplemde",
]
authors = [{ name = "Hasan Sezer Taşan", email = "hasansezertasan@gmail.com" }]
maintainers = [
Expand Down Expand Up @@ -57,20 +62,19 @@ Issues = "https://github.com/hasansezertasan/starlette-admin-fields/issues"
[project.optional-dependencies]
test = [
"pytest >=7.2.0, <7.5.0",
"pytest-asyncio >=0.20.2, <0.24.0",
"mypy ==1.8.0",
"ruff ==0.1.9",
"black ==23.12.1",
"ruff ==0.1.15",
"black ==24.1.1",
"httpx >=0.23.3, <0.27.0",
]
cov = ["coverage[toml] >=7.0.0, <7.5.0"]
cov = ["coverage[toml] >=7.0.0, <7.4.0"]
doc = [
"mkdocs >=1.4.2, <2.0.0",
"mkdocs-material >=9.0.0, <10.0.0",
"mkdocstrings[python] >=0.19.0, <0.25.0",
"mkdocs-static-i18n >=0.53.0, <0.57.0",
]
dev = ["pre-commit >=2.20.0, <4.0.0", "uvicorn >=0.20.0, <0.27.0"]
dev = ["pre-commit >=2.20.0, <4.0.0", "uvicorn >=0.20.0, <0.26.0"]

[tool.hatch.envs.default]
features = ["test", "cov", "doc", "dev"]
Expand All @@ -80,7 +84,11 @@ format = ["ruff starlette_admin_fields tests --fix", "black ."]
[tool.hatch.envs.test]
features = ["test", "cov"]
[tool.hatch.envs.test.scripts]
lint = ["mypy starlette_admin_fields", "ruff starlette_admin_fields tests", "black . --check"]
lint = [
"mypy starlette_admin_fields",
"ruff starlette_admin_fields tests",
"black . --check",
]
all = "coverage run -m pytest tests"


Expand Down Expand Up @@ -116,6 +124,7 @@ parallel = true
source = ["starlette_admin_fields", "tests"]

[tool.ruff]
target-version = "py38"
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
Expand Down Expand Up @@ -144,7 +153,6 @@ ignore = [
"E501", # line too long, handled by black
"N818", # Exception {name} should be named with an Error suffix
]
target-version = "py38"

[tool.ruff.isort]
known-third-party = ["starlette_admin_fields"]
Expand Down
2 changes: 1 addition & 1 deletion starlette_admin_fields/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024-present hasansezertasan <hasansezertasan@gmail.com>
#
# SPDX-License-Identifier: MIT
__version__ = "0.0.1"
__version__ = "0.1.0"

0 comments on commit 49b06bb

Please sign in to comment.