diff --git a/.github/workflows/aio_integration.yml b/.github/workflows/aio_integration.yml index 75f88d5e..ddd7a834 100644 --- a/.github/workflows/aio_integration.yml +++ b/.github/workflows/aio_integration.yml @@ -61,7 +61,7 @@ jobs: python-version: ${{ matrix.version }} allow-prereleases: true cache: "pip" - - name: Install master + - name: Install main packages run: | pip install mypy_boto3_output/types_aiobotocore_package pip install mypy_boto3_output/types_aioboto3_package diff --git a/.github/workflows/aio_sanity_check.yml b/.github/workflows/aio_sanity_check.yml index 252eb40f..84a3c2f9 100644 --- a/.github/workflows/aio_sanity_check.yml +++ b/.github/workflows/aio_sanity_check.yml @@ -63,15 +63,15 @@ jobs: run: | uv pip install boto3==${BOTO3_VERSION} botocore==${BOTOCORE_VERSION} uv pip install -U aioboto3 - - name: Build master packages + - name: Build main packages run: | rm -rf mypy_boto3_output/* uv run mypy_boto3_builder mypy_boto3_output \ --product aioboto3 aiobotocore \ --no-smart-version - - name: Install master packages + - name: Install main packages run: | - bash ./scripts/install_aiobotocore.sh master + bash ./scripts/install_aiobotocore.sh main - name: Check s3 output run: | rm -rf mypy_boto3_output/* diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 43bb350d..bbbbcf6e 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -59,7 +59,7 @@ jobs: python-version: ${{ matrix.version }} allow-prereleases: true cache: "pip" - - name: Install master + - name: Install main packages run: | pip install mypy_boto3_output/boto3_stubs_package - name: Install dependencies diff --git a/.github/workflows/sanity_check.yml b/.github/workflows/sanity_check.yml index baee4931..12ec7c3c 100644 --- a/.github/workflows/sanity_check.yml +++ b/.github/workflows/sanity_check.yml @@ -62,15 +62,15 @@ jobs: BOTOCORE_VERSION: ${{ needs.versions.outputs.botocore }} run: | uv pip install -U boto3==${BOTO3_VERSION} botocore==${BOTOCORE_VERSION} - - name: Build master packages + - name: Build main packages run: | rm -rf mypy_boto3_output/* uv run mypy_boto3_builder mypy_boto3_output \ --product boto3 \ --no-smart-version - - name: Install master packages + - name: Install main packages run: | - bash ./scripts/install.sh master + bash ./scripts/install.sh main - name: Check s3 output run: | rm -rf mypy_boto3_output/* diff --git a/mypy_boto3_builder/constants.py b/mypy_boto3_builder/constants.py index 80c382ce..ee0f70bc 100644 --- a/mypy_boto3_builder/constants.py +++ b/mypy_boto3_builder/constants.py @@ -61,7 +61,7 @@ class TemplatePath: Template paths. """ - master: Final = TEMPLATES_PATH / "master" + mypy_boto3: Final = TEMPLATES_PATH / "mypy-boto3" types_boto3: Final = TEMPLATES_PATH / "types-boto3" types_boto3_docs: Final = TEMPLATES_PATH / "types-boto3-docs" diff --git a/mypy_boto3_builder/generators/aioboto3_generator.py b/mypy_boto3_builder/generators/aioboto3_generator.py index ba0e41ca..0960f2d4 100644 --- a/mypy_boto3_builder/generators/aioboto3_generator.py +++ b/mypy_boto3_builder/generators/aioboto3_generator.py @@ -42,7 +42,7 @@ def _get_postprocessor(self, service_package: ServicePackage) -> AioBoto3Postpro """ Get postprocessor for service package. """ - return AioBoto3Postprocessor(service_package, self.master_service_names) + return AioBoto3Postprocessor(service_package, self.main_service_names) def generate_stubs(self) -> list[Package]: """ @@ -74,7 +74,7 @@ def _generate_stubs(self) -> TypesAioBoto3Package | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_aioboto3( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), version=version, static_files_path=self._get_static_files_path(), @@ -91,7 +91,7 @@ def _generate_stubs_lite(self) -> TypesAioBoto3Package | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_aioboto3_lite( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), version=version, static_files_path=self._get_static_files_path(), @@ -99,7 +99,7 @@ def _generate_stubs_lite(self) -> TypesAioBoto3Package | None: def generate_docs(self) -> None: """ - Generate service and master docs. + Generate service and main docs. """ package_data = TypesAioBoto3PackageData total_str = f"{len(self.service_names)}" diff --git a/mypy_boto3_builder/generators/aiobotocore_generator.py b/mypy_boto3_builder/generators/aiobotocore_generator.py index 3f776867..47969c9a 100644 --- a/mypy_boto3_builder/generators/aiobotocore_generator.py +++ b/mypy_boto3_builder/generators/aiobotocore_generator.py @@ -48,7 +48,7 @@ def _get_postprocessor(self, service_package: ServicePackage) -> AioBotocorePost """ Get postprocessor for service package. """ - return AioBotocorePostprocessor(service_package, self.master_service_names) + return AioBotocorePostprocessor(service_package, self.main_service_names) def generate_stubs(self) -> list[Package]: """ @@ -80,7 +80,7 @@ def _generate_stubs(self) -> TypesAioBotocorePackage | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_aiobotocore( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), version=version, static_files_path=self._get_static_files_path(), @@ -97,7 +97,7 @@ def _generate_stubs_lite(self) -> TypesAioBotocorePackage | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_aiobotocore_lite( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), version=version, static_files_path=self._get_static_files_path(), @@ -105,7 +105,7 @@ def _generate_stubs_lite(self) -> TypesAioBotocorePackage | None: def generate_docs(self) -> None: """ - Generate service and master docs. + Generate service and main docs. """ package_data = TypesAioBotocorePackageData total_str = f"{len(self.service_names)}" diff --git a/mypy_boto3_builder/generators/base_generator.py b/mypy_boto3_builder/generators/base_generator.py index c6ed6d85..a348c096 100644 --- a/mypy_boto3_builder/generators/base_generator.py +++ b/mypy_boto3_builder/generators/base_generator.py @@ -33,7 +33,7 @@ class BaseGenerator(ABC): Arguments: service_names -- Selected service names - master_service_names -- Service names included in master + main_service_names -- Service names included in main config -- CLI configuration version -- Package build version cleanup -- Whether to cleanup generated files @@ -45,7 +45,7 @@ class BaseGenerator(ABC): def __init__( self, service_names: Sequence[ServiceName], - master_service_names: Sequence[ServiceName], + main_service_names: Sequence[ServiceName], config: CLINamespace, version: str, *, @@ -56,7 +56,7 @@ def __init__( self._downloaded_static_files_path: Path | None = None self.service_names = service_names - self.master_service_names = master_service_names + self.main_service_names = main_service_names self.config = config self.logger = get_logger() self.version = version or self._get_library_version() @@ -203,7 +203,7 @@ def _generate_full_stubs_services(self, package: Package) -> None: @abstractmethod def generate_docs(self) -> None: """ - Generate service and master docs. + Generate service and main docs. """ def generate_product(self, product_type: ProductType) -> None: diff --git a/mypy_boto3_builder/generators/boto3_generator.py b/mypy_boto3_builder/generators/boto3_generator.py index 3c19c737..5b9bb6fc 100644 --- a/mypy_boto3_builder/generators/boto3_generator.py +++ b/mypy_boto3_builder/generators/boto3_generator.py @@ -20,12 +20,12 @@ MypyBoto3PackageData, ) from mypy_boto3_builder.postprocessors.botocore import BotocorePostprocessor -from mypy_boto3_builder.structures.master_package import MasterPackage +from mypy_boto3_builder.structures.mypy_boto3_package import MypyBoto3Package from mypy_boto3_builder.structures.package import Package from mypy_boto3_builder.structures.service_package import ServicePackage from mypy_boto3_builder.structures.types_boto3_package import TypesBoto3Package from mypy_boto3_builder.writers.processors import ( - process_master, + process_mypy_boto3, process_types_boto3, process_types_boto3_docs, process_types_boto3_full, @@ -45,9 +45,9 @@ def _get_postprocessor(self, service_package: ServicePackage) -> BotocorePostpro """ Get postprocessor for service package. """ - return BotocorePostprocessor(service_package, self.master_service_names) + return BotocorePostprocessor(service_package, self.main_service_names) - def _generate_master(self) -> MasterPackage | None: + def _generate_mypy_boto3(self) -> MypyBoto3Package | None: """ Generate `mypy-boto3` package. """ @@ -59,9 +59,9 @@ def _generate_master(self) -> MasterPackage | None: return None self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") - return process_master( + return process_mypy_boto3( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, version=version, generate_package=self.is_package(), ) @@ -83,7 +83,7 @@ def _generate_stubs(self) -> TypesBoto3Package | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_boto3( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), package_data=package_data, version=version, @@ -101,7 +101,7 @@ def _generate_stubs_lite(self) -> TypesBoto3Package | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_boto3_lite( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), package_data=package_data, version=version, @@ -120,7 +120,7 @@ def generate_stubs(self) -> list[Package]: result.append(package) if not self.is_package(): - package = self._generate_master() + package = self._generate_mypy_boto3() if package: result.append(package) @@ -137,7 +137,7 @@ def generate_stubs_lite(self) -> list[Package]: def generate_docs(self) -> None: """ - Generate service and master docs. + Generate service and docs. """ package_data = Boto3StubsPackageData total_str = f"{len(self.service_names)}" diff --git a/mypy_boto3_builder/generators/types_boto3_generator.py b/mypy_boto3_builder/generators/types_boto3_generator.py index 93185138..4e6b167a 100644 --- a/mypy_boto3_builder/generators/types_boto3_generator.py +++ b/mypy_boto3_builder/generators/types_boto3_generator.py @@ -42,7 +42,7 @@ def _get_postprocessor(self, service_package: ServicePackage) -> BotocorePostpro """ Get postprocessor for service package. """ - return BotocorePostprocessor(service_package, self.master_service_names) + return BotocorePostprocessor(service_package, self.main_service_names) def _get_static_files_path(self) -> Path: return self._get_or_download_static_files_path( @@ -61,7 +61,7 @@ def _generate_stubs(self) -> TypesBoto3Package | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_boto3( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), package_data=package_data, version=version, @@ -79,7 +79,7 @@ def _generate_stubs_lite(self) -> TypesBoto3Package | None: self.logger.info(f"Generating {package_data.PYPI_NAME} {version}") return process_types_boto3_lite( output_path=self.output_path, - service_names=self.master_service_names, + service_names=self.main_service_names, generate_package=self.is_package(), package_data=package_data, version=version, @@ -107,7 +107,7 @@ def generate_stubs_lite(self) -> list[Package]: def generate_docs(self) -> None: """ - Generate service and master docs. + Generate service and main docs. """ package_data = TypesBoto3PackageData total_str = f"{len(self.service_names)}" diff --git a/mypy_boto3_builder/import_helpers/import_string.py b/mypy_boto3_builder/import_helpers/import_string.py index d917a04d..32dab3a7 100644 --- a/mypy_boto3_builder/import_helpers/import_string.py +++ b/mypy_boto3_builder/import_helpers/import_string.py @@ -18,7 +18,7 @@ class ImportString: Wrapper for Python import strings. Arguments: - master -- Master module name + parent -- Parent module name parts -- Other import parts Examples:: diff --git a/mypy_boto3_builder/import_helpers/internal_import_record.py b/mypy_boto3_builder/import_helpers/internal_import_record.py index 80b92fcc..ed27cd6b 100644 --- a/mypy_boto3_builder/import_helpers/internal_import_record.py +++ b/mypy_boto3_builder/import_helpers/internal_import_record.py @@ -1,5 +1,5 @@ """ -Helper for Python import strings with not set master module name. +Helper for Python import strings without parent module name. Copyright 2024 Vlad Emelianov """ @@ -11,7 +11,7 @@ class InternalImportRecord(ImportRecord): """ - Helper for Python import strings with not set master module name. + Helper for Python import strings without parent module name. Arguments: service_module_name -- Service module name. diff --git a/mypy_boto3_builder/main.py b/mypy_boto3_builder/main.py index bec5fd50..a9bd36a6 100644 --- a/mypy_boto3_builder/main.py +++ b/mypy_boto3_builder/main.py @@ -127,7 +127,7 @@ def generate_product( product: Product, args: CLINamespace, service_names: Sequence[ServiceName], - master_service_names: Sequence[ServiceName], + main_service_names: Sequence[ServiceName], ) -> None: """ Generate a selected product. @@ -136,13 +136,13 @@ def generate_product( product -- Product to generate args -- CLI namespace service_names -- Selected service names - master_service_names -- Service names included in master + main_service_names -- Service names included in main """ generator = get_generator( product, { "service_names": service_names, - "master_service_names": master_service_names, + "main_service_names": main_service_names, "config": args, "version": args.build_version, "cleanup": True, @@ -199,11 +199,11 @@ def run(args: CLINamespace) -> None: return service_names = get_selected_service_names(args.service_names, available_service_names) - master_service_names = service_names if args.partial_overload else available_service_names + main_service_names = service_names if args.partial_overload else available_service_names for product in args.products: logger.info(f"Generating {product} product") - generate_product(product, args, service_names, master_service_names) + generate_product(product, args, service_names, main_service_names) logger.debug("Done!") diff --git a/mypy_boto3_builder/parsers/fake_service_package.py b/mypy_boto3_builder/parsers/fake_service_package.py index 01327974..5f30b093 100644 --- a/mypy_boto3_builder/parsers/fake_service_package.py +++ b/mypy_boto3_builder/parsers/fake_service_package.py @@ -1,5 +1,5 @@ """ -Fake parser that produces `structures.ServiceModule` for master module and stubs. +Fake parser that produces `structures.ServiceModule` for main module and stubs. Copyright 2024 Vlad Emelianov """ @@ -23,7 +23,7 @@ def parse_fake_service_package( """ Create fake boto3 service module structure. - Used by stubs and master package. + Used by stubs and main package. Arguments: service_name -- Target service name. diff --git a/mypy_boto3_builder/parsers/master_package.py b/mypy_boto3_builder/parsers/mypy_boto3_package.py similarity index 80% rename from mypy_boto3_builder/parsers/master_package.py rename to mypy_boto3_builder/parsers/mypy_boto3_package.py index 87291e38..cddffdab 100644 --- a/mypy_boto3_builder/parsers/master_package.py +++ b/mypy_boto3_builder/parsers/mypy_boto3_package.py @@ -10,25 +10,25 @@ from mypy_boto3_builder.parsers.fake_service_package import parse_fake_service_package from mypy_boto3_builder.parsers.resource_loader import ResourceLoader from mypy_boto3_builder.service_name import ServiceName -from mypy_boto3_builder.structures.master_package import MasterPackage +from mypy_boto3_builder.structures.mypy_boto3_package import MypyBoto3Package from mypy_boto3_builder.type_annotations.type_literal import TypeLiteral -def parse_master_package( +def parse_mypy_boto3_package( service_names: Iterable[ServiceName], version: str, -) -> MasterPackage: +) -> MypyBoto3Package: """ - Parse data for master package. + Parse data for mypy-boto3 package. Arguments: service_names -- All available service names. version -- Package version. Returns: - MasterPackage structure. + MypyBoto3Package structure. """ - result = MasterPackage(service_names=service_names, service_packages=[], version=version) + result = MypyBoto3Package(service_names=service_names, service_packages=[], version=version) for service_name in result.service_names: result.service_packages.append( parse_fake_service_package(service_name, Boto3StubsPackageData, version), diff --git a/mypy_boto3_builder/structures/master_package.py b/mypy_boto3_builder/structures/mypy_boto3_package.py similarity index 97% rename from mypy_boto3_builder/structures/master_package.py rename to mypy_boto3_builder/structures/mypy_boto3_package.py index 82228a39..09981dca 100644 --- a/mypy_boto3_builder/structures/master_package.py +++ b/mypy_boto3_builder/structures/mypy_boto3_package.py @@ -16,7 +16,7 @@ from mypy_boto3_builder.type_annotations.type_literal import TypeLiteral -class MasterPackage(Package): +class MypyBoto3Package(Package): """ Structure for mypy-boto3 package. diff --git a/mypy_boto3_builder/templates/master/README.md.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/README.md.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/README.md.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/README.md.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/__init__.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/__init__.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/__init__.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/__init__.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/__main__.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/__main__.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/__main__.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/__main__.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/boto3_init.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_init.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/boto3_init.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_init.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/boto3_init_stub.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_init_stub.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/boto3_init_stub.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_init_stub.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/boto3_session.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_session.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/boto3_session.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_session.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/boto3_session_stub.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_session_stub.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/boto3_session_stub.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/boto3_session_stub.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/literals.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/literals.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/literals.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/literals.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/main.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/main.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/main.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/main.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/py.typed.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/py.typed.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/py.typed.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/py.typed.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/submodules.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/submodules.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/submodules.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/submodules.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/mypy_boto3/version.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/version.py.jinja2 similarity index 100% rename from mypy_boto3_builder/templates/master/mypy_boto3/version.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/mypy_boto3/version.py.jinja2 diff --git a/mypy_boto3_builder/templates/master/setup.py.jinja2 b/mypy_boto3_builder/templates/mypy-boto3/setup.py.jinja2 similarity index 92% rename from mypy_boto3_builder/templates/master/setup.py.jinja2 rename to mypy_boto3_builder/templates/mypy-boto3/setup.py.jinja2 index 524fb68f..5694e01c 100644 --- a/mypy_boto3_builder/templates/master/setup.py.jinja2 +++ b/mypy_boto3_builder/templates/mypy-boto3/setup.py.jinja2 @@ -21,7 +21,7 @@ setup( license="MIT License", author="Vlad Emelianov", author_email="vlad.emelianov.nz@gmail.com", - description="Type annotations for {{ package.library_name }} {{ package.library_version }} master module generated with {{ builder_package_name }} {{ builder_version }}", + description="Type annotations for {{ package.library_name }} {{ package.library_version }} module generated with {{ builder_package_name }} {{ builder_version }}", classifiers=[ {% for classifier in package.get_classifiers() -%} {{ "\n " -}}"{{ classifier -}}", diff --git a/mypy_boto3_builder/type_defs.py b/mypy_boto3_builder/type_defs.py index b7d68d33..b1cdf994 100644 --- a/mypy_boto3_builder/type_defs.py +++ b/mypy_boto3_builder/type_defs.py @@ -17,7 +17,7 @@ class GeneratorKwargs(TypedDict): """ service_names: Sequence[ServiceName] - master_service_names: Sequence[ServiceName] + main_service_names: Sequence[ServiceName] config: CLINamespace version: str cleanup: bool diff --git a/mypy_boto3_builder/writers/aioboto3_processors.py b/mypy_boto3_builder/writers/aioboto3_processors.py index 8489c49d..c16e8897 100644 --- a/mypy_boto3_builder/writers/aioboto3_processors.py +++ b/mypy_boto3_builder/writers/aioboto3_processors.py @@ -108,7 +108,7 @@ def process_types_aioboto3_docs( version: str, ) -> TypesAioBoto3Package: """ - Parse and write master package docs. + Parse and write package docs. Arguments: output_path -- Package output path diff --git a/mypy_boto3_builder/writers/aiobotocore_processors.py b/mypy_boto3_builder/writers/aiobotocore_processors.py index 56bf5b06..27e1719a 100644 --- a/mypy_boto3_builder/writers/aiobotocore_processors.py +++ b/mypy_boto3_builder/writers/aiobotocore_processors.py @@ -112,7 +112,7 @@ def process_types_aiobotocore_docs( version: str, ) -> TypesAioBotocorePackage: """ - Parse and write master package docs. + Parse and write package docs. Arguments: output_path -- Package output path diff --git a/mypy_boto3_builder/writers/processors.py b/mypy_boto3_builder/writers/processors.py index c5fbc43c..eaad0403 100644 --- a/mypy_boto3_builder/writers/processors.py +++ b/mypy_boto3_builder/writers/processors.py @@ -10,10 +10,10 @@ from mypy_boto3_builder.constants import TemplatePath from mypy_boto3_builder.logger import get_logger from mypy_boto3_builder.package_data import BasePackageData -from mypy_boto3_builder.parsers.master_package import parse_master_package +from mypy_boto3_builder.parsers.mypy_boto3_package import parse_mypy_boto3_package from mypy_boto3_builder.parsers.parse_wrapper_package import parse_types_boto3_package from mypy_boto3_builder.service_name import ServiceName -from mypy_boto3_builder.structures.master_package import MasterPackage +from mypy_boto3_builder.structures.mypy_boto3_package import MypyBoto3Package from mypy_boto3_builder.structures.types_boto3_package import TypesBoto3Package from mypy_boto3_builder.utils.path import print_path from mypy_boto3_builder.writers.package_writer import PackageWriter @@ -113,15 +113,15 @@ def process_types_boto3_lite( return package -def process_master( +def process_mypy_boto3( output_path: Path, service_names: Iterable[ServiceName], version: str, *, generate_package: bool, -) -> MasterPackage: +) -> MypyBoto3Package: """ - Parse and write master package `mypy_boto3`. + Parse and write package `mypy_boto3`. Arguments: output_path -- Package output path @@ -130,12 +130,12 @@ def process_master( generate_package -- Generate ready-to-install or to-use package Return: - Parsed MasterPackage. + Parsed MypyBoto3Package. """ logger = get_logger() - logger.debug("Parsing master") - package = parse_master_package(service_names=service_names, version=version) - logger.debug(f"Writing master to {print_path(output_path)}") + logger.debug("Parsing mypy_boto3") + package = parse_mypy_boto3_package(service_names=service_names, version=version) + logger.debug(f"Writing mypy_boto3 to {print_path(output_path)}") package_writer = PackageWriter( output_path=output_path, @@ -144,7 +144,7 @@ def process_master( ) package_writer.write_package( package, - templates_path=TemplatePath.master, + templates_path=TemplatePath.mypy_boto3, ) return package @@ -157,7 +157,7 @@ def process_types_boto3_docs( version: str, ) -> TypesBoto3Package: """ - Parse and write master package docs. + Parse and write package docs. Arguments: output_path -- Package output path diff --git a/scripts/install.sh b/scripts/install.sh index 5d672424..3c17c60f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -8,7 +8,7 @@ if [[ "$1" == "" ]]; then PACKAGES=${OUTPUT_PATH}/*_package fi -if [[ "$1" == "master" ]]; then +if [[ "$1" == "main" ]]; then echo Installing boto3-stubs package uv pip install ${OUTPUT_PATH}/boto3_stubs_package exit diff --git a/scripts/install_aiobotocore.sh b/scripts/install_aiobotocore.sh index 17f7c2a9..714f54dd 100755 --- a/scripts/install_aiobotocore.sh +++ b/scripts/install_aiobotocore.sh @@ -8,7 +8,7 @@ if [[ "$1" == "" ]]; then PACKAGES=${OUTPUT_PATH}/*_package fi -if [[ "$1" == "master" ]]; then +if [[ "$1" == "main" ]]; then echo Installing types-aiobotocore package uv pip install ${OUTPUT_PATH}/types_aiobotocore_package diff --git a/scripts/integration.py b/scripts/integration.py index c3509843..2a5248f1 100755 --- a/scripts/integration.py +++ b/scripts/integration.py @@ -54,7 +54,7 @@ class Product: install_script_path: Path build_product: str prerequisites: tuple[str, ...] = () - master_build_products: tuple[str, ...] = () + main_build_products: tuple[str, ...] = () class ProductChoices(enum.Enum): @@ -67,7 +67,7 @@ class ProductChoices(enum.Enum): examples_path=EXAMPLES_PATH, install_script_path=SCRIPTS_PATH / "install.sh", build_product="boto3-services", - master_build_products=("boto3",), + main_build_products=("boto3",), ) aioboto3 = Product( name="aioboto3", @@ -75,7 +75,7 @@ class ProductChoices(enum.Enum): examples_path=AIO_EXAMPLES_PATH, install_script_path=SCRIPTS_PATH / "install_aiobotocore.sh", build_product="aiobotocore-services", - master_build_products=("aioboto3", "aiobotocore"), + main_build_products=("aioboto3", "aiobotocore"), ) @@ -194,7 +194,7 @@ def build_packages( log_level: int, ) -> None: """ - Build and install master stubs. + Build and install stubs. - boto3: `boto3-stubs` - aioboto3: `types-aioboto3` and `types-aiobotocore` @@ -202,7 +202,7 @@ def build_packages( if product.prerequisites: check_call([sys.executable, "-m", "pip", "install", *product.prerequisites]) - products = [BuilderProduct(i) for i in (*product.master_build_products, product.build_product)] + products = [BuilderProduct(i) for i in (*product.main_build_products, product.build_product)] run_builder( BuilderCLINamespace( log_level=log_level, diff --git a/scripts/release.py b/scripts/release.py index d7d9f722..663ef0eb 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -32,18 +32,18 @@ from collections.abc import Iterator MAIN_PACKAGES = [ - "types_aiobotocore", "types_aiobotocore_lite", "types_aiobotocore_full", + "types_aiobotocore", "mypy_boto3", - "types_boto3", "types_boto3_lite", + "types_boto3", "types_boto3_full", - "boto3_stubs", "boto3_stubs_lite", "boto3_stubs_full", - "types_aioboto3", + "boto3_stubs", "types_aioboto3_lite", + "types_aioboto3", ] MAIN_DIRECTORIES = [f"{i}_package" for i in MAIN_PACKAGES] LOGGER_NAME = "release" @@ -367,10 +367,10 @@ def publish_packages(args: CLINamespace) -> None: filter(lambda path: any(i in path.name for i in filters), package_paths) ) - master_paths = [p for p in package_paths if p.stem.split("-", 1)[0] in MAIN_PACKAGES] - master_paths.sort(key=lambda p: MAIN_PACKAGES.index(p.stem.split("-", 1)[0])) + main_paths = [p for p in package_paths if p.stem.split("-", 1)[0] in MAIN_PACKAGES] + main_paths.sort(key=lambda p: MAIN_PACKAGES.index(p.stem.split("-", 1)[0])) - service_paths = [p for p in package_paths if p not in master_paths] + service_paths = [p for p in package_paths if p not in main_paths] service_paths.sort(key=lambda x: x.name) service_paths_batch = tuple( @@ -383,8 +383,8 @@ def publish_packages(args: CLINamespace) -> None: main_paths_batch = tuple( tuple(filter(None, i)) for i in itertools.zip_longest( - tuple(p for p in master_paths if p.suffix == ".whl"), - tuple(p for p in master_paths if p.suffix == ".gz"), + tuple(p for p in main_paths if p.suffix == ".whl"), + tuple(p for p in main_paths if p.suffix == ".gz"), ) ) diff --git a/tests/structures/test_master_package.py b/tests/structures/test_mypy_boto3_package.py similarity index 53% rename from tests/structures/test_master_package.py rename to tests/structures/test_mypy_boto3_package.py index b7b00e4f..80cb4060 100644 --- a/tests/structures/test_master_package.py +++ b/tests/structures/test_mypy_boto3_package.py @@ -1,10 +1,10 @@ from mypy_boto3_builder.service_name import ServiceNameCatalog -from mypy_boto3_builder.structures.master_package import MasterPackage +from mypy_boto3_builder.structures.mypy_boto3_package import MypyBoto3Package -class TestMasterPackage: +class TestMypyBoto3Package: def test_init(self) -> None: - package = MasterPackage([ServiceNameCatalog.ec2, ServiceNameCatalog.logs], [], "1.2.3") + package = MypyBoto3Package([ServiceNameCatalog.ec2, ServiceNameCatalog.logs], [], "1.2.3") assert package assert package.essential_service_names == [ServiceNameCatalog.ec2] assert package.literals == [] diff --git a/tests/writers/test_processors.py b/tests/writers/test_processors.py index fe9b14b9..92980a49 100644 --- a/tests/writers/test_processors.py +++ b/tests/writers/test_processors.py @@ -8,7 +8,7 @@ ) from mypy_boto3_builder.service_name import ServiceNameCatalog from mypy_boto3_builder.writers.processors import ( - process_master, + process_mypy_boto3, process_types_boto3, process_types_boto3_docs, process_types_boto3_full, @@ -81,27 +81,27 @@ def test_process_types_boto3_lite( ) assert result == package_mock - @patch("mypy_boto3_builder.writers.processors.parse_master_package") + @patch("mypy_boto3_builder.writers.processors.parse_mypy_boto3_package") @patch("mypy_boto3_builder.writers.processors.PackageWriter") - def test_process_master( + def test_process_mypy_boto3( self, PackageWriterMock: MagicMock, - parse_master_package_mock: MagicMock, + parse_mypy_boto3_package_mock: MagicMock, ) -> None: PackageWriterMock().write_package.return_value = [Path("modified_path")] service_name_mock = MagicMock() - result = process_master( + result = process_mypy_boto3( output_path=Path("my_path"), service_names=[service_name_mock], version="1.2.3", generate_package=True, ) PackageWriterMock().write_package.assert_called() - parse_master_package_mock.assert_called_with( + parse_mypy_boto3_package_mock.assert_called_with( service_names=[service_name_mock], version="1.2.3", ) - assert result == parse_master_package_mock() + assert result == parse_mypy_boto3_package_mock() @patch("mypy_boto3_builder.writers.processors.parse_types_boto3_package") @patch("mypy_boto3_builder.writers.processors.PackageWriter") diff --git a/vulture_whitelist.txt b/vulture_whitelist.txt index f3e739ae..b4904adc 100644 --- a/vulture_whitelist.txt +++ b/vulture_whitelist.txt @@ -1,12 +1,15 @@ IS_VSCODE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:33) IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:34) _.has_pypi_lite_package # unused method (mypy_boto3_builder/package_data.py:64) -IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:111) -IS_VSCODE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:134) -IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:135) -IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:154) -AIOBOTOCORE_NAME # unused variable (mypy_boto3_builder/package_data.py:188) -AIOBOTOCORE_NAME # unused variable (mypy_boto3_builder/package_data.py:206) +IS_VSCODE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:86) +IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:87) +IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:106) +IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:156) +IS_VSCODE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:179) +IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:180) +IS_CONDA_FORGE_SUPPORTED # unused variable (mypy_boto3_builder/package_data.py:199) +AIOBOTOCORE_NAME # unused variable (mypy_boto3_builder/package_data.py:233) +AIOBOTOCORE_NAME # unused variable (mypy_boto3_builder/package_data.py:251) limit_key # unused variable (mypy_boto3_builder/parsers/shape_parser_types.py:16) pagination # unused variable (mypy_boto3_builder/parsers/shape_parser_types.py:24) has # unused variable (mypy_boto3_builder/parsers/shape_parser_types.py:109) @@ -24,11 +27,11 @@ _.get_example_method # unused method (mypy_boto3_builder/structures/client.py:1 _.body # unused property (mypy_boto3_builder/structures/function.py:127) _.returns_none # unused property (mypy_boto3_builder/structures/function.py:154) _.type_hint_annotations # unused property (mypy_boto3_builder/structures/function.py:177) -_.essential_service_names # unused property (mypy_boto3_builder/structures/master_package.py:39) -_.min_library_version # unused property (mypy_boto3_builder/structures/package.py:141) -_.max_library_version # unused property (mypy_boto3_builder/structures/package.py:148) -_.min_python_version # unused property (mypy_boto3_builder/structures/package.py:155) -_.get_classifiers # unused method (mypy_boto3_builder/structures/package.py:163) +_.essential_service_names # unused property (mypy_boto3_builder/structures/mypy_boto3_package.py:39) +_.min_library_version # unused property (mypy_boto3_builder/structures/package.py:138) +_.max_library_version # unused property (mypy_boto3_builder/structures/package.py:145) +_.min_python_version # unused property (mypy_boto3_builder/structures/package.py:152) +_.get_classifiers # unused method (mypy_boto3_builder/structures/package.py:160) _.pypi_badge # unused property (mypy_boto3_builder/structures/package_url.py:20) _.pyversions_badge # unused property (mypy_boto3_builder/structures/package_url.py:27) _.rtd_badge # unused property (mypy_boto3_builder/structures/package_url.py:34)