Skip to content

Commit bc20242

Browse files
authored
Merge pull request #283 from ma10/reorganize-python-modules-20250221
ライブラリー・モジュールの整理
2 parents bc3c32f + 4d84383 commit bc20242

32 files changed

+28
-16
lines changed

requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ sphinx-lint
99
google-auth-oauthlib
1010
google-api-python-client
1111
pytz
12-
tools/yaml2x/get_yaml_data
12+
tools/yaml2x/libs/freee_a11y_gl
13+
tools/yaml2x/libs/get_yaml_data
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[build-system]
2+
requires = ["setuptools>=64", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "freee_a11y_gl"
7+
version = "0.1.0"
8+
description = "A module to process a11y guidelines data"
9+
authors = [
10+
{name = "Masafumi NAKANE", email = "[email protected]"}
11+
]
12+
requires-python = ">=3.8"
13+
14+
[tool.setuptools]
15+
packages = { find = {} }

tools/yaml2x/get_yaml_data/get_yaml_data/process_yaml.py tools/yaml2x/libs/get_yaml_data/get_yaml_data/process_yaml.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
import json
1111
from pathlib import Path
1212
from typing import Dict, Any, Optional
13-
sys.path.append(str(Path(__file__).resolve().parent.parent.parent))
1413

15-
from a11y_guidelines import setup_instances, InfoRef, Check
14+
from freee_a11y_gl import setup_instances, InfoRef, Check
1615
from .config import setup_configuration
17-
from . import utils
18-
from . import rst_processor
16+
from . import utils, rst_processor
1917

2018
def get_yaml_data(basedir: Path, base_url: str, publish: bool = False) -> Dict[str, Any]:
2119
"""

tools/yaml2x/yaml2rst/generators/common_generators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Dict, Any, Iterator, TypeVar, Generic, List
33
from abc import abstractmethod
44

5-
from a11y_guidelines import Faq, FaqTag, WcagSc, RelationshipManager
5+
from freee_a11y_gl import Faq, FaqTag, WcagSc, RelationshipManager
66
from .base_generator import BaseGenerator
77

88
T = TypeVar('T')

tools/yaml2x/yaml2rst/generators/content_generators/category_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Generator for category pages."""
22
from typing import Dict, Any, Iterator, List
33

4-
from a11y_guidelines import RelationshipManager, Category
4+
from freee_a11y_gl import RelationshipManager, Category
55
from ..common_generators import ListBasedGenerator
66

77
class CategoryGenerator(ListBasedGenerator[str]):

tools/yaml2x/yaml2rst/generators/content_generators/check_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Generators for check-related content."""
22
from typing import Dict, Any, Iterator, List
33

4-
from a11y_guidelines import Check, CheckTool
4+
from freee_a11y_gl import Check, CheckTool
55
from ..common_generators import SingleFileGenerator, ListBasedGenerator
66
from ..base_generator import BaseGenerator
77

tools/yaml2x/yaml2rst/generators/content_generators/faq_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Generators for FAQ-related content."""
22
from typing import Dict, Any, List, Iterator
33

4-
from a11y_guidelines import Faq, FaqTag, RelationshipManager
4+
from freee_a11y_gl import Faq, FaqTag, RelationshipManager
55
from ..common_generators import SingleFileGenerator, ListBasedGenerator
66
from ..base_generator import BaseGenerator
77

tools/yaml2x/yaml2rst/generators/content_generators/makefile_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from dataclasses import dataclass
55

6-
from a11y_guidelines import (
6+
from freee_a11y_gl import (
77
Category, CheckTool, Faq, FaqTag, InfoRef,
88
Guideline, Check, RelationshipManager
99
)

tools/yaml2x/yaml2rst/generators/content_generators/reference_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Generators for miscellaneous definitions and reference content."""
22
from typing import Dict, Any, List
33

4-
from a11y_guidelines import InfoRef, AxeRule, RelationshipManager
4+
from freee_a11y_gl import InfoRef, AxeRule, RelationshipManager
55
from ..common_generators import SingleFileGenerator, ListBasedGenerator
66

77
class InfoToGuidelinesGenerator(ListBasedGenerator[InfoRef]):

tools/yaml2x/yaml2rst/generators/content_generators/wcag_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Generators for WCAG content."""
22
from typing import Dict, Any, List
33

4-
from a11y_guidelines import WcagSc, InfoRef, RelationshipManager, AxeRule
4+
from freee_a11y_gl import WcagSc, InfoRef, RelationshipManager, AxeRule
55
from ..base_generator import BaseGenerator
66
from ..common_generators import SingleFileGenerator
77

tools/yaml2x/yaml2rst/initializer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import argparse
33
import config
44
from path import get_dest_dirnames, get_static_dest_files, TEMPLATE_DIR, TEMPLATE_FILENAMES
5-
from a11y_guidelines import get_src_path
5+
from freee_a11y_gl import get_src_path
66
from template_manager import TemplateManager
77

88
def setup_parameters():

tools/yaml2x/yaml2rst/yaml2rst.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import os
55
from pathlib import Path
66

7-
sys.path.append(str(Path(__file__).resolve().parent.parent))
8-
97
import initializer
108
from generators.file_generator import FileGenerator, GeneratorConfig
119
from generators.content_generators import (
@@ -19,7 +17,7 @@
1917
MakefileGenerator,
2018
MakefileConfig
2119
)
22-
from a11y_guidelines import setup_instances
20+
from freee_a11y_gl import setup_instances
2321

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

0 commit comments

Comments
 (0)