Skip to content

Commit be8fb91

Browse files
committed
fix: dev: cleanup crufty bits of metadata and rename to simple
* cleanup and simplify docs build config Signed-off-by: Stephen L Arnold <[email protected]>
1 parent 447b7f3 commit be8fb91

File tree

10 files changed

+51
-79
lines changed

10 files changed

+51
-79
lines changed

README.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ per `setuptools documentation`_.
1414
To use this template, replace the example project name with your own:
1515

1616
* change the project name at the top of ``pyproject.toml``
17+
* change the project name in ``docs/source/conf.py`` *and* ``docs/source/index.rst``
18+
* change the author details in ``pyproject.toml`` *and* ``docs/source/conf.py``
1719
* change the package directory name under the ``src`` folder
1820
* change the github URL paths in ``pyproject.toml``
19-
* change the project name in ``docs/source/conf.py``
2021

2122

2223
.. _setuptools documentation: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
@@ -69,8 +70,8 @@ project URL below (using your new project name) and add the following new labels
6970
Github best practices
7071
---------------------
7172

72-
Finally, best practices for public repositories includes following extra
73-
features:
73+
Finally, best practices for public repositories should include the following
74+
extra features:
7475

7576
* under Advanced Security enable Code Scanning, Dependabot, Private
7677
Vulnerability Reporting, and (default) Codeql config
@@ -157,7 +158,8 @@ types and line numbers. Note you must fix any fatal errors for the
157158
commit to succeed; some errors should be fixed automatically (use
158159
``git status`` and ``git diff`` to review any changes).
159160

160-
See the following sections for more information on gitchangelog and pre-commit.
161+
See the following sections in the built docs for more information on
162+
gitchangelog and pre-commit.
161163

162164
You will need to install pre-commit before contributing any changes;
163165
installing it using your system's package manager is recommended,

docs/source/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.rst

docs/source/conf.py

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
# -- Project information -----------------------------------------------------
1414

15-
proj_name = 'ds2mermaid'
15+
proj_name = 'simple'
1616
# The full version, including alpha/beta/rc tags with setuptols-scm
1717
# workaround for extra-long dirty version string
1818
release = version(proj_name).split("+")[0]
19-
# The short X.Y version.
20-
version = '.'.join(release.split('.')[:2])
19+
# Use dev version instead of short X.Y version.
20+
version = release
2121

2222
project = proj_name
23-
author = 'Goleta Star, LLC'
24-
copyright = '2022 - ' + str(datetime.now().year) + f' {author}'
23+
author = 'Tracy Developer'
24+
copyright = str(datetime.now().year) + f' {author}'
2525

2626
# The version info for the project you're documenting, acts as replacement for
2727
# |version| and |release|, also used in various other places throughout the
@@ -48,22 +48,11 @@
4848
'sphinx.ext.todo',
4949
'sphinx.ext.coverage',
5050
'sphinx.ext.viewcode',
51-
'recommonmark',
51+
'myst_parser',
5252
]
5353

54-
# autoapi
55-
#autoapi_dirs = ['../../src']
56-
57-
# API docs
58-
# apidoc_modules = [
59-
# {
60-
# "path": f"../../src/{proj_name}",
61-
# "destination": "api/",
62-
# },
63-
# ]
64-
6554
# sphinxcontrib.apidoc
66-
apidoc_module_dir = '../../src'
55+
apidoc_module_dir = f'../../src/{project}'
6756
apidoc_output_dir = 'api'
6857
apidoc_excluded_paths = ['scripts', 'tests']
6958
apidoc_module_first = True
@@ -76,7 +65,10 @@
7665
# The suffix(es) of source filenames.
7766
# You can specify multiple suffix as a list of strings:
7867
#
79-
source_suffix = ['.rst', '.md']
68+
source_suffix = {
69+
'.rst': 'restructuredtext',
70+
'.md': 'markdown',
71+
}
8072

8173
# The master toctree document.
8274
master_doc = 'index'
@@ -94,19 +86,19 @@
9486
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'data']
9587

