Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 9e0c9b8

Browse files
authored
Merge pull request #22 from Anselmoo/Fixed-docs
Update docs and setup
2 parents f77b0e8 + 1b73eab commit 9e0c9b8

File tree

11 files changed

+37
-24
lines changed

11 files changed

+37
-24
lines changed

.github/workflows/cd.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ jobs:
1919
strategy:
2020
matrix:
2121
python-version:
22-
- 3.6
23-
- 3.7
22+
#- 3.6
23+
#- 3.7
2424
- 3.8
25-
- 3.9
25+
#- 3.9
2626
os:
2727
- ubuntu-latest
28-
- macOS-latest
29-
- windows-latest
28+
#- macOS-latest
29+
#- windows-latest
3030
arch:
3131
- x64
3232
steps:

LICENSE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,8 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202+
203+
---
204+
205+
mkdocstrings-sourcelink is inspired and partially derived, from keras-autodoc
206+
extension https://github.com/keras-team/keras-autodoc.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[![codecov](https://codecov.io/gh/AI2Business/mkdocstrings-sourcelink/branch/main/graph/badge.svg?token=DKE0SHCRF7)](https://codecov.io/gh/AI2Business/mkdocstrings-sourcelink)
55
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black)
66
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/AI2Business/mkdocstrings-sourcelink.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/AI2Business/mkdocstrings-sourcelink/context:python)
7+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocstrings-sourcelink?logo=python&logoColor=yellow)](https://pypi.org/project/mkdocstrings-sourcelink/)
8+
[![PyPI](https://img.shields.io/pypi/v/mkdocstrings-sourcelink?logo=PyPi&logoColor=yellow)](https://pypi.org/project/mkdocstrings-sourcelink/)
79

810
# mkdocstrings-sourcelink
911

docs/Pipfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ mkdocs-minify-plugin = "*"
1616
mkdocs-redirects = "*"
1717
mkdocs-git-revision-date-plugin = "*"
1818
pymdown-extensions = "*"
19-
mkdocs-pymdownx-material-extras = "*"
2019
mkdocs-git-revision-date-localized-plugin = "*"
2120
pyspelling = "*"
2221

docs/Pipfile.lock

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/doc-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ mkdocs-macros-test==0.1.0
2424
mkdocs-material-extensions==1.0.1; python_version >= '3.5'
2525
mkdocs-material==6.2.8
2626
mkdocs-minify-plugin==0.4.0
27-
mkdocs-pymdownx-material-extras==1.1.3
2827
mkdocs-redirects==1.0.1
2928
mkdocs==1.1.2
3029
mkdocstrings==0.14.0

docs/generate_docs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
],
3131
},
3232
}
33-
markdown_files = {"HOME": {"index.md": ["../README.md"]}}
33+
markdown_files = {
34+
"HOME": {"index.md": ["../README.md"]},
35+
"CONTRIBUTING": {"contributing.md": ["../CONTRIBUTING.md"]},
36+
"LICENSE": {"license.md": ["../LICENSE"]},
37+
}
3438
root = Path(__file__).resolve().parents[1]
3539
MkDocGenerator(
3640
root / "docs" / "src",

docs/mkdocs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ site_author: AI2Business & coworkers
55

66
repo_url: https://github.com/AI2Business/mkdocstrings-sourcelink
77
repo_name: mkdocstrings-sourcelink
8-
edit_uri: edit/main/docs/src
8+
edit_uri: edit/main/docs/
99

1010
# Copyright
1111
copyright: Copyright © 2021 - AI2Business
@@ -120,7 +120,6 @@ extra:
120120

121121
plugins:
122122
- search
123-
- mkdocs_pymdownx_material_extras
124123
- macros
125124
- mkdocstrings:
126125
watch:
@@ -136,4 +135,7 @@ nav:
136135
- Documentation:
137136
- Automatic Doc Generator: auto_generator.md
138137
- Tools: toolbox.md
139-
- API: api.md
138+
- API: api.md
139+
- About:
140+
- Contribution: contributing.md
141+
- LICENSE: license.md

docs/tmp/example.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ pages = {
3535
],
3636
},
3737
}
38-
markdown_files = {"HOME": {"index.md": ["../README.md"]}}
38+
markdown_files = {
39+
"HOME": {"index.md": ["../README.md"]},
40+
"CONTRIBUTING": {"contributing.md": ["../CONTRIBUTING.md"]},
41+
"LICENSE": {"license.md": ["../LICENSE"]},
42+
}
3943
root = Path(__file__).resolve().parents[1]
4044
MkDocGenerator(
4145
root / "docs" / "src",
@@ -47,4 +51,6 @@ MkDocGenerator(
4751
).generate
4852
```
4953

50-
And will generate the [docs](https://ai2business.github.io/mkdocstrings-sourcelink/)
54+
And will generate the [docs](https://ai2business.github.io/mkdocstrings-sourcelink/)
55+
56+
> Note the docs will not be modified via `edit`, they will be modified in the docstrings of the source code.

mkdocstrings_sourcelink/auto_generator.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ def generate(self) -> None:
241241
},
242242
}
243243
# Define the dictionary for the importing existing markdown files.
244-
>>> markdown_files = {"HOME": {"index.md": ["../README.md"]}}
244+
>>> markdown_files = {
245+
"HOME": {"index.md": ["../README.md"]},
246+
"CONTRIBUTING": {"contributing.md": ["../CONTRIBUTING.md"]},
247+
"LICENSE": {"license.md": ["../LICENSE"]},
248+
}
245249
>>> root = Path(__file__).resolve().parents[1]
246250
# Make use of the generate poperty of MkDocGenerator
247251
>>> MkDocGenerator(

0 commit comments

Comments
 (0)