{"id":16936890,"url":"https://github.com/opcode81/sensai","last_synced_at":"2025-03-17T07:32:37.144Z","repository":{"id":37414666,"uuid":"241440594","full_name":"opcode81/sensAI","owner":"opcode81","description":"The Python library for sensible AI.","archived":false,"fork":false,"pushed_at":"2025-02-24T02:15:29.000Z","size":6119,"stargazers_count":41,"open_issues_count":13,"forks_count":3,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-03-16T09:51:41.539Z","etag":null,"topics":["artificial-intelligence","machine-learning","python","transferlab"],"latest_commit_sha":null,"homepage":"https://opcode81.github.io/sensAI/docs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opcode81.png","metadata":{"files":{"readme":"README-dev.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-18T18:48:13.000Z","updated_at":"2025-02-24T02:08:45.000Z","dependencies_parsed_at":"2024-02-19T17:14:14.579Z","dependency_job_id":"63da623c-f651-46cc-8dfb-fd3e8580b289","html_url":"https://github.com/opcode81/sensAI","commit_stats":{"total_commits":807,"total_committers":11,"mean_commits":73.36363636363636,"dds":0.6456009913258984,"last_synced_commit":"a684c110190c76c06eb778b7f5ddddec70876a05"},"previous_names":["aai-institute/sensai","jambit/sensai","opcode81/sensai"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opcode81%2FsensAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opcode81%2FsensAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opcode81%2FsensAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opcode81%2FsensAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opcode81","download_url":"https://codeload.github.com/opcode81/sensAI/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243992563,"owners_count":20380230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","machine-learning","python","transferlab"],"created_at":"2024-10-13T20:58:11.610Z","updated_at":"2025-03-17T07:32:37.138Z","avatar_url":"https://github.com/opcode81.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Development Environment\n\nThis section explains the steps required to set up an environment in order to develop sensAI further.\n\n## Clone Large Files\n\nClone the full repo, including large files using [git LFS](https://git-lfs.github.com):\n\n    git lfs pull\n\nThis adds, in particular, data that is used in notebooks.\n\n## Create the Python Virtual Environment\n\nUse conda to set up the Python environment:\n\n    conda env create -f environment.py\n\nSolving the environment may take several minutes (but should ultimately work).\n\nNOTE: versions are mostly unpinned in the environment specification, because this facilitates conda dependency resolution. \nAlso, sensAI is intended to be compatible with *all* (newer) versions of the dependencies. \nIf it isn't, we need to specify  an upper version bound in `setup.py` (where it matters the most) as well as in `environment.yml`. \nCompatibility with old (pinned) versions and the latest versions is tested in the GitHub build (see below).\n\n# Build and Test Pipeline\n\nThe tests and docs build are executed in several environments:\n* `py_pinned_dependencies`: the \"regular\" test environment, where we test against the pinned dependencies \n  (by explicitly including `requirements.txt` with the pinned versions; this is also the environment in which we test the \n  execution of notebooks\n* `py_latest_dependencies`: the environment where we use the latest versions of all dependencies (except where we have  \n  identified an incompatibility; see `setup.py` definitions `DEPS_VERSION_LOWER_BOUND` and `DEPS_VERSION_UPPER_BOUND_EXCLUSIVE`); \n  by not including `requirements.txt`, we depend on the latest admissible versions according to `setup.py`\n* `py_backwardscompa`: a special environment with old versions of some critical dependences where we can test backwards compatibility\n  with persisted models of very old sensAI versions (that used older versions of the dependencies, e.g. sklearn)\n\n## Automated Tests\n\nThe tests can be locally via\n\n    sh run_pytest_tests.sh\n\n## Docs Build\n\nDocs are automatically created during the GitHub build.\n\nAll .rst files are auto-generated (by `build_scripts/update_docs.py`), with the exception of the root index file  `index.rst`.\n\n### Declaring Mock Imports for Dependencies\n\n**Attention**: Make sure that any sensAI dependencies are added to `docs/_config.yml` under `autodoc_mock_imports`. \nOtherwise, the docs build will fail.\n\n### Notebooks\n\n`docs/index.rst` includes the names of notebooks which reside in the `notebooks/` folder. They are not initially present in the `docs/` folder, but any notebooks whose names are referenced in `index.rst` will be executed and saved with outputs to the `docs/` folder by a test in `notebooks/test_notebooks.py`.\n\nTherefore, in order for the docs build to work (without temporarily removing the notebook inclusions), it is necessary to run the aforementioned test at least once via\n\n    sh run_pytest_notebooks.sh\n\nFor changes in notebooks to be reflected in the docs build, the test needs to be rerun.\n\n### Manually Running the Docs Build\n\nThe docs build can be run via \n\n    sh build-docs.sh\n\nResults will be stored in `docs/build/`.\n\n# Creating a New Release\n\n1. Switch to the `master` branch and merge any content the new release is to contain\n\n2. Bump the version that the new release shall change by using one of the following commands:\n\n   * `bumpversion patch --commit`\n   * `bumpversion minor --commit`\n   * `bumpversion major --commit`\n\n   This will create a new beta version.\n   \n   If you intend to release a beta version, you may change the build number via `bumpversion build --commit`. \n\n3. Push this version to github\n   `git push`\n   and then check whether tests pass and the build succeeds.\n\n4. If the build succeeded and you want to release this version, \n\n   * Set the release version and add the respective git tag:\n     `bumpversion release --commit --tag`\n     \n     (unless you want to publish a beta version, in which case you need to skip this command and instead create the git tag manually.)\n\n   * Push the new release:\n     * `git push`\n     * `git push --tags` (triggers PyPI release)\n\n   If it did not succeed and you need to fix stuff, \n\n   * Fix whatever you need to fix, adding commits\n   * Create a new test build via\n     `bumpversion build --commit`\n   * Continue with step 3.\n\n# Source-Level Directory Sync\n\n#### Details on the Synchonisation of a Source Directory within Your Project with the sensAI Repository\n\nWe support the synchronisation of a branch in the sensAI repository with a directory within the git repository of your project which is to contain the sensAI source code (i.e. alternative #2 from above) via a convenient scripting solution.\n\nWe consider two local repositories: the sensAI repository in directory `sensAI/` and your project in, for instance, directory `sensAI/../myprj/`. Let us assume that we want to synchronise branch `myprj-branch` in the sensAI repository with directory `myprj/src/sensai`.\n\n##### Synchronisation Script\n\nTo perform the synchronisation, please create a script as follows, which you should save to `sensAI/sync.py`:\n\n```python\nimport os\nfrom repo_dir_sync import LibRepo, OtherRepo\n\nr = LibRepo()\nr.add(OtherRepo(\"myprj\", \"myprj-branch\", os.path.join(\"..\", \"myprj\", \"src\", \"sensai\")))\nr.runMain()\n```\n\nYou can add multiple other repositories if you so desire in the future.\n\nFrom directory `sensAI/` you can use the script in order to \n\n* ***Push***: Update your project (i.e. `myprj/src/sensai`) with changes that were made in other projects by running `python sync.py myprj push`\n* ***Pull***: Update `myprj-branch` in the sensAI repository with changes made in your project by running `python sync.py myprj pull`\n\n##### Initialisation\n\nTo initialise the synchronisation, proceed as follows:\n\n1. Create the branch `myprj-branch` in the sensAI repository, i.e. in `sensAI/` run this command:\n   `git branch myprj-branch master`\n2. Create the directory `myprj/src/sensai`.\n3. Make sure you have a `.gitignore` file in `myprj/` with at least the following entries:\n\n       *.pyc\n       __pycache__\n       *.bak\n       *.orig\n\n   Otherwise you may end up with unwanted tracked files after a synchronisation.\n4. Perform the initial *push*, i.e. in `sensAI/` run this command:\n   `python sync.py myprj push`\n\n##### Things to Keep in Mind\n\n* Both *push* and *pull* operations are always performed based on the branch that is currently checked out in `myprj/`. The best practice is to only use one branch for synchronisation, e.g. master.\n* *Push* and *pull* operations will make git commits in both repositories. Should an operation ever go wrong/not do what you intended, use `git reset --hard` to go back to the commits before the operation in both repositories.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopcode81%2Fsensai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopcode81%2Fsensai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopcode81%2Fsensai/lists"}