9688
# The name of the Pygments (syntax highlighting) style to use.
97-
pygments_style = 'sphinx'
89+
pygments_style = 'manni'
9890

9991
# If true, `todo` and `todoList` produce output, else they produce nothing.
10092
todo_include_todos = True
10193

102-
10394
# -- Options for HTML output ----------------------------------------------
10495

10596
# The theme to use for HTML and HTML Help pages. See the documentation for
10697
# a list of builtin themes.
10798
#
108-
#html_theme = 'sphinx_rtd_theme'
109-
html_theme = 'classic' # still has a version
99+
html_theme = 'sphinx_rtd_theme'
100+
# setup in https://sphinx-nefertiti.readthedocs.io/latest/quick-start.html
101+
#html_theme = 'sphinx_nefertiti'
110102

111103
html_sidebars = {
112104
'**': [
@@ -135,7 +127,7 @@
135127
# -- Options for HTMLHelp output ------------------------------------------
136128

137129
# Output file base name for HTML help builder.
138-
htmlhelp_basename = 'ds2mermaiddoc'
130+
htmlhelp_basename = 'simpledoc'
139131

140132

141133
# -- Options for LaTeX output ---------------------------------------------
@@ -162,7 +154,7 @@
162154
# (source start file, target name, title,
163155
# author, documentclass [howto, manual, or own class]).
164156
latex_documents = [
165-
(master_doc, 'ds2mermaid.tex', 'ds2mermaid Documentation',
157+
(master_doc, 'simple.tex', 'simple Documentation',
166158
[author], 'manual'),
167159
]
168160

@@ -172,7 +164,7 @@
172164
# One entry per manual page. List of tuples
173165
# (source start file, name, description, authors, manual section).
174166
man_pages = [
175-
(master_doc, 'ds2mermaid', 'ds2mermaid Documentation',
167+
(master_doc, 'simple', 'simple Documentation',
176168
[author], 1)
177169
]
178170

@@ -183,7 +175,7 @@
183175
# (source start file, target name, title, author,
184176
# dir menu entry, description, category)
185177
texinfo_documents = [
186-
(master_doc, 'ds2mermaid', 'ds2mermaid Documentation',
187-
[author], 'ds2mermaid', description,
178+
(master_doc, 'simple', 'simple Documentation',
179+
[author], 'simple', description,
188180
'Miscellaneous'),
189181
]

docs/source/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Foobar API and SW Docs
1+
Simple API and SW Docs
22
======================
33

44
.. git_commit_detail::
@@ -10,10 +10,10 @@ Foobar API and SW Docs
1010
:no_github_link:
1111

1212
.. toctree::
13-
:maxdepth: 3
13+
:maxdepth: 1
1414
:caption: Contents:
1515

16-
readme_include
16+
README
1717
api/modules
1818
dev/generate-changelog
1919
dev/pre-commit-config

docs/source/readme_include.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

pyproject.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ requires = [
66
build-backend = "setuptools.build_meta"
77

88
[project]
9-
name = "ds2mermaid"
10-
description = "A mermaid diagram generator for doorstop requirements"
9+
name = "simple"
10+
description = "A simple project template using setuptools and setuptools-scm"
1111
dynamic = ["version"]
1212
readme = "README.rst"
1313
license = "MIT"
1414

1515
authors = [
16-
{name = "Stephen Arnold"},
17-
{email = "[email protected]"},
16+
{name = "Tracy Developer"},
17+
{email = "[email protected]"},
1818
]
1919

2020
classifiers = [
@@ -33,8 +33,6 @@ classifiers = [
3333

3434
dependencies = [
3535
'importlib-resources; python_version < "3.10"',
36-
"munch[yaml]",
37-
"platformdirs",
3836
]
3937

4038
requires-python = ">=3.9"
@@ -55,19 +53,21 @@ doc = [
5553
"sphinx",
5654
"sphinxcontrib.apidoc",
5755
"sphinx_git",
58-
"recommonmark",
59-
"sphinx_rtd_theme<3.0",
56+
"myst-parser",
57+
"sphinxcontrib.mermaid",
58+
"sphinx_rtd_theme<3.0", # for the version display
59+
"sphinx-nefertiti",
6060
]
6161
test = [
6262
"pytest",
6363
"pytest-cov",
6464
]
6565

6666
[project.urls]
67-
Homepage = "https://github.com/sarnold/doorstop-to-mermaid"
68-
Repository = "https://github.com/sarnold/doorstop-to-mermaid.git"
69-
Issues = "https://github.com/sarnold/doorstop-to-mermaid/issues"
70-
Changelog = "https://github.com/sarnold/doorstop-to-mermaid/blob/main/CHANGELOG.rst"
67+
Homepage = "https://github.com/sarnold/simple-python-project"
68+
Repository = "https://github.com/sarnold/simple-python-project.git"
69+
Issues = "https://github.com/sarnold/simple-python-project/issues"
70+
Changelog = "https://github.com/sarnold/simple-python-project/blob/main/CHANGELOG.rst"
7171

7272
[tool.setuptools]
7373
package-dir = {"" = "src"}

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
importlib-resources; python_version < "3.10"
2-
munch[yaml]
32
platformdirs
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from importlib.metadata import version
66

7-
__version__ = version('ds2mermaid')
7+
__version__ = version('simple')
88

99
__all__ = [
1010
"__version__",

tests/test_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from munch import Munch
44

5-
from ds2mermaid import version
5+
from simple import version
66

77
import pytest
88

tox.ini

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ deps =
3434

3535
[reqs]
3636
deps =
37-
doorstop @ git+https://github.com/VCTLabs/doorstop.git@linux-simple
37+
doorstop
3838

3939
[testenv]
4040
description =
@@ -66,7 +66,7 @@ deps =
6666
-e .[test,cov]
6767

6868
commands =
69-
python -m pytest -v tests/ --capture={posargs:"fd"} --cov=ds2mermaid --cov-branch --cov-report term-missing
69+
python -m pytest -v tests/ --capture={posargs:"fd"} --cov=simple --cov-branch --cov-report term-missing
7070

7171
[testenv:coverage]
7272
description =
@@ -157,7 +157,7 @@ deps =
157157
flake8
158158

159159
commands =
160-
flake8 src/ scripts/
160+
flake8 src/
161161

162162
[testenv:build]
163163
skip_install = true
@@ -195,8 +195,8 @@ deps =
195195
pip>=23.1
196196

197197
commands =
198-
python -m pip install ds2mermaid --pre --force-reinstall --prefer-binary -f dist/
199-
python -m pip show -f ds2mermaid
198+
python -m pip install simple --pre --force-reinstall --prefer-binary -f dist/
199+
python -m pip show -f simple
200200

201201
[testenv:{docs,ldocs,cdocs}]
202202
# these tox env cmds share a virtual env using the following plugin
@@ -238,7 +238,7 @@ deps =
238238
munch-stubs @ git+https://github.com/VCTLabs/munch-stubs.git@main
239239

240240
commands =
241-
python -m mypy --follow-imports=normal --install-types --non-interactive src/ scripts/
241+
python -m mypy --follow-imports=normal --install-types --non-interactive src/
242242

243243
[testenv:reuse]
244244
skip_install = true
@@ -279,7 +279,7 @@ deps =
279279
bandit[toml]
280280

281281
commands =
282-
bandit -c pyproject.toml -r src scripts
282+
bandit -c pyproject.toml -r src
283283

284284
[testenv:changes]
285285
skip_install = true
@@ -304,22 +304,6 @@ deps =
304304
commands =
305305
bash -c 'gitchangelog {posargs} > CHANGELOG.rst'
306306

307-
[testenv:md]
308-
skip_install = true
309-
passenv =
310-
DEBUG
311-
PYTHON
312-
CI
313-
OS
314-
PYTHONIOENCODING
315-
PIP_DOWNLOAD_CACHE
316-
317-
deps =
318-
{[base]deps}
319-
320-
commands =
321-
python scripts/process_md_urls.py {posargs}
322-
323307
[testenv:clean]
324308
skip_install = true
325309
allowlist_externals =

0 commit comments

Comments
 (0)