smoothcon 0.0.3__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 @@
1
+ *.ipynb linguist-vendored
@@ -0,0 +1,36 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ pre-commit:
11
+ runs-on: ubuntu-latest
12
+ timeout-minutes: 10
13
+
14
+ steps:
15
+ - name: Check out repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v5
20
+
21
+ - name: "Set up Python"
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version-file: "pyproject.toml"
25
+
26
+ - name: Set up R
27
+ uses: r-lib/actions/setup-r@v2
28
+ with:
29
+ r-version: 'release'
30
+ use-public-rspm: true
31
+
32
+ - name: Install Package
33
+ run: uv sync --locked --group dev
34
+
35
+ - name: Run pre-commit
36
+ run: uv run pre-commit run -a
@@ -0,0 +1,42 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ workflow_dispatch: # trigger manually from GitHub UI
13
+ release:
14
+ types: [published]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ deploy:
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - name: Check out repository
25
+ uses: actions/checkout@v4
26
+
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@v5
29
+
30
+ - name: "Set up Python"
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version-file: "pyproject.toml"
34
+
35
+ - name: Build package
36
+ run: uv build
37
+
38
+ - name: Publish package
39
+ uses: pypa/gh-action-pypi-publish@v1.5.0
40
+ with:
41
+ user: __token__
42
+ password: ${{ secrets.PYPI_UPLOAD }}
@@ -0,0 +1,50 @@
1
+ name: notebooks
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ pytest:
9
+ runs-on: ubuntu-latest
10
+ timeout-minutes: 10
11
+
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.13"]
15
+
16
+ steps:
17
+ - name: Check out repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Install uv and set the python version
21
+ uses: astral-sh/setup-uv@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ enable-cache: true
25
+ cache-dependency-glob: "uv.lock"
26
+
27
+
28
+ - name: Set up R
29
+ uses: r-lib/actions/setup-r@v2
30
+ with:
31
+ r-version: 'release'
32
+ use-public-rspm: true
33
+
34
+ - name: Install Package
35
+ run: uv sync --locked --group dev
36
+
37
+ - name: Add R shared libraries to LD_LIBRARY_PATH
38
+ run: |
39
+ echo "LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):\$LD_LIBRARY_PATH" >> $GITHUB_ENV
40
+
41
+ - name: Debug R environment
42
+ run: |
43
+ echo "R_HOME=$(R RHOME)"
44
+ echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
45
+ find $(R RHOME) -name methods.so
46
+ find $(R RHOME) -name libR.so
47
+
48
+
49
+ - name: Run pytest
50
+ run: uv run pytest notebooks --nbval-lax --nbval-current-env
@@ -0,0 +1,70 @@
1
+ name: pytest
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ pytest:
9
+ runs-on: ubuntu-latest
10
+ timeout-minutes: 10
11
+
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.13"]
15
+
16
+ steps:
17
+ - name: Check out repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Install uv and set the python version
21
+ uses: astral-sh/setup-uv@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ enable-cache: true
25
+ cache-dependency-glob: "uv.lock"
26
+
27
+
28
+ - name: Set up R
29
+ uses: r-lib/actions/setup-r@v2
30
+ with:
31
+ r-version: 'release'
32
+ use-public-rspm: true
33
+
34
+ - name: Install Package
35
+ run: uv sync --locked --group dev
36
+
37
+ - name: Add R shared libraries to LD_LIBRARY_PATH
38
+ run: |
39
+ echo "LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):\$LD_LIBRARY_PATH" >> $GITHUB_ENV
40
+
41
+ - name: Debug R environment
42
+ run: |
43
+ echo "R_HOME=$(R RHOME)"
44
+ echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
45
+ find $(R RHOME) -name methods.so
46
+ find $(R RHOME) -name libR.so
47
+
48
+
49
+ - name: Run pytest
50
+ run: uv run pytest --cov=smoothcon
51
+
52
+ - name: Create coverage badge
53
+ uses: tj-actions/coverage-badge-py@v2
54
+ with:
55
+ output: tests/coverage.svg
56
+ overwrite: true
57
+
58
+ - name: Commit coverage.svg
59
+ run: |
60
+ git config --local user.name "github-actions[bot]"
61
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
62
+ git ls-remote | grep refs/heads/pytest-cov && git remote set-branches --add origin pytest-cov && git fetch
63
+ git add tests/coverage.svg
64
+ git diff --staged --quiet || git commit -m "Updated coverage.svg"
65
+
66
+ - name: Push coverage.svg
67
+ uses: ad-m/github-push-action@master
68
+ with:
69
+ github_token: ${{ secrets.GITHUB_TOKEN }}
70
+ branch: ${{ github.ref }}
@@ -0,0 +1,176 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc
175
+ .python-version
176
+ /.vscode
@@ -0,0 +1,30 @@
1
+ # see https://pre-commit.com for more information
2
+ # see https://pre-commit.com/hooks.html for more hooks
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v5.0.0
7
+ hooks:
8
+ - id: check-added-large-files
9
+ args: ["--maxkb=1000"]
10
+ - id: check-yaml
11
+ - id: end-of-file-fixer
12
+ - id: trailing-whitespace
13
+ - repo: https://github.com/astral-sh/ruff-pre-commit
14
+ rev: v0.11.8
15
+ hooks:
16
+ # Run the formatter.
17
+ - id: ruff-format
18
+ # Run the linter.
19
+ - id: ruff
20
+ args: [ --fix ]
21
+ - repo: local
22
+ hooks:
23
+ - id: mypy
24
+ name: mypy
25
+ entry: mypy
26
+ language: python
27
+ types_or: [python, pyi]
28
+ args: [--ignore-missing-imports, --scripts-are-modules]
29
+ require_serial: true
30
+ exclude: ^docs/