mkdocs-branchcustomization-plugin 0.1.3__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. mkdocs_branchcustomization_plugin-1.0.0/LICENSE +21 -0
  2. mkdocs_branchcustomization_plugin-1.0.0/PKG-INFO +54 -0
  3. mkdocs_branchcustomization_plugin-1.0.0/mkdocs_branchcustomization_plugin/__init__.py +3 -0
  4. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/mkdocs_branchcustomization_plugin/_version.py +4 -4
  5. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/mkdocs_branchcustomization_plugin/plugin.py +4 -3
  6. mkdocs_branchcustomization_plugin-1.0.0/mkdocs_branchcustomization_plugin.egg-info/PKG-INFO +54 -0
  7. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/mkdocs_branchcustomization_plugin.egg-info/SOURCES.txt +2 -3
  8. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/mkdocs_branchcustomization_plugin.egg-info/entry_points.txt +0 -1
  9. mkdocs_branchcustomization_plugin-1.0.0/pyproject.toml +40 -0
  10. mkdocs_branchcustomization_plugin-1.0.0/setup.cfg +4 -0
  11. mkdocs_branchcustomization_plugin-1.0.0/setup.py +9 -0
  12. mkdocs-branchcustomization-plugin-0.1.3/MANIFEST.in +0 -2
  13. mkdocs-branchcustomization-plugin-0.1.3/PKG-INFO +0 -57
  14. mkdocs-branchcustomization-plugin-0.1.3/mkdocs_branchcustomization_plugin/__init__.py +0 -4
  15. mkdocs-branchcustomization-plugin-0.1.3/mkdocs_branchcustomization_plugin.egg-info/PKG-INFO +0 -57
  16. mkdocs-branchcustomization-plugin-0.1.3/setup.cfg +0 -46
  17. mkdocs-branchcustomization-plugin-0.1.3/setup.py +0 -19
  18. mkdocs-branchcustomization-plugin-0.1.3/versioneer.py +0 -1822
  19. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/README.md +0 -0
  20. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/mkdocs_branchcustomization_plugin.egg-info/dependency_links.txt +0 -0
  21. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/mkdocs_branchcustomization_plugin.egg-info/requires.txt +0 -0
  22. {mkdocs-branchcustomization-plugin-0.1.3 → mkdocs_branchcustomization_plugin-1.0.0}/mkdocs_branchcustomization_plugin.egg-info/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Christopher J Markiewicz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.4
2
+ Name: mkdocs-branchcustomization-plugin
3
+ Version: 1.0.0
4
+ Summary: Update mkdocs configuration based on the git branch
5
+ Author-email: "Christopher J. Markiewicz" <markiewicz@stanford.edu>
6
+ Maintainer-email: "Christopher J. Markiewicz" <markiewicz@stanford.edu>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/effigies/mkdocs-branchcustomization-plugin
9
+ Platform: OS Independent
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Provides: mkdocs_branchcustomization_plugin
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: mkdocs
18
+ Requires-Dist: gitpython
19
+ Dynamic: license-file
20
+
21
+ # MkDocs Branch Customization Plugin
22
+
23
+ This plugin allows configuration options to be overridden on a per-branch basis.
24
+ Branches are matched with regular expressions.
25
+
26
+ An example for adding CSS to the `master` branch might be:
27
+
28
+ ```YAML
29
+ plugins:
30
+ - branchcustomization:
31
+ update_config:
32
+ - branch: /master/
33
+ extra_css:
34
+ - css/master_branch.css
35
+ ```
36
+
37
+ Note that this will *override* the global `extra_css` value.
38
+
39
+ To customize every branch *except* `master`:
40
+
41
+ ```YAML
42
+ plugins:
43
+ - branchcustomization:
44
+ update_config:
45
+ - branch: /(?!^master$)/
46
+ +extra_css:
47
+ - css/draft.css
48
+ extra_js:
49
+ - js/draft.js
50
+ ```
51
+
52
+ In this case the `+extra_css` indicates that this list should be *appended* to
53
+ the global `extra_css` value, rather than overriding it, while `extra_js` overrides
54
+ the global value.
@@ -0,0 +1,3 @@
1
+
2
+ from . import _version
3
+ __version__ = _version.get_versions()['version']
@@ -1,5 +1,5 @@
1
1
 
