wexample-filestate-dev 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.2
2
+ Name: wexample-filestate-dev
3
+ Version: 0.0.1
4
+ Summary: Some python basic helpers.
5
+ Author-email: weeger <contact@wexample.com>
6
+ License: MIT
7
+ Project-URL: homepage, https://github.com/wexample/python-filestate-dev
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: pip-tools
14
+ Requires-Dist: pydantic
15
+ Requires-Dist: pytest
16
+ Requires-Dist: wexample-filestate
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "wexample-filestate-dev"
7
+ version = "0.0.1"
8
+ description = "Some python basic helpers."
9
+ readme = { file = "README.md", content-type = "text/markdown" }
10
+ authors = [{ name = "weeger", email = "contact@wexample.com" }]
11
+ license = { text = "MIT" }
12
+ requires-python = ">=3.6"
13
+
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+
20
+ dependencies = [
21
+ "pip-tools",
22
+ "pydantic",
23
+ "pytest",
24
+ "wexample-filestate"
25
+ ]
26
+
27
+ [project.urls]
28
+ homepage = "https://github.com/wexample/python-filestate-dev"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,46 @@
1
+ from typing import Dict, List, Set, TypeVar, Callable
2
+
3
+ SortableType = TypeVar('SortableType')
4
+
5
+ def dependencies_sort(
6
+ items: List[SortableType],
7
+ get_dependencies: Callable[[SortableType], Set[SortableType]]
8
+ ) -> List[SortableType]:
9
+ """
10
+ Sort a list of items based on their dependencies.
11
+ """
12
+ # Build dependency map
13
+ dependencies: Dict[SortableType, Set[SortableType]] = {
14
+ item: get_dependencies(item)
15
+ for item in items
16
+ }
17
+
18
+ # Copy dependencies to avoid modifying the original
19
+ remaining_deps = {k: set(v) for k, v in dependencies.items()}
20
+ sorted_items = []
21
+
22
+ while remaining_deps:
23
+ # Find items with no remaining dependencies
24
+ deployable = [
25
+ item for item, deps in remaining_deps.items()
26
+ if not deps
27
+ ]
28
+
29
+ if not deployable:
30
+ cycles = [str(item) for item in remaining_deps.keys()]
31
+ raise ValueError(
32
+ f"Circular dependencies detected between: {', '.join(cycles)}"
33
+ )
34
+
35
+ # Add deployable items to the result (sort for stability)
36
+ sorted_items.extend(sorted(deployable, key=str))
37
+
38
+ # Remove deployed items
39
+ for item in deployable:
40
+ del remaining_deps[item]
41
+
42
+ # Remove deployed items from remaining dependencies
43
+ for deps in remaining_deps.values():
44
+ deps.difference_update(deployable)
45
+
46
+ return sorted_items
@@ -0,0 +1,5 @@
1
+ from wexample_wex_addon_app.workdir.app_workdir import AppWorkdir
2
+
3
+
4
+ class FrameworkPackageWorkdir(AppWorkdir):
5
+ pass
@@ -0,0 +1,5 @@
1
+ from wexample_wex_core.common.workdir import Workdir
2
+
3
+
4
+ class FrameworkPackageSuiteWorkdir(Workdir):
5
+ pass
@@ -0,0 +1,20 @@
1
+ from typing import Optional
2
+
3
+ from wexample_config.const.types import DictConfig
4
+ from wexample_filestate.config_value.readme_content_option_value import ReadmeContentConfigValue
5
+ from wexample_filestate.const.disk import DiskItemType
6
+
7
+
8
+ class WithReadmeWorkdirMixin:
9
+ def append_readme(self, config: Optional[DictConfig] = None) -> DictConfig:
10
+ config.get("children").append({
11
+ "name": 'README.md',
12
+ "type": DiskItemType.FILE,
13
+ "should_exist": True,
14
+ "default_content": ReadmeContentConfigValue(
15
+ templates=[],
16
+ parameters={}
17
+ ),
18
+ })
19
+
20
+ return config
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.2
2
+ Name: wexample-filestate-dev
3
+ Version: 0.0.1
4
+ Summary: Some python basic helpers.
5
+ Author-email: weeger <contact@wexample.com>
6
+ License: MIT
7
+ Project-URL: homepage, https://github.com/wexample/python-filestate-dev
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: pip-tools
14
+ Requires-Dist: pydantic
15
+ Requires-Dist: pytest
16
+ Requires-Dist: wexample-filestate
@@ -0,0 +1,13 @@
1
+ pyproject.toml
2
+ wexample_filestate_dev.egg-info/PKG-INFO
3
+ wexample_filestate_dev.egg-info/SOURCES.txt
4
+ wexample_filestate_dev.egg-info/dependency_links.txt
5
+ wexample_filestate_dev.egg-info/requires.txt
6
+ wexample_filestate_dev.egg-info/top_level.txt
7
+ wexample_filestate_dev/helpers/__init__.py
8
+ wexample_filestate_dev/helpers/dependencies.py
9
+ wexample_filestate_dev/workdir/__init__.py
10
+ wexample_filestate_dev/workdir/framework_package_workdir.py
11
+ wexample_filestate_dev/workdir/framework_packages_suite_workdir.py
12
+ wexample_filestate_dev/workdir/mixins/__init__.py
13
+ wexample_filestate_dev/workdir/mixins/with_readme_workdir_mixin.py
@@ -0,0 +1,4 @@
1
+ pip-tools
2
+ pydantic
3
+ pytest
4
+ wexample-filestate
@@ -0,0 +1 @@
1
+ wexample_filestate_dev