Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: adds versiond docs; update copyright year #329

Merged
merged 1 commit into from
Mar 19, 2024
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
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ instance/
.scrapy

# Sphinx documentation
docs/reference/
# docs/references/
docs/_build/
docs/*.rst
docs/*.1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013 - 2023 Konsta Vesterinen
Copyright (c) 2013 - 2024 Konsta Vesterinen

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ True

## Resources

- [Documentation](https://python-validators.github.io/validators/)
<!-- Temporary documentation URL : https://yozachar.github.io/pyvalidators/ -->
<!-- Original documentation URL : https://python-validators.github.io/validators/ -->

- [Documentation](https://yozachar.github.io/pyvalidators/)
- [Bugtracker](https://github.com/python-validators/validators/issues)
- [Security](https://github.com/python-validators/validators/blob/master/SECURITY.md)
- [Code](https://github.com/python-validators/validators/)

[//]: #(Links)
<!-- Original docs URL will be restored, once properly versioned docs is ready. -->

<!-- Links -->
[sast-badge]: https://github.com/python-validators/validators/actions/workflows/sast.yaml/badge.svg
[sast-link]: https://github.com/python-validators/validators/actions/workflows/sast.yaml
[pycqa-badge]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ True

## Resources

- [Documentation](https://python-validators.github.io/validators/)
- [Documentation](https://yozachar.github.io/pyvalidators/)
- [Bugtracker](https://github.com/python-validators/validators/issues)
- [Security](https://github.com/python-validators/validators/blob/master/SECURITY.md)
- [Code](https://github.com/python-validators/validators/)
Expand Down
3 changes: 3 additions & 0 deletions docs/references/between.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# between

::: validators.between.between
3 changes: 3 additions & 0 deletions docs/references/btc_address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# btc_address

::: validators.btc_address.btc_address
10 changes: 10 additions & 0 deletions docs/references/card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# card

::: validators.card.amex
::: validators.card.card_number
::: validators.card.diners
::: validators.card.discover
::: validators.card.jcb
::: validators.card.mastercard
::: validators.card.unionpay
::: validators.card.visa
3 changes: 3 additions & 0 deletions docs/references/country_code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# country_code

::: validators.country_code.country_code
3 changes: 3 additions & 0 deletions docs/references/domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# domain

::: validators.domain.domain
3 changes: 3 additions & 0 deletions docs/references/email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# email

::: validators.email.email
7 changes: 7 additions & 0 deletions docs/references/hashes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# hashes

::: validators.hashes.md5
::: validators.hashes.sha1
::: validators.hashes.sha224
::: validators.hashes.sha256
::: validators.hashes.sha512
3 changes: 3 additions & 0 deletions docs/references/hostname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# hostname

::: validators.hostname.hostname
10 changes: 10 additions & 0 deletions docs/references/i18n.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# i18n

::: validators.i18n.es_cif
::: validators.i18n.es_doi
::: validators.i18n.es_nie
::: validators.i18n.es_nif
::: validators.i18n.fi_business_id
::: validators.i18n.fi_ssn
::: validators.i18n.fr_department
::: validators.i18n.fr_ssn
3 changes: 3 additions & 0 deletions docs/references/iban.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# iban

::: validators.iban.iban
4 changes: 4 additions & 0 deletions docs/references/ip_address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ip_address

::: validators.ip_address.ipv4
::: validators.ip_address.ipv6
3 changes: 3 additions & 0 deletions docs/references/length.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# length

::: validators.length.length
3 changes: 3 additions & 0 deletions docs/references/mac_address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# mac_address

::: validators.mac_address.mac_address
3 changes: 3 additions & 0 deletions docs/references/slug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# slug

::: validators.slug.slug
3 changes: 3 additions & 0 deletions docs/references/url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# url

::: validators.url.url
4 changes: 4 additions & 0 deletions docs/references/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# utils

::: validators.utils.ValidationError
::: validators.utils.validator
3 changes: 3 additions & 0 deletions docs/references/uuid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# uuid

::: validators.uuid.uuid
26 changes: 24 additions & 2 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: "validators"
site_description: "Automatic documentation from sources, for MkDocs."
site_url: "https://python-validators.github.io/validators/"
site_url: "https://yozachar.github.io/pyvalidators/"
repo_url: "https://github.com/python-validators/validators"
edit_uri: "edit/master/docs/"
repo_name: "validators/validators"
Expand Down Expand Up @@ -48,15 +48,37 @@ plugins:
import:
- https://docs.python-requests.org/en/master/objects.inv
- git-revision-date-localized
- mike

extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/python-validators
- icon: fontawesome/brands/python
link: https://pypi.org/project/validators
version:
provider: mike
default: dev

copyright: Copyright &copy; 2013 - 2023 Konsta Vesterinen
copyright: Copyright &copy; 2013 - 2024 Konsta Vesterinen

nav:
- Home: index.md
- API:
- references/between.md
- references/btc_address.md
- references/card.md
- references/country_code.md
- references/domain.md
- references/email.md
- references/hashes.md
- references/hostname.md
- references/i18n.md
- references/iban.md
- references/ip_address.md
- references/length.md
- references/mac_address.md
- references/slug.md
- references/url.md
- references/utils.md
- references/uuid.md
Empty file modified package/roll.sh
100644 → 100755
Empty file.
39 changes: 38 additions & 1 deletion pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ docs-online = [
"mkdocs-material>=9.5.6",
"mkdocstrings[python]>=0.24.0",
"pyaml>=23.12.0",
"mike>=2.0.0",
]
hooks = ["pre-commit>=3.5.0"]
package = ["build>=1.0.3", "twine>=4.0.2"]
Expand Down
8 changes: 4 additions & 4 deletions src/export/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _generate_reference(source: Path, destination: Path, ext: str):
for alias in aliases:
_write_ref_content(destination / f"{module_name}.{ext}", module_name, alias.name)
if ext == "md":
nav_items["Code Reference"].append(f"reference/{module_name}.md")
nav_items["Code Reference"].append(f"references/{module_name}.md")
return nav_items


Expand Down Expand Up @@ -91,7 +91,7 @@ def _gen_rst_docs(source: Path, refs_path: Path, only_web: bool = False, only_ma
+ "\n :maxdepth: 2"
+ "\n :caption: Reference:"
+ "\n :glob:\n"
+ "\n reference/*\n"
+ "\n references/*\n"
)
# generate RST reference documentation
_generate_reference(source / "src/validators/__init__.py", refs_path, "rst")
Expand Down Expand Up @@ -128,7 +128,7 @@ def generate_documentation(
# copy readme as docs index file
copy(source / "README.md", source / "docs/index.md")
# clean destination
refs_path = source / "docs/reference"
refs_path = source / "docs/references"
if refs_path.is_dir():
rmtree(refs_path)
refs_path.mkdir(exist_ok=True)
Expand Down Expand Up @@ -174,7 +174,7 @@ def package(source: Path):
only_md=True,
only_rst_web=False,
only_rst_man=False,
discard_refs=True,
discard_refs=False,
)
quit(exit_code)

Expand Down
Loading