2
- # This file was generated by 'versioneer.py' (0.18) from
2
+ # This file was generated by 'versioneer.py' (0.29) from
3
3
  # revision-control system data, or from the parent directory name of an
4
4
  # unpacked source archive. Distribution tarballs contain a pre-generated copy
5
5
  # of this file.
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2019-12-13T13:14:06-0500",
11
+ "date": "2026-09-30T11:44:19-0400",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "52f18e2c98daf1258e0999ef291c649f33dfa921",
15
- "version": "0.1.3"
14
+ "full-revisionid": "52867a3400aaf4dcd7fca44b5f5112b012e032a6",
15
+ "version": "1.0.0"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -10,9 +10,10 @@ def get_best_branch_name(repo):
10
10
  # We're on a branch, just go with it
11
11
  if not head.is_detached:
12
12
  return repo.active_branch.name
13
- # This commit is the current master
14
- if repo.heads.master.commit == head.commit:
15
- return 'master'
13
+ # This commit is the current main/master
14
+ for main in ('main', 'master'):
15
+ if main in repo.heads and repo.heads[main].commit == head.commit:
16
+ return main
16
17
  # Check local branches in lexical order
17
18
  for ref in repo.heads:
18
19
  if ref.commit == head.commit:
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.4
2
+ Name: mkdocs-branchcustomization-plugin
3
+ Version: 1.0.0
4
+ Summary: Update mkdocs configuration based on the git branch
5
+ Author-email: "Christopher J. Markiewicz" <markiewicz@stanford.edu>
6
+ Maintainer-email: "Christopher J. Markiewicz" <markiewicz@stanford.edu>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/effigies/mkdocs-branchcustomization-plugin
9
+ Platform: OS Independent
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Provides: mkdocs_branchcustomization_plugin
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: mkdocs
18
+ Requires-Dist: gitpython
19
+ Dynamic: license-file
20
+
21
+ # MkDocs Branch Customization Plugin
22
+
23
+ This plugin allows configuration options to be overridden on a per-branch basis.
24
+ Branches are matched with regular expressions.
25
+
26
+ An example for adding CSS to the `master` branch might be:
27
+
28
+ ```YAML
29
+ plugins:
30
+ - branchcustomization:
31
+ update_config:
32
+ - branch: /master/
33
+ extra_css:
34
+ - css/master_branch.css
35
+ ```
36
+
37
+ Note that this will *override* the global `extra_css` value.
38
+
39
+ To customize every branch *except* `master`:
40
+
41
+ ```YAML
42
+ plugins:
43
+ - branchcustomization:
44
+ update_config:
45
+ - branch: /(?!^master$)/
46
+ +extra_css:
47
+ - css/draft.css
48
+ extra_js:
49
+ - js/draft.js
50
+ ```
51
+
52
+ In this case the `+extra_css` indicates that this list should be *appended* to
53
+ the global `extra_css` value, rather than overriding it, while `extra_js` overrides
54
+ the global value.
@@ -1,8 +1,7 @@
1
- MANIFEST.in
1
+ LICENSE
2
2
  README.md
3
- setup.cfg
3
+ pyproject.toml
4
4
  setup.py
5
- versioneer.py
6
5
  mkdocs_branchcustomization_plugin/__init__.py
7
6
  mkdocs_branchcustomization_plugin/_version.py
8
7
  mkdocs_branchcustomization_plugin/plugin.py
@@ -1,3 +1,2 @@
1
1
  [mkdocs.plugins]
2
2
  branchcustomization = mkdocs_branchcustomization_plugin.plugin:BranchPlugin
