Skip to content

Commit a89496a

Browse files
committed
chore: initial commit
0 parents  commit a89496a

13 files changed

Lines changed: 1015 additions & 0 deletions

File tree

.forgejo/workflows/tests.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
when:
3+
event: [push, pull_request, tag, manual]
4+
5+
steps:
6+
- name: python unit tests
7+
image: python:latest
8+
commands:
9+
- apt update
10+
- apt install --yes locales python3-poetry
11+
- poetry install --without deploy
12+
- poetry run pre-commit run --color=always --all-files
13+
- poetry run pytest --cov --color=yes

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.env
2+
*.pyc
3+
*.mo
4+
*.prof
5+
.python_history
6+
.tox
7+
.coverage
8+
.coverage.*
9+
htmlcov
10+
*.egg-info
11+
build
12+
dist
13+
.vscode

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
repos:
3+
- repo: https://github.com/astral-sh/ruff-pre-commit
4+
rev: 'v0.4.4'
5+
hooks:
6+
- id: ruff
7+
args: [--fix, --exit-non-zero-on-fix]
8+
- id: ruff-format
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v4.6.0
11+
hooks:
12+
- id: fix-byte-order-marker
13+
- id: trailing-whitespace
14+
exclude: "\\.svg$|\\.map$|\\.min\\.css$|\\.min\\.js$|\\.po$|\\.pot$"
15+
- id: end-of-file-fixer
16+
exclude: "\\.svg$|\\.map$|\\.min\\.css$|\\.min\\.js$|\\.po$|\\.pot$"
17+
- id: check-toml
18+
- repo: https://github.com/PyCQA/docformatter
19+
rev: v1.7.5
20+
hooks:
21+
- id: docformatter
22+
- repo: https://github.com/rtts/djhtml
23+
rev: 3.0.6
24+
hooks:
25+
- id: djhtml

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# scim-cli
2+
3+
A scim utility command line.

doc/__init__.py

Whitespace-only changes.

doc/conf.py

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
import datetime
2+
import os
3+
import sys
4+
from importlib import metadata
5+
6+
sys.path.insert(0, os.path.abspath(".."))
7+
sys.path.insert(0, os.path.abspath("../scim_cli"))
8+
9+
# -- General configuration ------------------------------------------------
10+
11+
extensions = [
12+
"sphinx.ext.autodoc",
13+
"sphinx.ext.autosectionlabel",
14+
"sphinx.ext.doctest",
15+
"sphinx.ext.graphviz",
16+
"sphinx.ext.intersphinx",
17+
"sphinx.ext.todo",
18+
"sphinx.ext.viewcode",
19+
"sphinx_click",
20+
]
21+
22+
templates_path = ["_templates"]
23+
master_doc = "index"
24+
project = "scim-cli"
25+
year = datetime.datetime.now().strftime("%Y")
26+
copyright = f"{year}, Yaal Coop"
27+
author = "Yaal Coop"
28+
29+
version = metadata.version("scim_cli")
30+
language = "en"
31+
exclude_patterns = []
32+
pygments_style = "sphinx"
33+
todo_include_todos = True
34+
toctree_collapse = False
35+
36+
intersphinx_mapping = {
37+
"python": ("https://docs.python.org/3", None),
38+
}
39+
40+
# -- Options for HTML output ----------------------------------------------
41+
42+
html_theme = "shibuya"
43+
# html_static_path = ["_static"]
44+
html_baseurl = "https://scim-cli.readthedocs.io"
45+
html_theme_options = {
46+
"globaltoc_expand_depth": 3,
47+
"accent_color": "orange",
48+
"gitlab_url": "https://codeberg.org/yaal/scim-cli",
49+
"mastodon_url": "https://toot.aquilenet.fr/@yaal",
50+
"nav_links": [
51+
{
52+
"title": "SCIM",
53+
"url": "https://simplecloud.info/",
54+
},
55+
{"title": "PyPI", "url": "https://pypi.org/project/scim_cli"},
56+
],
57+
}
58+
59+
# -- Options for HTMLHelp output ------------------------------------------
60+
61+
htmlhelp_basename = "scim_clidoc"
62+
63+
64+
# -- Options for LaTeX output ---------------------------------------------
65+
66+
latex_elements = {}
67+
latex_documents = [
68+
(master_doc, "scim_cli.tex", "scim_cli Documentation", "Yaal", "manual")
69+
]
70+
71+
# -- Options for manual page output ---------------------------------------
72+
73+
man_pages = [(master_doc, "scim_cli", "scim_cli Documentation", [author], 1)]
74+
75+
# -- Options for Texinfo output -------------------------------------------
76+
77+
texinfo_documents = [
78+
(
79+
master_doc,
80+
"scim_cli",
81+
"scim_cli Documentation",
82+
author,
83+
"scim_cli",
84+
"One line description of project.",
85+
"Miscellaneous",
86+
)
87+
]
88+
89+
# -- Options for autosectionlabel -----------------------------------------
90+
91+
autosectionlabel_prefix_document = True
92+
autosectionlabel_maxdepth = 2

