congrads 0.2.0__tar.gz → 1.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.
Files changed (63) hide show
  1. congrads-1.0.1/.gitignore +249 -0
  2. congrads-1.0.1/.gitlab-ci.yml +117 -0
  3. congrads-1.0.1/.pylintrc +399 -0
  4. congrads-1.0.1/.readthedocs.yaml +23 -0
  5. congrads-1.0.1/.vscode/extensions.json +20 -0
  6. congrads-1.0.1/.vscode/settings.json +68 -0
  7. congrads-1.0.1/DIAGRAM.md +135 -0
  8. congrads-1.0.1/PKG-INFO +208 -0
  9. congrads-1.0.1/README.md +166 -0
  10. congrads-1.0.1/README_DEV.md +9 -0
  11. congrads-1.0.1/congrads/__init__.py +29 -0
  12. congrads-1.0.1/congrads/checkpoints.py +232 -0
  13. congrads-1.0.1/congrads/constraints.py +919 -0
  14. congrads-1.0.1/congrads/core.py +597 -0
  15. congrads-1.0.1/congrads/datasets.py +499 -0
  16. congrads-1.0.1/congrads/descriptor.py +130 -0
  17. congrads-1.0.1/congrads/metrics.py +211 -0
  18. congrads-1.0.1/congrads/networks.py +114 -0
  19. congrads-1.0.1/congrads/requirements.txt +6 -0
  20. congrads-1.0.1/congrads/transformations.py +139 -0
  21. congrads-1.0.1/congrads/utils.py +710 -0
  22. congrads-1.0.1/congrads.egg-info/PKG-INFO +208 -0
  23. congrads-1.0.1/congrads.egg-info/SOURCES.txt +48 -0
  24. congrads-1.0.1/congrads.egg-info/requires.txt +6 -0
  25. congrads-1.0.1/docs/Makefile +20 -0
  26. congrads-1.0.1/docs/_static/VanBaelen2023.bib +13 -0
  27. congrads-1.0.1/docs/_static/congrads_export.png +0 -0
  28. congrads-1.0.1/docs/_static/congrads_export.svg +52 -0
  29. congrads-1.0.1/docs/_static/congrads_favicon.png +0 -0
  30. congrads-1.0.1/docs/_static/congrads_favicon.svg +80 -0
  31. congrads-1.0.1/docs/_static/convergence_illustration.gif +0 -0
  32. congrads-1.0.1/docs/api.rst +76 -0
  33. congrads-1.0.1/docs/concepts.rst +224 -0
  34. congrads-1.0.1/docs/conf.py +77 -0
  35. congrads-1.0.1/docs/index.rst +87 -0
  36. congrads-1.0.1/docs/make.bat +35 -0
  37. congrads-1.0.1/docs/start.rst +126 -0
  38. congrads-1.0.1/examples/BiasCorrection.py +149 -0
  39. congrads-1.0.1/examples/FamilyIncome.py +210 -0
  40. congrads-1.0.1/examples/NoisySines.py +252 -0
  41. congrads-1.0.1/notebooks/BiasCorrection.ipynb +232 -0
  42. congrads-1.0.1/notebooks/FamilyIncome.ipynb +293 -0
  43. {congrads-0.2.0 → congrads-1.0.1}/pyproject.toml +11 -5
  44. congrads-1.0.1/tests/congrads/test_utils.py +80 -0
  45. congrads-1.0.1/tests/examples/test_BiasCorrection.py +150 -0
  46. congrads-1.0.1/tests/examples/test_FamilyIncome.py +211 -0
  47. congrads-0.2.0/PKG-INFO +0 -222
  48. congrads-0.2.0/README.md +0 -183
  49. congrads-0.2.0/congrads/__init__.py +0 -22
  50. congrads-0.2.0/congrads/constraints.py +0 -389
  51. congrads-0.2.0/congrads/core.py +0 -225
  52. congrads-0.2.0/congrads/datasets.py +0 -195
  53. congrads-0.2.0/congrads/descriptor.py +0 -50
  54. congrads-0.2.0/congrads/metrics.py +0 -49
  55. congrads-0.2.0/congrads/networks.py +0 -90
  56. congrads-0.2.0/congrads/utils.py +0 -310
  57. congrads-0.2.0/congrads.egg-info/PKG-INFO +0 -222
  58. congrads-0.2.0/congrads.egg-info/SOURCES.txt +0 -16
  59. congrads-0.2.0/congrads.egg-info/requires.txt +0 -3
  60. {congrads-0.2.0 → congrads-1.0.1}/LICENSE +0 -0
  61. {congrads-0.2.0 → congrads-1.0.1}/congrads.egg-info/dependency_links.txt +0 -0
  62. {congrads-0.2.0 → congrads-1.0.1}/congrads.egg-info/top_level.txt +0 -0
  63. {congrads-0.2.0 → congrads-1.0.1}/setup.cfg +0 -0
