Skip to content

Commit 975ff55

Browse files
authored
Merge pull request #3 from sarnold/cleanup
cleanup docs and project bits
2 parents 447b7f3 + 14a7199 commit 975ff55

File tree

11 files changed

+53
-81
lines changed

11 files changed

+53
-81
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
#- id: check-symlinks
1818
- id: debug-statements
1919
#- id: requirements-txt-fixer
20-
- id: check-executables-have-shebangs
20+
#- id: check-executables-have-shebangs
2121
- id: check-shebang-scripts-are-executable
2222
- id: fix-encoding-pragma
2323
args: ['--remove']

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 & 11 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 = [
@@ -34,7 +34,6 @@ classifiers = [
3434
dependencies = [
3535
'importlib-resources; python_version < "3.10"',
3636
"munch[yaml]",
37-
"platformdirs",
3837
]
3938

4039
requires-python = ">=3.9"
@@ -55,19 +54,21 @@ doc = [
5554
"sphinx",
5655
"sphinxcontrib.apidoc",
5756
"sphinx_git",
58-
"recommonmark",
59-
"sphinx_rtd_theme<3.0",
57+
"myst-parser",
58+
"sphinxcontrib.mermaid",
59+
"sphinx_rtd_theme<3.0", # for the version display
60+
"sphinx-nefertiti",
6061
]
6162
test = [
6263
"pytest",
6364
"pytest-cov",
6465
]
6566

6667
[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"
68+
Homepage = "https://github.com/sarnold/simple-python-project"
69+
Repository = "https://github.com/sarnold/simple-python-project.git"
70+
Issues = "https://github.com/sarnold/simple-python-project/issues"
71+
Changelog = "https://github.com/sarnold/simple-python-project/blob/main/CHANGELOG.rst"
7172

7273
[tool.setuptools]
7374
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"
22
munch[yaml]
3-
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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from pathlib import Path
22

3+
import pytest
34
from munch import Munch
45

5-
from ds2mermaid import version
6-
7-
import pytest
6+
from simple import version
87

98

109
def test_nothing(capfd):

0 commit comments

Comments
 (0)