diff --git a/.gitignore b/.gitignore index bb324eae..fabcfd8d 100644 --- a/.gitignore +++ b/.gitignore @@ -125,7 +125,6 @@ venv.bak/ # mkdocs documentation /site -/circuit-maintenance-parser/static/ # mypy .mypy_cache/ diff --git a/README.md b/README.md index ee5dcae2..f6e54c06 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- +

@@ -11,13 +11,13 @@ ## Documentation -Full documentation for this library can be found over on the [Circuit-Maintenance-Parser Docs](https://circuit-maintenance-parser.readthedocs.io/) website: +Full documentation for this library can be found over on the [Circuit-Maintenance-Parser Docs](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/) website: -- [User Guide](https://circuit-maintenance-parser.readthedocs.io/en/latest/user/lib_overview/) - Overview, Using the Library, Getting Started. -- [Administrator Guide](https://circuit-maintenance-parser.readthedocs.io/en/latest/admin/install/) - How to Install, Configure, Upgrade, or Uninstall the Library. -- [Developer Guide](https://circuit-maintenance-parser.readthedocs.io/en/latest/dev/contributing/) - Extending the Library, Code Reference, Contribution Guide. -- [Release Notes / Changelog](https://circuit-maintenance-parser.readthedocs.io/en/latest/admin/release_notes/). -- [Frequently Asked Questions](https://circuit-maintenance-parser.readthedocs.io/en/latest/user/faq/). +- [User Guide](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/user/lib_overview/) - Overview, Using the Library, Getting Started. +- [Administrator Guide](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/admin/install/) - How to Install, Configure, Upgrade, or Uninstall the Library. +- [Developer Guide](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/dev/contributing/) - Extending the Library, Code Reference, Contribution Guide. +- [Release Notes / Changelog](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/admin/release_notes/). +- [Frequently Asked Questions](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/user/faq/). ## Context @@ -307,11 +307,11 @@ The project is following Network to Code software development guidelines and is - Pylint for additional static analysis. - Unit and integration tests to ensure the library is working properly. -For more details, see the [Contributing Guide](https://circuit-maintenance-parser.readthedocs.io/en/latest/dev/contributing/) and [Development Environment Guide](https://circuit-maintenance-parser.readthedocs.io/en/latest/dev/dev_environment/). +For more details, see the [Contributing Guide](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/dev/contributing/) and [Development Environment Guide](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/dev/dev_environment/). ## Questions -For any questions or comments, please check the [FAQ](https://circuit-maintenance-parser.readthedocs.io/en/latest/user/faq/) first. Feel free to also swing by the [Network to Code Slack](https://networktocode.slack.com/) (channel `#networktocode`), sign up [here](http://slack.networktocode.com/) if you don't have an account. +For any questions or comments, please check the [FAQ](https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/user/faq/) first. Feel free to also swing by the [Network to Code Slack](https://networktocode.slack.com/) (channel `#networktocode`), sign up [here](http://slack.networktocode.com/) if you don't have an account. ## License notes diff --git a/changes/425.fixed b/changes/425.fixed new file mode 100644 index 00000000..32f69922 --- /dev/null +++ b/changes/425.fixed @@ -0,0 +1 @@ +Fixed the documentation site: links now point to docs.networktocode.com instead of the retired Read the Docs Community project, and the theme logo and page edit links resolve correctly. diff --git a/circuit_maintenance_parser/parsers/apple.py b/circuit_maintenance_parser/parsers/apple.py index e6081f37..6615f859 100644 --- a/circuit_maintenance_parser/parsers/apple.py +++ b/circuit_maintenance_parser/parsers/apple.py @@ -25,11 +25,7 @@ def parse_subject(self, subject: str) -> List[Dict]: class TextParserApple(Text): - """Parse the plaintext content of an Apple notification. - - Args: - Text (str): Plaintext message - """ + """Parse the plaintext content of an Apple notification.""" def parse_text(self, text: str) -> List[Dict]: """Extract attributes from an Apple notification email. diff --git a/circuit_maintenance_parser/parsers/equinix.py b/circuit_maintenance_parser/parsers/equinix.py index 6c1f7a8e..2677dd0a 100644 --- a/circuit_maintenance_parser/parsers/equinix.py +++ b/circuit_maintenance_parser/parsers/equinix.py @@ -146,10 +146,10 @@ def parse_subject(self, subject: str) -> List[Dict]: """Parse the Equinix Email subject for summary and status. Args: - subject (str): subject of email - e.g. 'COMPLETED - Remedial Emergency Maintenance - SG Metro Area Network Maintenance - 04-APR-2026 [CHG0124084]'. - alternative format: 'Service Impacting - Remedial - Dark Fiber Activity - SG Metro Area - Network Maintenance - 03-MAY-2026 - CHG0125903' - older format: 'Scheduled software upgrade in metro connect platform-SG Metro Area Network Maintenance -19-OCT-2021 [5-212760022356]' + subject (str): subject of email, in one of the following formats: + e.g. 'COMPLETED - Remedial Emergency Maintenance - SG Metro Area Network Maintenance - 04-APR-2026 [CHG0124084]'. + alternative format: 'Service Impacting - Remedial - Dark Fiber Activity - SG Metro Area - Network Maintenance - 03-MAY-2026 - CHG0125903' + older format: 'Scheduled software upgrade in metro connect platform-SG Metro Area Network Maintenance -19-OCT-2021 [5-212760022356]' Returns: diff --git a/circuit_maintenance_parser/parsers/flag.py b/circuit_maintenance_parser/parsers/flag.py index 0a8bf306..16dce53e 100644 --- a/circuit_maintenance_parser/parsers/flag.py +++ b/circuit_maintenance_parser/parsers/flag.py @@ -80,8 +80,8 @@ def parse_subject(self, subject: str) -> List[Dict]: """Parse the FLAG Email subject for maintenance ID and status. Args: - subject (str): subject of email - e.g. 'FLAG | PE2025102750538 | Planned Event | Rescheduled'. + subject (str): subject of email, + e.g. 'FLAG | PE2025102750538 | Planned Event | Rescheduled'. Returns: diff --git a/circuit_maintenance_parser/parsers/globalcloudxchange.py b/circuit_maintenance_parser/parsers/globalcloudxchange.py index c768f225..7feda4a8 100644 --- a/circuit_maintenance_parser/parsers/globalcloudxchange.py +++ b/circuit_maintenance_parser/parsers/globalcloudxchange.py @@ -51,8 +51,8 @@ def parse_subject(self, subject: str) -> List[Dict]: """Parse the Global Cloud Xchange Email subject for summary and status. Args: - subject (str): subject of email - e.g. 'PE2024020844407 | Emergency | Service Advisory Notice | Span Loss Rectification | 12-Feb-2024 09:00 (GMT) - 12-Feb-2024 17:00 (GMT)'. + subject (str): subject of email, + e.g. 'PE2024020844407 | Emergency | Service Advisory Notice | Span Loss Rectification | 12-Feb-2024 09:00 (GMT) - 12-Feb-2024 17:00 (GMT)'. Returns: diff --git a/circuit_maintenance_parser/utils.py b/circuit_maintenance_parser/utils.py index 9bb505cb..fc260ba2 100644 --- a/circuit_maintenance_parser/utils.py +++ b/circuit_maintenance_parser/utils.py @@ -132,7 +132,7 @@ def city_timezone(self, city: str) -> str: raise ParserError("Timezone resolution not properly initalized.") -def convert_timezone(time_str): +def convert_timezone(time_str) -> datetime.datetime: """ Converts a string representing a date/time in the format 'MM/DD/YY HH:MM Timezone' to a datetime object in UTC. diff --git a/docs/admin/release_notes/version_2.10.md b/docs/admin/release_notes/version_2.10.md index e0b2ea78..ca413cb9 100644 --- a/docs/admin/release_notes/version_2.10.md +++ b/docs/admin/release_notes/version_2.10.md @@ -12,7 +12,7 @@ This document describes all new features and changes in the `2.10` release serie - [#360](https://github.com/networktocode/circuit-maintenance-parser/issues/360) - Updated lxml to include version 6 - [#361](https://github.com/networktocode/circuit-maintenance-parser/issues/361) - Updated timezonefinder to v8.2.0 -- [#345](https://github.com/networktocode/circuit_maintenance_parser/issues/345) - Updated minimum Python version to 3.10 and upgraded dependencies including pytest (9.0), pylint (4.0), towncrier (25.8), backoff (2.2), and type stubs +- [#345](https://github.com/networktocode/circuit-maintenance-parser/issues/345) - Updated minimum Python version to 3.10 and upgraded dependencies including pytest (9.0), pylint (4.0), towncrier (25.8), backoff (2.2), and type stubs ### Housekeeping diff --git a/docs/images/networktocode_logo.svg b/docs/assets/networktocode_logo.svg similarity index 100% rename from docs/images/networktocode_logo.svg rename to docs/assets/networktocode_logo.svg diff --git a/mkdocs.yml b/mkdocs.yml index 798788f3..e00ca3d3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,9 +1,8 @@ --- dev_addr: "127.0.0.1:8001" -edit_uri: "edit/main/circuit-maintenance-parser/docs" -site_dir: "circuit-maintenance-parser/static/circuit-maintenance-parser/docs" +edit_uri: "edit/develop/docs" site_name: "Circuit-Maintenance-Parser Documentation" -site_url: "https://circuit-maintenance-parser.readthedocs.io/en/latest/" +site_url: "https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/" repo_url: "https://github.com/networktocode/circuit-maintenance-parser" copyright: "Copyright © The Authors" theme: diff --git a/pyproject.toml b/pyproject.toml index 032824ae..c9a4d801 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,9 @@ version = "2.12.1b1" description = "Python library to parse Circuit Maintenance notifications and return a structured data back" authors = ["Network to Code, LLC "] license = "Apache-2.0" -homepage = "https://circuit-maintenance-parser.readthedocs.io/" +homepage = "https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/" repository = "https://github.com/networktocode/circuit-maintenance-parser" -documentation = "https://circuit-maintenance-parser.readthedocs.io/" +documentation = "https://docs.networktocode.com/projects/circuit-maintenance-parser/en/latest/" readme = "README.md" keywords = ["parser", "circuit", "maintenance"] classifiers = [