@@ -0,0 +1,249 @@
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
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
163
+
164
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
165
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
166
+
167
+ # User-specific stuff
168
+ .idea/**/workspace.xml
169
+ .idea/**/tasks.xml
170
+ .idea/**/usage.statistics.xml
171
+ .idea/**/dictionaries
172
+ .idea/**/shelf
173
+
174
+ # AWS User-specific
175
+ .idea/**/aws.xml
176
+
177
+ # Generated files
178
+ .idea/**/contentModel.xml
179
+
180
+ # Sensitive or high-churn files
181
+ .idea/**/dataSources/
182
+ .idea/**/dataSources.ids
183
+ .idea/**/dataSources.local.xml
184
+ .idea/**/sqlDataSources.xml
185
+ .idea/**/dynamic.xml
186
+ .idea/**/uiDesigner.xml
187
+ .idea/**/dbnavigator.xml
188
+
189
+ # Gradle
190
+ .idea/**/gradle.xml
191
+ .idea/**/libraries
192
+
193
+ # Gradle and Maven with auto-import
194
+ # When using Gradle or Maven with auto-import, you should exclude module files,
195
+ # since they will be recreated, and may cause churn. Uncomment if using
196
+ # auto-import.
197
+ # .idea/artifacts
198
+ # .idea/compiler.xml
199
+ # .idea/jarRepositories.xml
200
+ # .idea/modules.xml
201
+ # .idea/*.iml
202
+ # .idea/modules
203
+ # *.iml
204
+ # *.ipr
205
+
206
+ # CMake
207
+ cmake-build-*/
208
+
209
+ # Mongo Explorer plugin
210
+ .idea/**/mongoSettings.xml
211
+
212
+ # File-based project format
213
+ *.iws
214
+
215
+ # IntelliJ
216
+ out/
217
+
218
+ # mpeltonen/sbt-idea plugin
219
+ .idea_modules/
220
+
221
+ # JIRA plugin
222
+ atlassian-ide-plugin.xml
223
+
224
+ # Cursive Clojure plugin
225
+ .idea/replstate.xml
226
+
227
+ # SonarLint plugin
228
+ .idea/sonarlint/
229
+
230
+ # Crashlytics plugin (for Android Studio and IntelliJ)
231
+ com_crashlytics_export_strings.xml
232
+ crashlytics.properties
233
+ crashlytics-build.properties
234
+ fabric.properties
235
+
236
+ # Editor-based Rest Client
237
+ .idea/httpRequests
238
+
239
+ # Android studio 3.1+ serialized cache file
240
+ .idea/caches/build_file_checksums.ser
241
+
242
+ ## Custom
243
+ lightning_logs/
244
+ datasets/
245
+ runs/
246
+ logs/
247
+ checkpoints/
248
+ plots/
249
+ scripts/
@@ -0,0 +1,117 @@
1
+ workflow:
2
+ rules:
3
+ # Run build, test, format stages if commit is made to main branch
4
+ # Sync and deploymeny stages require additional checks
5
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
6
+ - if: '$CI_COMMIT_TAG'
7
+
8
+ default:
9
+ image: python:3.11
10
+ cache:
11
+ paths:
12
+ - .cache/pip
13
+ before_script:
14
+ - python --version
15
+ - pip install --upgrade pip
16
+
17
+ stages:
18
+ - build
19
+ - test
20
+ - format
21
+ - sync
22
+ - publish
23
+
24
+ variables:
25
+ PIP_CACHE_DIR: '$CI_PROJECT_DIR/.cache/pip'
26
+
27
+ build:
28
+ stage: build
29
+ parallel:
30
+ matrix:
31
+ - PYTHON_VERSION: ['3.9', '3.10', '3.11', '3.12']
32
+ image: python:${PYTHON_VERSION}
33
+ script:
34
+ - pip install build
35
+ - python -m build
36
+ artifacts:
37
+ paths:
38
+ - dist/
39
+
40
+ docs:
41
+ stage: build
42
+ script:
43
+ - pip install sphinx sphinx-rtd-theme
44
+ - pip install -e .
45
+ - cd docs
46
+ - make html
47
+ - mv _build/html/ ../public/
48
+ artifacts:
49
+ paths:
50
+ - public/
51
+
52
+ test:
53
+ stage: test
54
+ parallel:
55
+ matrix:
56
+ - PYTHON_VERSION: ['3.9', '3.10', '3.11', '3.12']
57
+ image: python:${PYTHON_VERSION}
58
+ script:
59
+ - pip install pytest
60
+ - pip install dist/*.whl
61
+ - pytest tests/
62
+
63
+ lint:
64
+ stage: format
65
+ script:
66
+ - pip install pylint
67
+ - pylint congrads/
68
+
69
+ sync:
70
+ stage: sync
71
+ script:
72
+ # 0. Install requirements
73
+ - apt-get update && apt-get install -y rsync
74
+
75
+ # 1. Set up SSH
76
+ - mkdir -p ~/.ssh
77
+ - echo "$GITHUB_DEPLOY_KEY" | base64 -d > ~/.ssh/id_rsa
78
+ - chmod 600 ~/.ssh/id_rsa
79
+ - eval "$(ssh-agent -s)"
80
+ - cat ~/.ssh/id_rsa
81
+ - ssh-add -v ~/.ssh/id_rsa
82
+
83
+ # 2. Add GitHub to known hosts
84
+ - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
85
+
86
+ # 3. Configure Git
87
+ - git config --global user.name "$GITLAB_USER_NAME"
88
+ - git config --global user.email "$GITLAB_USER_EMAIL"
89
+
90
+ # 4. Clone the GitHub repo (without history)
91
+ - git clone git@github.com:ML-KULeuven/congrads.git ~/congrads-github/
92
+
93
+ # 5. Install rsync and copy files from GitLab repository to GitHub repo, including hidden files
94
+ - rsync -av --exclude='.git' --exclude='.gitlab-ci.yml' ./ ~/congrads-github/
95
+
96
+ # 6. Stage, commit and tag the files
97
+ - cd ~/congrads-github/
98
+ - git add .
99
+ - git commit -m "Release $CI_COMMIT_TAG"
100
+ - git tag "$CI_COMMIT_TAG"
101
+
102
+ # 7. Push to GitHub, creating the main branch if it doesn't exist
103
+ - git push origin main
104
+ - git push origin "$CI_COMMIT_TAG"
105
+
106
+ rules:
107
+ # Only sync if commit is tagged
108
+ - if: '$CI_COMMIT_TAG'
109
+
110
+ publish:
111
+ stage: publish
112
+ script:
113
+ - pip install twine
114
+ - TWINE_PASSWORD=${PYPI_TOKEN} TWINE_USERNAME=__token__ python -m twine upload dist/*
115
+ rules:
116
+ # Only publish if commit is tagged
117
+ - if: '$CI_COMMIT_TAG'