Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
#- id: check-symlinks
- id: debug-statements
#- id: requirements-txt-fixer
- id: check-executables-have-shebangs
#- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: fix-encoding-pragma
args: ['--remove']
Expand Down
10 changes: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ per `setuptools documentation`_.
To use this template, replace the example project name with your own:

* change the project name at the top of ``pyproject.toml``
* change the project name in ``docs/source/conf.py`` *and* ``docs/source/index.rst``
* change the author details in ``pyproject.toml`` *and* ``docs/source/conf.py``
* change the package directory name under the ``src`` folder
* change the github URL paths in ``pyproject.toml``
* change the project name in ``docs/source/conf.py``


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

Finally, best practices for public repositories includes following extra
features:
Finally, best practices for public repositories should include the following
extra features:

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

See the following sections for more information on gitchangelog and pre-commit.
See the following sections in the built docs for more information on
gitchangelog and pre-commit.

You will need to install pre-commit before contributing any changes;
installing it using your system's package manager is recommended,
Expand Down
1 change: 1 addition & 0 deletions docs/source/README.rst
48 changes: 20 additions & 28 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@

# -- Project information -----------------------------------------------------

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

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

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

# autoapi
#autoapi_dirs = ['../../src']

# API docs
# apidoc_modules = [
# {
# "path": f"../../src/{proj_name}",
# "destination": "api/",
# },
# ]

# sphinxcontrib.apidoc
apidoc_module_dir = '../../src'
apidoc_module_dir = f'../../src/{project}'
apidoc_output_dir = 'api'
apidoc_excluded_paths = ['scripts', 'tests']
apidoc_module_first = True
Expand All @@ -76,7 +65,10 @@
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of strings:
#
source_suffix = ['.rst', '.md']
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

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

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'manni'

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


# -- Options for HTML output ----------------------------------------------

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

html_sidebars = {
'**': [
Expand Down Expand Up @@ -135,7 +127,7 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'ds2mermaiddoc'
htmlhelp_basename = 'simpledoc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -162,7 +154,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'ds2mermaid.tex', 'ds2mermaid Documentation',
(master_doc, 'simple.tex', 'simple Documentation',
[author], 'manual'),
]

Expand All @@ -172,7 +164,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'ds2mermaid', 'ds2mermaid Documentation',
(master_doc, 'simple', 'simple Documentation',
[author], 1)
]

Expand All @@ -183,7 +175,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'ds2mermaid', 'ds2mermaid Documentation',
[author], 'ds2mermaid', description,
(master_doc, 'simple', 'simple Documentation',
[author], 'simple', description,
'Miscellaneous'),
]
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Foobar API and SW Docs
Simple API and SW Docs
======================

.. git_commit_detail::
Expand All @@ -10,10 +10,10 @@ Foobar API and SW Docs
:no_github_link:

.. toctree::
:maxdepth: 3
:maxdepth: 1
:caption: Contents:

readme_include
README
api/modules
dev/generate-changelog
dev/pre-commit-config
Expand Down
6 changes: 0 additions & 6 deletions docs/source/readme_include.rst

This file was deleted.

23 changes: 12 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ requires = [
build-backend = "setuptools.build_meta"

[project]
name = "ds2mermaid"
description = "A mermaid diagram generator for doorstop requirements"
name = "simple"
description = "A simple project template using setuptools and setuptools-scm"
dynamic = ["version"]
readme = "README.rst"
license = "MIT"

authors = [
{name = "Stephen Arnold"},
{email = "[email protected]"},
{name = "Tracy Developer"},
{email = "[email protected]"},
]

classifiers = [
Expand All @@ -34,7 +34,6 @@ classifiers = [
dependencies = [
'importlib-resources; python_version < "3.10"',
"munch[yaml]",
"platformdirs",
]

requires-python = ">=3.9"
Expand All @@ -55,19 +54,21 @@ doc = [
"sphinx",
"sphinxcontrib.apidoc",
"sphinx_git",
"recommonmark",
"sphinx_rtd_theme<3.0",
"myst-parser",
"sphinxcontrib.mermaid",
"sphinx_rtd_theme<3.0", # for the version display
"sphinx-nefertiti",
]
test = [
"pytest",
"pytest-cov",
]

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

[tool.setuptools]
package-dir = {"" = "src"}
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
importlib-resources; python_version < "3.10"
munch[yaml]
platformdirs
2 changes: 1 addition & 1 deletion src/ds2mermaid/__init__.py → src/simple/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from importlib.metadata import version

__version__ = version('ds2mermaid')
__version__ = version('simple')

__all__ = [
"__version__",
Expand Down
5 changes: 2 additions & 3 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from pathlib import Path

import pytest
from munch import Munch

from ds2mermaid import version

import pytest
from simple import version


def test_nothing(capfd):
Expand Down
30 changes: 7 additions & 23 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ deps =

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

[testenv]
description =
Expand Down Expand Up @@ -66,7 +66,7 @@ deps =
-e .[test,cov]

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

[testenv:coverage]
description =
Expand Down Expand Up @@ -157,7 +157,7 @@ deps =
flake8

commands =
flake8 src/ scripts/
flake8 src/

[testenv:build]
skip_install = true
Expand Down Expand Up @@ -195,8 +195,8 @@ deps =
pip>=23.1

commands =
python -m pip install ds2mermaid --pre --force-reinstall --prefer-binary -f dist/
python -m pip show -f ds2mermaid
python -m pip install simple --pre --force-reinstall --prefer-binary -f dist/
python -m pip show -f simple

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

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

[testenv:reuse]
skip_install = true
Expand Down Expand Up @@ -279,7 +279,7 @@ deps =
bandit[toml]

commands =
bandit -c pyproject.toml -r src scripts
bandit -c pyproject.toml -r src

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

[testenv:md]
skip_install = true
passenv =
DEBUG
PYTHON
CI
OS
PYTHONIOENCODING
PIP_DOWNLOAD_CACHE

deps =
{[base]deps}

commands =
python scripts/process_md_urls.py {posargs}

[testenv:clean]
skip_install = true
allowlist_externals =
Expand Down