iker-python-setup 1.0.999999__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,80 @@
1
+ root = true
2
+
3
+ [*.py]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ ij_python_align_collections_and_comprehensions = true
12
+ ij_python_align_multiline_imports = true
13
+ ij_python_align_multiline_parameters = true
14
+ ij_python_align_multiline_parameters_in_calls = true
15
+ ij_python_blank_line_at_file_end = true
16
+ ij_python_blank_lines_after_imports = 1
17
+ ij_python_blank_lines_after_local_imports = 0
18
+ ij_python_blank_lines_around_class = 1
19
+ ij_python_blank_lines_around_method = 1
20
+ ij_python_blank_lines_around_top_level_classes_functions = 2
21
+ ij_python_blank_lines_before_first_method = 0
22
+ ij_python_call_parameters_new_line_after_left_paren = false
23
+ ij_python_call_parameters_right_paren_on_new_line = false
24
+ ij_python_call_parameters_wrap = normal
25
+ ij_python_dict_alignment = 0
26
+ ij_python_dict_new_line_after_left_brace = false
27
+ ij_python_dict_new_line_before_right_brace = false
28
+ ij_python_dict_wrapping = 1
29
+ ij_python_from_import_new_line_after_left_parenthesis = false
30
+ ij_python_from_import_new_line_before_right_parenthesis = false
31
+ ij_python_from_import_parentheses_force_if_multiline = false
32
+ ij_python_from_import_trailing_comma_if_multiline = false
33
+ ij_python_from_import_wrapping = 1
34
+ ij_python_hang_closing_brackets = false
35
+ ij_python_keep_blank_lines_in_code = 1
36
+ ij_python_keep_blank_lines_in_declarations = 1
37
+ ij_python_keep_indents_on_empty_lines = false
38
+ ij_python_keep_line_breaks = true
39
+ ij_python_method_parameters_new_line_after_left_paren = false
40
+ ij_python_method_parameters_right_paren_on_new_line = false
41
+ ij_python_method_parameters_wrap = normal
42
+ ij_python_new_line_after_colon = false
43
+ ij_python_new_line_after_colon_multi_clause = true
44
+ ij_python_optimize_imports_always_split_from_imports = false
45
+ ij_python_optimize_imports_case_insensitive_order = false
46
+ ij_python_optimize_imports_join_from_imports_with_same_source = false
47
+ ij_python_optimize_imports_sort_by_type_first = true
48
+ ij_python_optimize_imports_sort_imports = true
49
+ ij_python_optimize_imports_sort_names_in_from_imports = true
50
+ ij_python_space_after_comma = true
51
+ ij_python_space_after_number_sign = true
52
+ ij_python_space_after_py_colon = true
53
+ ij_python_space_before_backslash = true
54
+ ij_python_space_before_comma = false
55
+ ij_python_space_before_for_semicolon = false
56
+ ij_python_space_before_lbracket = false
57
+ ij_python_space_before_method_call_parentheses = false
58
+ ij_python_space_before_method_parentheses = false
59
+ ij_python_space_before_number_sign = true
60
+ ij_python_space_before_py_colon = false
61
+ ij_python_space_within_empty_method_call_parentheses = false
62
+ ij_python_space_within_empty_method_parentheses = false
63
+ ij_python_spaces_around_additive_operators = true
64
+ ij_python_spaces_around_assignment_operators = true
65
+ ij_python_spaces_around_bitwise_operators = true
66
+ ij_python_spaces_around_eq_in_keyword_argument = false
67
+ ij_python_spaces_around_eq_in_named_parameter = false
68
+ ij_python_spaces_around_equality_operators = true
69
+ ij_python_spaces_around_multiplicative_operators = true
70
+ ij_python_spaces_around_power_operator = true
71
+ ij_python_spaces_around_relational_operators = true
72
+ ij_python_spaces_around_shift_operators = true
73
+ ij_python_spaces_within_braces = false
74
+ ij_python_spaces_within_brackets = false
75
+ ij_python_spaces_within_method_call_parentheses = false
76
+ ij_python_spaces_within_method_parentheses = false
77
+ ij_python_use_continuation_indent_for_arguments = false
78
+ ij_python_use_continuation_indent_for_collection_and_comprehensions = false
79
+ ij_python_use_continuation_indent_for_parameters = false
80
+ ij_python_wrap_long_lines = false
@@ -0,0 +1,56 @@
1
+ name: Python App CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+
9
+ env:
10
+ LOCAL_PYPI: ${{ github.workspace }}/pypi
11
+
12
+ jobs:
13
+ build-python311:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Setup Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.11"
20
+ - name: Setup build environment
21
+ run: |
22
+ sudo apt-get install libxml2-dev libxslt1-dev llvm-14-dev
23
+ mkdir -p ${{ env.LOCAL_PYPI }}
24
+ python -m pip install --upgrade pip build
25
+ python -m pip config set global.find-links ${{ env.LOCAL_PYPI }}
26
+ - name: Checkout project
27
+ uses: actions/checkout@v4
28
+ with:
29
+ path: project
30
+ - name: Build project
31
+ run: |
32
+ python -m pip install project/[test]
33
+ python -m pytest project/ --cov --cov-config=project/pyproject.toml
34
+ python -m build -sw project/ -o ${{ env.LOCAL_PYPI }}
35
+ build-python312:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - name: Setup Python
39
+ uses: actions/setup-python@v5
40
+ with:
41
+ python-version: "3.12"
42
+ - name: Setup build environment
43
+ run: |
44
+ sudo apt-get install libxml2-dev libxslt1-dev llvm-14-dev
45
+ mkdir -p ${{ env.LOCAL_PYPI }}
46
+ python -m pip install --upgrade pip build
47
+ python -m pip config set global.find-links ${{ env.LOCAL_PYPI }}
48
+ - name: Checkout project
49
+ uses: actions/checkout@v4
50
+ with:
51
+ path: project
52
+ - name: Build project
53
+ run: |
54
+ python -m pip install project/[test]
55
+ python -m pytest project/ --cov --cov-config=project/pyproject.toml
56
+ python -m build -sw project/ -o ${{ env.LOCAL_PYPI }}
@@ -0,0 +1,187 @@
1
+ # System junks
2
+ *.[oa]
3
+ *~
4
+ .DS_Store
5
+ Thumbs.db
6
+
7
+ # Git
8
+ .git/
9
+
10
+ # General
11
+ target/
12
+ output/
13
+ build/
14
+ opt/
15
+ gen/
16
+ tmp/
17
+ temp/
18
+
19
+ # IDEs
20
+ *.iml
21
+ .idea/
22
+ .classpath
23
+ .project
24
+ .settings/
25
+ .vscode/
26
+
27
+
28
+ # Byte-compiled / optimized / DLL files
29
+ __pycache__/
30
+ *.py[cod]
31
+ *$py.class
32
+
33
+ # C extensions
34
+ *.so
35
+
36
+ # Distribution / packaging
37
+ .Python
38
+ build/
39
+ develop-eggs/
40
+ dist/
41
+ downloads/
42
+ eggs/
43
+ .eggs/
44
+ lib/
45
+ lib64/
46
+ parts/
47
+ sdist/
48
+ var/
49
+ wheels/
50
+ share/python-wheels/
51
+ *.egg-info/
52
+ .installed.cfg
53
+ *.egg
54
+ MANIFEST
55
+
56
+ # PyInstaller
57
+ # Usually these files are written by a python script from a template
58
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
59
+ *.manifest
60
+ *.spec
61
+
62
+ # Installer logs
63
+ pip-log.txt
64
+ pip-delete-this-directory.txt
65
+
66
+ # Unit test / coverage reports
67
+ htmlcov/
68
+ .tox/
69
+ .nox/
70
+ .coverage
71
+ .coverage.*
72
+ .cache
73
+ nosetests.xml
74
+ coverage.xml
75
+ *.cover
76
+ *.py,cover
77
+ .hypothesis/
78
+ .pytest_cache/
79
+ cover/
80
+
81
+ # Translations
82
+ *.mo
83
+ *.pot
84
+
85
+ # Django stuff:
86
+ *.log
87
+ local_settings.py
88
+ db.sqlite3
89
+ db.sqlite3-journal
90
+
91
+ # Flask stuff:
92
+ instance/
93
+ .webassets-cache
94
+
95
+ # Scrapy stuff:
96
+ .scrapy
97
+
98
+ # Sphinx documentation
99
+ docs/_build/
100
+
101
+ # PyBuilder
102
+ .pybuilder/
103
+ target/
104
+
105
+ # Jupyter Notebook
106
+ .ipynb_checkpoints
107
+
108
+ # IPython
109
+ profile_default/
110
+ ipython_config.py
111
+
112
+ # pyenv
113
+ # For a library or package, you might want to ignore these files since the code is
114
+ # intended to run in multiple environments; otherwise, check them in:
115
+ # .python-version
116
+
117
+ # pipenv
118
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
119
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
120
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
121
+ # install all needed dependencies.
122
+ #Pipfile.lock
123
+
124
+ # poetry
125
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
126
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
127
+ # commonly ignored for libraries.
128
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
129
+ #poetry.lock
130
+
131
+ # pdm
132
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
133
+ #pdm.lock
134
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
135
+ # in version control.
136
+ # https://pdm.fming.dev/#use-with-ide
137
+ .pdm.toml
138
+
139
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
140
+ __pypackages__/
141
+
142
+ # Celery stuff
143
+ celerybeat-schedule
144
+ celerybeat.pid
145
+
146
+ # SageMath parsed files
147
+ *.sage.py
148
+
149
+ # Environments
150
+ .env
151
+ .venv
152
+ env/
153
+ venv/
154
+ ENV/
155
+ env.bak/
156
+ venv.bak/
157
+
158
+ # Spyder project settings
159
+ .spyderproject
160
+ .spyproject
161
+
162
+ # Rope project settings
163
+ .ropeproject
164
+
165
+ # mkdocs documentation
166
+ /site
167
+
168
+ # mypy
169
+ .mypy_cache/
170
+ .dmypy.json
171
+ dmypy.json
172
+
173
+ # Pyre type checker
174
+ .pyre/
175
+
176
+ # pytype static type analyzer
177
+ .pytype/
178
+
179
+ # Cython debug symbols
180
+ cython_debug/
181
+
182
+ # PyCharm
183
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
184
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
185
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
186
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
187
+ #.idea/
@@ -0,0 +1 @@
1
+ include VERSION
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.1
2
+ Name: iker-python-setup
3
+ Version: 1.0.999999
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Python :: 3.11
6
+ Classifier: Programming Language :: Python :: 3.12
7
+ Requires-Python: <3.13,>=3.11
8
+ Requires-Dist: setuptools~=72.0
9
+ Requires-Dist: setuptools-scm~=8.0
10
+ Provides-Extra: test
11
+ Requires-Dist: pytest-cov~=5.0; extra == "test"
12
+ Requires-Dist: pytest-order~=1.2; extra == "test"
13
+ Requires-Dist: pytest~=8.3; extra == "test"
@@ -0,0 +1,25 @@
1
+ # Iker's Python Setup Module
2
+
3
+ ## Build and Deploy
4
+
5
+ ### Using Conda
6
+
7
+ We recommend using Conda. You need to install Anaconda packages from
8
+ the [official site](https://www.anaconda.com/products/distribution)
9
+
10
+ Create a Conda environment and install the modules and their dependencies in it
11
+
12
+ ```shell
13
+ conda create -n iker python=3.12
14
+ conda activate iker
15
+
16
+ pip install .
17
+
18
+ conda deactivate
19
+ ```
20
+
21
+ To remove the existing Conda environment (and create a brand new one)
22
+
23
+ ```shell
24
+ conda env remove -n iker
25
+ ```
@@ -0,0 +1 @@
1
+ 1.0
@@ -0,0 +1,45 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools~=72.0",
4
+ "setuptools-scm~=8.0",
5
+ ]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [project]
9
+ name = "iker-python-setup"
10
+ dynamic = ["version"]
11
+ requires-python = ">=3.11,<3.13"
12
+ classifiers = [
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ ]
17
+ dependencies = [
18
+ "setuptools~=72.0",
19
+ "setuptools-scm~=8.0",
20
+ ]
21
+
22
+ [project.optional-dependencies]
23
+ test = [
24
+ "pytest-cov~=5.0",
25
+ "pytest-order~=1.2",
26
+ "pytest~=8.3",
27
+ ]
28
+
29
+ [tool.setuptools]
30
+ package-dir = { "" = "src" }
31
+ zip-safe = false
32
+ include-package-data = true
33
+
34
+ [tool.setuptools.packages.find]
35
+ where = ["src"]
36
+ namespaces = true
37
+
38
+ [tool.pytest.ini_options]
39
+ pythonpath = ["test"]
40
+
41
+ [tool.coverage.run]
42
+ include = [
43
+ "src/iker/setup/*",
44
+ "*/site-packages/iker/setup/*",
45
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,9 @@
1
+ import os
2
+ import sys
3
+
4
+ sys.path.append(os.path.join(os.getcwd(), "src"))
5
+
6
+ from iker.setup import setup
7
+
8
+ if __name__ == "__main__":
9
+ setup()
@@ -0,0 +1,92 @@
1
+ import importlib.metadata
2
+ import os
3
+
4
+ try:
5
+ __version__ = importlib.metadata.version("iker-python-setup")
6
+ except importlib.metadata.PackageNotFoundError:
7
+ __version__ = "unknown"
8
+
9
+ __all__ = [
10
+ "version_string_local",
11
+ "version_string_scm",
12
+ "version_string",
13
+ "setup",
14
+ ]
15
+
16
+
17
+ def read_version_tuple(cwd: str | None = None,
18
+ *,
19
+ default: (int, int, int) = (0, 1, 0),
20
+ version_file: str = "VERSION",
21
+ patch_env_var: str = "BUILD_NUMBER",
22
+ strict: bool = False) -> (int, int, int):
23
+ if cwd is None:
24
+ cwd = os.getcwd()
25
+ try:
26
+ with open(os.path.join(cwd, version_file)) as fh:
27
+ major_str, minor_str, *patch_strs = fh.read().strip().split(".")
28
+
29
+ major = max(0, int(major_str))
30
+ minor = max(0, int(minor_str))
31
+
32
+ patch_str = patch_strs[0] if len(patch_strs) > 0 else os.getenv(patch_env_var)
33
+ patch = 999999 if patch_str is None else min(999999, max(0, int(patch_str)))
34
+
35
+ return major, minor, patch
36
+ except Exception as e:
37
+ if strict:
38
+ raise e
39
+ return default
40
+
41
+
42
+ def version_string_local(cwd: str | None = None) -> str:
43
+ major, minor, patch = read_version_tuple(cwd, strict=True)
44
+ return f"{major}.{minor}.{patch}"
45
+
46
+
47
+ def version_string_scm(cwd: str | None = None) -> str:
48
+ from setuptools_scm import ScmVersion
49
+ from setuptools_scm import get_version
50
+ if cwd is None:
51
+ cwd = os.getcwd()
52
+
53
+ def find_scm_root(cd: str) -> str:
54
+ cd = os.path.abspath(cd)
55
+ for item in os.listdir(cd):
56
+ if os.path.isdir(os.path.join(cd, item)) and item == ".git":
57
+ return cd
58
+ pd = os.path.dirname(cd)
59
+ if pd == cd:
60
+ raise ValueError("Cannot find SCM root properly")
61
+ return find_scm_root(pd)
62
+
63
+ def version_scheme_callback(scm_version: ScmVersion) -> str:
64
+ major, minor, patch = read_version_tuple(cwd, strict=True)
65
+ if scm_version.branch == "master" or os.getenv("GIT_BRANCH", "") == "master":
66
+ return f"{major}.{minor}.{patch}"
67
+ return f"{major}.{minor}.{0}"
68
+
69
+ def local_scheme_callback(scm_version: ScmVersion) -> str:
70
+ if scm_version.branch == "master" or os.getenv("GIT_BRANCH", "") == "master":
71
+ return ""
72
+ node_datetime = scm_version.time.strftime("%Y%m%d%H%M%S")
73
+ if scm_version.dirty:
74
+ return scm_version.format_with("+{node_datetime}.post{distance}.{node}.dirty", node_datetime=node_datetime)
75
+ return scm_version.format_with("+{node_datetime}.post{distance}.{node}", node_datetime=node_datetime)
76
+
77
+ return get_version(root=find_scm_root(cwd),
78
+ version_scheme=version_scheme_callback,
79
+ local_scheme=local_scheme_callback,
80
+ normalize=True)
81
+
82
+
83
+ def version_string(cwd: str | None = None):
84
+ try:
85
+ return version_string_scm(cwd)
86
+ except Exception:
87
+ return version_string_local(cwd)
88
+
89
+
90
+ def setup():
91
+ from setuptools import setup
92
+ setup(version=version_string())
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.1
2
+ Name: iker-python-setup
3
+ Version: 1.0.999999
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Python :: 3.11
6
+ Classifier: Programming Language :: Python :: 3.12
7
+ Requires-Python: <3.13,>=3.11
8
+ Requires-Dist: setuptools~=72.0
9
+ Requires-Dist: setuptools-scm~=8.0
10
+ Provides-Extra: test
11
+ Requires-Dist: pytest-cov~=5.0; extra == "test"
12
+ Requires-Dist: pytest-order~=1.2; extra == "test"
13
+ Requires-Dist: pytest~=8.3; extra == "test"
@@ -0,0 +1,17 @@
1
+ .editorconfig
2
+ .gitignore
3
+ MANIFEST.in
4
+ README.md
5
+ VERSION
6
+ pyproject.toml
7
+ setup.py
8
+ .github/workflows/python-app.yml
9
+ src/iker/setup/__init__.py
10
+ src/iker_python_setup.egg-info/PKG-INFO
11
+ src/iker_python_setup.egg-info/SOURCES.txt
12
+ src/iker_python_setup.egg-info/dependency_links.txt
13
+ src/iker_python_setup.egg-info/not-zip-safe
14
+ src/iker_python_setup.egg-info/requires.txt
15
+ src/iker_python_setup.egg-info/top_level.txt
16
+ test/iker_tests/__init__.py
17
+ test/iker_tests/iker_test.py
@@ -0,0 +1,7 @@
1
+ setuptools~=72.0
2
+ setuptools-scm~=8.0
3
+
4
+ [test]
5
+ pytest-cov~=5.0
6
+ pytest-order~=1.2
7
+ pytest~=8.3
@@ -0,0 +1,15 @@
1
+ import os
2
+
3
+ __all__ = [
4
+ "module_directory",
5
+ "source_directory",
6
+ "test_directory",
7
+ "resources_directory",
8
+ "temporary_directory",
9
+ ]
10
+
11
+ module_directory: str = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
12
+ source_directory: str = os.path.abspath(os.path.join(module_directory, "src"))
13
+ test_directory: str = os.path.abspath(os.path.join(module_directory, "test"))
14
+ resources_directory: str = os.path.abspath(os.path.join(module_directory, "resources"))
15
+ temporary_directory: str = os.path.abspath(os.path.join(module_directory, "tmp"))
@@ -0,0 +1,13 @@
1
+ import unittest
2
+
3
+ from iker_tests import *
4
+
5
+
6
+ class Test(unittest.TestCase):
7
+
8
+ def test(self):
9
+ self.assertIsNotNone(module_directory)
10
+ self.assertIsNotNone(source_directory)
11
+ self.assertIsNotNone(test_directory)
12
+ self.assertIsNotNone(resources_directory)
13
+ self.assertIsNotNone(temporary_directory)