doc/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
scim-cli
2+
========
3+
4+
scim-cli is a tool to help you develop scim applications.
5+
6+
.. _cli:
7+
8+
.. click:: scim_cli:cli
9+
:prog: scim
10+
:nested: full

poetry.lock

Lines changed: 739 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
[build-system]
2+
requires = ["poetry-core"]
3+
build-backend = "poetry.core.masonry.api"
4+
5+
[tool.poetry]
6+
name = "scim-cli"
7+
version = "0.1.0"
8+
description = "A SCIM utility CLI"
9+
authors = ["Yaal Coop <contact@yaal.coop>"]
10+
license = "MIT"
11+
readme = "README.md"
12+
13+
[tool.poetry.dependencies]
14+
python = "^3.9"
15+
click = "^8.1.7"
16+
17+
[tool.poetry.group.dev.dependencies]
18+
pytest = "^8.2.1"
19+
pytest-coverage = "^0.0"
20+
21+
[tool.poetry.group.doc.dependencies]
22+
shibuya = "^2024.5.15"
23+
sphinx = "^7.3.7"
24+
sphinx-click = "^6.0.0"
25+
26+
[tool.poetry.scripts]
27+
scim = "scim_cli:cli"
28+
29+
[tool.coverage.run]
30+
source = [
31+
"scim_cli",
32+
"tests",
33+
]
34+
omit = [".tox/*"]
35+
branch = true
36+
37+
[tool.coverage.report]
38+
exclude_lines = [
39+
"@pytest.mark.skip",
40+
"pragma: no cover",
41+
"raise NotImplementedError",
42+
"except ImportError",
43+
"if app.debug",
44+
]
45+
46+
[tool.ruff.lint]
47+
select = [
48+
"E", # pycodestyle
49+
"F", # pyflakes
50+
"I", # isort
51+
"UP", # pyupgrade
52+
]
53+
ignore = [
54+
"E501", # line-too-long
55+
"E722", # bare-except
56+
]
57+
58+
[tool.ruff.lint.isort]
59+
force-single-line = true
60+
61+
[too.ruff.format]
62+
docstring-code-format = true
63+
64+
[tool.tox]
65+
legacy_tox_ini = """
66+
[tox]
67+
isolated_build = true
68+
skipsdist = true
69+
envlist =
70+
style
71+
py39
72+
py310
73+
py311
74+
py312
75+
doc
76+
coverage
77+
78+
[testenv]
79+
allowlist_externals = poetry
80+
commands =
81+
poetry install
82+
poetry run pytest --showlocals --full-trace {posargs}
83+
84+
[testenv:style]
85+
commands =
86+
pip install pre-commit
87+
pre-commit run --all-files
88+
89+
[testenv:doc]
90+
commands =
91+
poetry install --with doc --without dev
92+
poetry run sphinx-build doc build/sphinx/html
93+
94+
[testenv:coverage]
95+
commands =
96+
poetry install
97+
poetry run pytest --cov --cov-fail-under=100 --cov-report term:skip-covered {posargs}
98+
poetry run coverage html
99+
"""

scim_cli/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import click
2+
3+
4+
@click.command()
5+
def cli():
6+
"""Hello, world."""
7+
click.echo("Hello world!")

0 commit comments

Comments
 (0)