Skip to content

Commit

Permalink
Prepare for 1.0.5 🧙
Browse files Browse the repository at this point in the history
* Apply formatting according to latest Black
* Prepare for release
  • Loading branch information
RobertoPrevato authored Feb 1, 2024
1 parent 6369008 commit 1bda7c7
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.vscode
venv
venv38
venv*
htmlcov
.coverage
__pycache__
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.5] 2024-02-01 :mage:

- Show event description in Gantt diagrams, by @changbowen
- Add possibility to configure months time format in Gantt diagrams, by @yasamoka

## 2023-12-24

- Adds support for running tests using Python 3.12, and adds Python 3.12 to the
Expand Down
2 changes: 1 addition & 1 deletion neoteroi/mkdocs/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.4"
__version__ = "1.0.5"
1 change: 1 addition & 0 deletions neoteroi/mkdocs/cards/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
MIT License
Copyright (c) 2022 to present, Roberto Prevato
"""

from markdown import Extension

from neoteroi.mkdocs.markdown.images import Image
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/contribs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- the Git CLI can be used during the build.
"""

import logging
from datetime import datetime
from fnmatch import fnmatch
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/contribs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
history rewrites or files renamed without keeping contributor's history.
For this reason, it should be used together with a
"""

import re
import subprocess
from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/contribs/html.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module contains methods to render the contributions stats.
"""

import xml.etree.ElementTree as etree
from dataclasses import dataclass
from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/markdown/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This package contains common utilities for markdown used across the various plugins
for Markdown.
"""

import re
from typing import Dict, Tuple

Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/markdown/align.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Objects to describe alignment of elements.
"""

import logging
from enum import Enum

Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/markdown/data/source.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module defines a base class for types that can read text from a source.
"""

from abc import ABC, abstractmethod
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/markdown/data/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This module defines a base class for types that can deserialize text into Python
objects, and implementations for common formats.
"""

import csv
import json
from abc import ABC, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/markdown/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Common utilities for the whole package.
"""

from dataclasses import fields, is_dataclass

_FIELDS = {}
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/oad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
neoteroi.mkdocs.oad
"""

import re

from mkdocs.config.config_options import Type
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/projects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
MIT License
Copyright (c) 2022 to present, Roberto Prevato
"""

from markdown import Extension

from .gantt import register_extension
Expand Down
16 changes: 10 additions & 6 deletions neoteroi/mkdocs/projects/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,11 @@ def from_obj(cls, obj, preceding_date: Optional[date] = None):
start,
end,
description=description,
activities=list(_resolve_activities(child_activities, end or start))
if child_activities
else None,
activities=(
list(_resolve_activities(child_activities, end or start))
if child_activities
else None
),
events=[Event.from_obj(item) for item in events] if events else None,
hidden=hidden,
)
Expand Down Expand Up @@ -213,8 +215,10 @@ def from_obj(cls, obj):

return cls(
title=obj.get("title") or "Plan",
activities=[Activity.from_obj(item, plan_start) for item in activities]
if activities
else [],
activities=(
[Activity.from_obj(item, plan_start) for item in activities]
if activities
else []
),
events=[Event.from_obj(item) for item in events] if events else [],
)
1 change: 1 addition & 0 deletions neoteroi/mkdocs/projects/gantt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
MIT License
Copyright (c) 2022 to present, Roberto Prevato
"""

from neoteroi.mkdocs.markdown.processors import (
EmbeddedBlockProcessor,
SourceBlockProcessor,
Expand Down
10 changes: 6 additions & 4 deletions neoteroi/mkdocs/projects/gantt/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,11 @@ def build_event(self, parent, event: Event):
{
"class": "nt-timeline-dot bigger",
"title": f"{event.title} {self._format_time(event.time)}",
"style": f"left: {self._calc_time_left(event.time) - 4}px;"
if event.time
else "",
"style": (
f"left: {self._calc_time_left(event.time) - 4}px;"
if event.time
else ""
),
},
)

Expand All @@ -425,7 +427,7 @@ def build_event(self, parent, event: Event):
des = etree.fromstring(event.description)
except etree.ParseError:
des = etree.fromstring(f"<span>{event.description}</span>")

des.set("class", f"description {des.get('class') or ''}")
dot_element.append(des)

Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/spantable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
MIT License
Copyright (c) 2022 to present, Roberto Prevato
"""

import logging
import re
import xml.etree.ElementTree as etree
Expand Down
1 change: 1 addition & 0 deletions neoteroi/mkdocs/timeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
MIT License
Copyright (c) 2022 to present, Roberto Prevato
"""

from markdown import Extension

from neoteroi.mkdocs.markdown.align import aligment_from_props
Expand Down

0 comments on commit 1bda7c7

Please sign in to comment.