3
-
@@ -0,0 +1,40 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.2", "versioneer"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "mkdocs-branchcustomization-plugin"
7
+ authors = [{name = "Christopher J. Markiewicz", email = "markiewicz@stanford.edu"}]
8
+ maintainers = [{name = "Christopher J. Markiewicz", email = "markiewicz@stanford.edu"}]
9
+ readme = "README.md"
10
+ classifiers = [
11
+ "Development Status :: 5 - Production/Stable",
12
+ "Operating System :: OS Independent",
13
+ "Programming Language :: Python :: 3",
14
+ ]
15
+ license = "MIT"
16
+ description = "Update mkdocs configuration based on the git branch"
17
+ requires-python = ">=3.10"
18
+ dependencies = [
19
+ "mkdocs",
20
+ "gitpython",
21
+ ]
22
+ dynamic = ["version"]
23
+
24
+ [project.urls]
25
+ Homepage = "https://github.com/effigies/mkdocs-branchcustomization-plugin"
26
+
27
+ [project.entry-points."mkdocs.plugins"]
28
+ branchcustomization = "mkdocs_branchcustomization_plugin.plugin:BranchPlugin"
29
+
30
+ [tool.setuptools]
31
+ platforms = ["OS Independent"]
32
+ provides = ["mkdocs_branchcustomization_plugin"]
33
+
34
+ [tool.versioneer]
35
+ VCS = "git"
36
+ style = "pep440"
37
+ versionfile_source = "mkdocs_branchcustomization_plugin/_version.py"
38
+ versionfile_build = "mkdocs_branchcustomization_plugin/_version.py"
39
+ tag_prefix = ""
40
+ parentdir_prefix = ""
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env python
2
+ from setuptools import setup
3
+ import versioneer
4
+
5
+ if __name__ == "__main__":
6
+ setup(
7
+ version=versioneer.get_version(),
8
+ cmdclass=versioneer.get_cmdclass(),
9
+ )
@@ -1,2 +0,0 @@
1
- include versioneer.py
2
- include mkdocs_branchcustomization_plugin/_version.py
@@ -1,57 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: mkdocs-branchcustomization-plugin
3
- Version: 0.1.3
4
- Summary: Update mkdocs configuration based on the git branch
5
- Home-page: https://github.com/effigies/mkdocs-branchcustomization-plugin
6
- Author: Christopher J. Markiewicz
7
- Author-email: markiewicz@stanford.edu
8
- Maintainer: Christopher J. Markiewicz
9
- Maintainer-email: markiewicz@stanford.edu
10
- License: MIT License
11
- Description: # MkDocs Branch Customization Plugin
12
-
13
- This plugin allows configuration options to be overridden on a per-branch basis.
14
- Branches are matched with regular expressions.
15
-
16
- An example for adding CSS to the `master` branch might be:
17
-
18
- ```YAML
19
- plugins:
20
- - branchcustomization:
21
- update_config:
22
- - branch: /master/
23
- extra_css:
24
- - css/master_branch.css
25
- ```
26
-
27
- Note that this will *override* the global `extra_css` value.
28
-
29
- To customize every branch *except* `master`:
30
-
31
- ```YAML
32
- plugins:
33
- - branchcustomization:
34
- update_config:
35
- - branch: /(?!^master$)/
36
- +extra_css:
37
- - css/draft.css
38
- extra_js:
39
- - js/draft.js
40
- ```
41
-
42
- In this case the `+extra_css` indicates that this list should be *appended* to
43
- the global `extra_css` value, rather than overriding it, while `extra_js` overrides
44
- the global value.
45
-
46
- Platform: OS Independent
47
- Classifier: Development Status :: 3 - Alpha
48
- Classifier: License :: OSI Approved :: MIT License
49
- Classifier: Operating System :: OS Independent
50
- Classifier: Programming Language :: Python
51
- Classifier: Programming Language :: Python :: 3.5
52
- Classifier: Programming Language :: Python :: 3.6
53
- Classifier: Programming Language :: Python :: 3.7
54
- Classifier: Programming Language :: Python :: 3.8
55
- Provides: mkdocs_branchcustomization_plugin
56
- Requires-Python: >=3.6
57
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
@@ -1,4 +0,0 @@
1
-
2
- from ._version import get_versions
3
- __version__ = get_versions()['version']
4
- del get_versions
@@ -1,57 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: mkdocs-branchcustomization-plugin
3
- Version: 0.1.3
4
- Summary: Update mkdocs configuration based on the git branch
5
- Home-page: https://github.com/effigies/mkdocs-branchcustomization-plugin
6
- Author: Christopher J. Markiewicz
7
- Author-email: markiewicz@stanford.edu
8
- Maintainer: Christopher J. Markiewicz
9
- Maintainer-email: markiewicz@stanford.edu
10
- License: MIT License
11
- Description: # MkDocs Branch Customization Plugin
12
-
13
- This plugin allows configuration options to be overridden on a per-branch basis.
14
- Branches are matched with regular expressions.
15
-
16
- An example for adding CSS to the `master` branch might be:
17
-
18
- ```YAML
19
- plugins:
20
- - branchcustomization:
21
- update_config:
22
- - branch: /master/
23
- extra_css:
24
- - css/master_branch.css
25
- ```
26
-
27
- Note that this will *override* the global `extra_css` value.
28
-
29
- To customize every branch *except* `master`:
30
-
31
- ```YAML
32
- plugins:
33
- - branchcustomization:
34
- update_config:
35
- - branch: /(?!^master$)/
36
- +extra_css:
37
- - css/draft.css
38
- extra_js:
39
- - js/draft.js
40
- ```
41
-
42
- In this case the `+extra_css` indicates that this list should be *appended* to
43
- the global `extra_css` value, rather than overriding it, while `extra_js` overrides
44
- the global value.
45
-
46
- Platform: OS Independent
47
- Classifier: Development Status :: 3 - Alpha
48
- Classifier: License :: OSI Approved :: MIT License
49
- Classifier: Operating System :: OS Independent
50
- Classifier: Programming Language :: Python
51
- Classifier: Programming Language :: Python :: 3.5
52
- Classifier: Programming Language :: Python :: 3.6
53
- Classifier: Programming Language :: Python :: 3.7
54
- Classifier: Programming Language :: Python :: 3.8
55
- Provides: mkdocs_branchcustomization_plugin
56
- Requires-Python: >=3.6
57
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
@@ -1,46 +0,0 @@
1
- [metadata]
2
- url = https://github.com/effigies/mkdocs-branchcustomization-plugin
3
- author = Christopher J. Markiewicz
4
- author_email = markiewicz@stanford.edu
5
- maintainer = Christopher J. Markiewicz
6
- maintainer_email = markiewicz@stanford.edu
7
- classifiers =
8
- Development Status :: 3 - Alpha
9
- License :: OSI Approved :: MIT License
10
- Operating System :: OS Independent
11
- Programming Language :: Python
12
- Programming Language :: Python :: 3.5
13
- Programming Language :: Python :: 3.6
14
- Programming Language :: Python :: 3.7
15
- Programming Language :: Python :: 3.8
16
- license = MIT License
17
- description = Update mkdocs configuration based on the git branch
18
- long_description = file:README.md
19
- long_description_content_type = text/markdown; charset=UTF-8; variant=GFM
20
- platforms = OS Independent
21
- provides =
22
- mkdocs_branchcustomization_plugin
23
-
24
- [options]
25
- python_requires = >=3.6
26
- install_requires =
27
- mkdocs
28
- gitpython
29
- packages = find:
30
-
31
- [options.entry_points]
32
- mkdocs.plugins =
33
- branchcustomization = mkdocs_branchcustomization_plugin.plugin:BranchPlugin
34
-
35
- [versioneer]
36
- vcs = git
37
- style = pep440
38
- versionfile_source = mkdocs_branchcustomization_plugin/_version.py
39
- versionfile_build = mkdocs_branchcustomization_plugin/_version.py
40
- tag_prefix =
41
- parentdir_prefix =
42
-
43
- [egg_info]
44
- tag_build =
45
- tag_date = 0
46
-
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env python
2
- import sys
3
- import os
4
-
5
- from setuptools import setup
6
- import versioneer
7
-
8
- # Give setuptools a hint to complain if it's too old a version
9
- # 30.3.0 allows us to put most metadata in setup.cfg
10
- # Should match pyproject.toml
11
- SETUP_REQUIRES = ['setuptools >= 30.3.0']
12
- # This enables setuptools to install wheel on-the-fly
13
- SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else []
14
-
15
- if __name__ == "__main__":
16
- setup(name='mkdocs-branchcustomization-plugin',
17
- setup_requires=SETUP_REQUIRES,
18
- version=versioneer.get_version(),
19
- cmdclass=versioneer.get_cmdclass())