Skip to content
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
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ sphinx-lint
google-auth-oauthlib
google-api-python-client
pytz
tools/yaml2x/get_yaml_data
tools/yaml2x/libs/freee_a11y_gl
tools/yaml2x/libs/get_yaml_data
15 changes: 15 additions & 0 deletions tools/yaml2x/libs/freee_a11y_gl/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "freee_a11y_gl"
version = "0.1.0"
description = "A module to process a11y guidelines data"
authors = [
{name = "Masafumi NAKANE", email = "[email protected]"}
]
requires-python = ">=3.8"

[tool.setuptools]
packages = { find = {} }
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
import json
from pathlib import Path
from typing import Dict, Any, Optional
sys.path.append(str(Path(__file__).resolve().parent.parent.parent))

from a11y_guidelines import setup_instances, InfoRef, Check
from freee_a11y_gl import setup_instances, InfoRef, Check
from .config import setup_configuration
from . import utils
from . import rst_processor
from . import utils, rst_processor

def get_yaml_data(basedir: Path, base_url: str, publish: bool = False) -> Dict[str, Any]:
"""
Expand Down
2 changes: 1 addition & 1 deletion tools/yaml2x/yaml2rst/generators/common_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Dict, Any, Iterator, TypeVar, Generic, List
from abc import abstractmethod

from a11y_guidelines import Faq, FaqTag, WcagSc, RelationshipManager
from freee_a11y_gl import Faq, FaqTag, WcagSc, RelationshipManager
from .base_generator import BaseGenerator

T = TypeVar('T')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Generator for category pages."""
from typing import Dict, Any, Iterator, List

from a11y_guidelines import RelationshipManager, Category
from freee_a11y_gl import RelationshipManager, Category
from ..common_generators import ListBasedGenerator

class CategoryGenerator(ListBasedGenerator[str]):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Generators for check-related content."""
from typing import Dict, Any, Iterator, List

from a11y_guidelines import Check, CheckTool
from freee_a11y_gl import Check, CheckTool
from ..common_generators import SingleFileGenerator, ListBasedGenerator
from ..base_generator import BaseGenerator

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Generators for FAQ-related content."""
from typing import Dict, Any, List, Iterator

from a11y_guidelines import Faq, FaqTag, RelationshipManager
from freee_a11y_gl import Faq, FaqTag, RelationshipManager
from ..common_generators import SingleFileGenerator, ListBasedGenerator
from ..base_generator import BaseGenerator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
from dataclasses import dataclass

from a11y_guidelines import (
from freee_a11y_gl import (
Category, CheckTool, Faq, FaqTag, InfoRef,
Guideline, Check, RelationshipManager
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Generators for miscellaneous definitions and reference content."""
from typing import Dict, Any, List

from a11y_guidelines import InfoRef, AxeRule, RelationshipManager
from freee_a11y_gl import InfoRef, AxeRule, RelationshipManager
from ..common_generators import SingleFileGenerator, ListBasedGenerator

class InfoToGuidelinesGenerator(ListBasedGenerator[InfoRef]):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Generators for WCAG content."""
from typing import Dict, Any, List

from a11y_guidelines import WcagSc, InfoRef, RelationshipManager, AxeRule
from freee_a11y_gl import WcagSc, InfoRef, RelationshipManager, AxeRule
from ..base_generator import BaseGenerator
from ..common_generators import SingleFileGenerator

Expand Down
2 changes: 1 addition & 1 deletion tools/yaml2x/yaml2rst/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import argparse
import config
from path import get_dest_dirnames, get_static_dest_files, TEMPLATE_DIR, TEMPLATE_FILENAMES
from a11y_guidelines import get_src_path
from freee_a11y_gl import get_src_path
from template_manager import TemplateManager

def setup_parameters():
Expand Down
4 changes: 1 addition & 3 deletions tools/yaml2x/yaml2rst/yaml2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import os
from pathlib import Path

sys.path.append(str(Path(__file__).resolve().parent.parent))

import initializer
from generators.file_generator import FileGenerator, GeneratorConfig
from generators.content_generators import (
Expand All @@ -19,7 +17,7 @@
MakefileGenerator,
MakefileConfig
)
from a11y_guidelines import setup_instances
from freee_a11y_gl import setup_instances

def main():
"""Main entry point for the YAML to RST converter."""
Expand Down