{"id":18751819,"url":"https://github.com/lemurpwned/cmtj","last_synced_at":"2026-04-25T00:02:43.607Z","repository":{"id":37753571,"uuid":"199270164","full_name":"LemurPwned/cmtj","owner":"LemurPwned","description":"Simulate multilayer magnetic structures in Python and C++","archived":false,"fork":false,"pushed_at":"2026-04-22T22:14:35.000Z","size":56955,"stargazers_count":47,"open_issues_count":11,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-23T00:18:48.122Z","etag":null,"topics":["condensed-phase-simulations","electronics","llg","llgs","macrospin","magnetics","mtj","python","spintronics","stochastic-differential-equations"],"latest_commit_sha":null,"homepage":"https://lemurpwned.github.io/cmtj/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LemurPwned.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2019-07-28T09:57:45.000Z","updated_at":"2026-04-06T21:04:45.000Z","dependencies_parsed_at":"2023-09-24T01:32:01.705Z","dependency_job_id":"08c860e2-ee6e-41b6-8732-a8cec7bb5706","html_url":"https://github.com/LemurPwned/cmtj","commit_stats":{"total_commits":402,"total_committers":5,"mean_commits":80.4,"dds":"0.15671641791044777","last_synced_commit":"e56ae4ca37830b9917b247f5ad910df4bc23cab4"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/LemurPwned/cmtj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemurPwned%2Fcmtj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemurPwned%2Fcmtj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemurPwned%2Fcmtj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemurPwned%2Fcmtj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LemurPwned","download_url":"https://codeload.github.com/LemurPwned/cmtj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemurPwned%2Fcmtj/sbom","scorecard":{"id":83410,"data":{"date":"2025-08-11","repo":{"name":"github.com/LemurPwned/cmtj","commit":"7606deef6a9313b0ca4e21b223e673b9f0a8243b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"18 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docker-image.yml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/package-release.yml:11","Warn: no topLevel permission defined: .github/workflows/python-test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker-image.yml:16"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker-image.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/docker-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/docker-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/docker-image.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:119: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-test.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/python-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-test.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/python-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-test.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/python-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-test.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/LemurPwned/cmtj/python-test.yml/master?enable=pin","Warn: containerImage not pinned by hash: docker/Dockerfile:1: pin your Docker image by updating python:3.9 to python:3.9@sha256:754dbbaf5fe730bb2460efb3300293c62c222f74fbf8534ed23691c617c9609b","Warn: containerImage not pinned by hash: docker/Dockerfile.app:1: pin your Docker image by updating python:3.11 to python:3.11@sha256:c1239cb82bf08176c4c90421ab425a1696257b098d9ce21e68de9319c255a47d","Warn: containerImage not pinned by hash: docker/Dockerfile.wheel:1: pin your Docker image by updating python:3.9 to python:3.9@sha256:754dbbaf5fe730bb2460efb3300293c62c222f74fbf8534ed23691c617c9609b","Warn: pipCommand not pinned by hash: docker/Dockerfile:7","Warn: pipCommand not pinned by hash: docker/Dockerfile:9-11","Warn: pipCommand not pinned by hash: docker/Dockerfile.app:8-11","Warn: pipCommand not pinned by hash: docker/Dockerfile.app:8-11","Warn: pipCommand not pinned by hash: docker/Dockerfile.wheel:7","Warn: pipCommand not pinned by hash: docker/Dockerfile.wheel:17-18","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:56","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:57","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:65","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:66","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:93","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:94","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:101","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:102","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:110","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:111","Warn: pipCommand not pinned by hash: .github/workflows/python-test.yml:45","Warn: pipCommand not pinned by hash: .github/workflows/python-test.yml:46","Warn: pipCommand not pinned by hash: .github/workflows/python-test.yml:47","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   0 out of  19 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2019-156 / GHSA-xp76-357g-9wqq","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114","Warn: Project is vulnerable to: PYSEC-2013-22 / GHSA-27x4-j476-jp5f","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: PYSEC-2024-153 / GHSA-rxff-vr5r-8cj5","Warn: Project is vulnerable to: PYSEC-2017-74"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T06:22:39.700Z","repository_id":37753571,"created_at":"2025-08-15T06:22:39.701Z","updated_at":"2025-08-15T06:22:39.701Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32245154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["condensed-phase-simulations","electronics","llg","llgs","macrospin","magnetics","mtj","python","spintronics","stochastic-differential-equations"],"created_at":"2024-11-07T17:17:28.857Z","updated_at":"2026-04-25T00:02:43.594Z","avatar_url":"https://github.com/LemurPwned.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg style=\"float: right; max-width: 50px;\" src=\"assets/icon.svg\"\u003e\n\n# CMTJ\n\n[![PyPI](https://github.com/LemurPwned/cmtj/actions/workflows/cibuildwheel.yml/badge.svg?branch=master)](https://github.com/LemurPwned/cmtj/actions/workflows/cibuildwheel.yml)\n[![pages-build-deployment](https://github.com/LemurPwned/cmtj/actions/workflows/pages/pages-build-deployment/badge.svg?branch=gh-pages)](https://github.com/LemurPwned/cmtj/actions/workflows/pages/pages-build-deployment)\n[![Version](https://img.shields.io/pypi/v/cmtj)](https://pypi.org/project/cmtj/)\n[![License](https://img.shields.io/pypi/l/cmtj.svg)](https://github.com/LemurPwned/cmtj/blob/master/LICENSE)\n[![Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://cmtj-app.streamlit.app/spectrum)\n[![PyPI Downloads](https://static.pepy.tech/badge/cmtj/month)](https://pepy.tech/projects/cmtj)\n\n## Table of contents\n\n- [CMTJ](#cmtj)\n  - [Table of contents](#table-of-contents)\n  - [Short description](#short-description)\n    - [What can you simulate?](#what-can-you-simulate)\n  - [Web GUI](#web-gui)\n  - [Quickstart](#quickstart)\n    - [Installation :rocket:](#installation-rocket)\n    - [Extra dependencies](#extra-dependencies)\n  - [Documentation and examples](#documentation-and-examples)\n  - [Extensions](#extensions)\n  - [Citing](#citing)\n- [Development](#development)\n  - [Acknowledgements](#acknowledgements)\n  - [Contributions](#contributions)\n  - [Docker](#docker)\n  - [Precommit](#precommit)\n  - [Documentation builds](#documentation-builds)\n\n## Short description\n\nThe `cmtj` name may be misleading -- the MTJ (Magnetic Tunnel Junctions) are not the only structures that may be simulated.\nThe library allows for macromagnetic simulation of various multilayer spintronic structures. The package uses C++ implementation of (s)LLGS (stochastic Landau-Lifschitz-Gilbert-Slonczewski) equation with various field contributions included for instance: anisotropy, interlayer exchange coupling, demagnetisation, dipole fields etc.\nIt is also possible to connect devices in parallel or in series to have electrically coupled arrays.\n\n### What can you simulate?\n\nBelow is a brief list of examples (it's not exhaustive! Check the docs for more).\n\n**Magnetic devices:**\n\n- Magnetic Tunnel Junctions\n  - Voltage-Driven Magnetic Tunnel Junctions\n  - Spin-Torque Oscillators\n  - VCMA sensors and devices\n  - Magnetic Tunnel Junction Arrays\n- SOT devices\n  - Current-Driven SOT\n- Advanced device coupling\n- Reservoirs (dipole coupling)\n- Electrically coupled MTJs\n- Base equations\n  - Landau-Lifshitz-Gilbert-Slonczewski equation\n  - Stochastic Landau-Lifshitz-Gilbert-Slonczewski equation\n  - Landau-Lifshitz-Gilbert-Bloch equation\n- Domain wall motion\n\n**Experimental methods:**\n\nSome of the experimental methods available:\n\n- PIMM\n- Spin-Diode\n- CIMS\n- R(H), M(H)\n\n## Web GUI\n\nCheck out the [streamlit hosted demo here](https://cmtj-app.streamlit.app/spectrum). \nYou can simulate:\n\n* PIMM spectra and Spin-Diode spectra\n* Try some optimization fitting\n* Fit multi-domain or multi-level M(H) or R(H) loops in [Domain mode](https://cmtj-app.streamlit.app)\n\nLet us know if you have any issues with the demo.\n\n## Quickstart\n\n#### Installation :rocket:\n\nThe recommended way is to use the `pip` package manager and virtualenv (or conda).\nInstallation is as easy as doing:\n\n**Recommendation**\nUse the following flagswhen installing/compiling from start. They provide optimimum performance, \nbut even without them, `cmtj` is very fast.\n\n```bash\nexport LDFLAGS=\"-O3\"\nexport CXXFLAGS=\"-O3 -march=native -ffast-math\"\n```\n\n1. With `virtualenv` (recommended):\n\n```bash\n$(bash) python -m venv .my-venv\n$(bash) source .my-venv/bin/activate\n$(.my-venv) python -m pip install cmtj\n```\n\n2. Straight from `pip`:\n\n```bash\npython3 -m pip install cmtj\n```\n\n3. Straight from source:\n\n```bash\npython3 -m pip install git+https://github.com/LemurPwned/cmtj.git\n```\n\n4. Clone the repository:\n\n```bash\ngit clone --recurse-submodules https://github.com/LemurPwned/cmtj.git\npython3 -m pip install .\n```\nif your git is older, you may need to use `--recursive` instead of `--recurse-submodules`.\n\n#### Extra dependencies\n\nThe package requires (if `utils` subpackage is used):\n\n```\n- numpy\n- scipy\n- matplotlib\n```\n\n## Documentation and examples\n\nDocumentation: [https://lemurpwned.github.io/cmtj](https://lemurpwned.github.io/cmtj).\nThere are many examples available, check out the [examples section in the docs](https://lemurpwned.github.io/cmtj/experimental-methods/introduction/)\n\n## Extensions\n\nThere's a GUI version available! If you wish to conduct a subset of simulations, mainly for experimental modelling, please see the _PyMag_ project. It uses CMTJ as a backend for fast computation.\n\n## Citing\n\nWe would appreciate citing either of the listed work if you decide to use the project or using the cite button on the right hand side panel of the repository:\n\n[**cmtj: Simulation package for analysis of multilayer spintronic devices**](https://www.nature.com/articles/s41524-023-01002-x)\n\n```bibtex\n@article{mojsiejuk_cmtj_2023,\n\ttitle = {cmtj: Simulation package for analysis of multilayer spintronic devices},\n\tvolume = {9},\n\tissn = {2057-3960},\n\turl = {https://www.nature.com/articles/s41524-023-01002-x},\n\tdoi = {10.1038/s41524-023-01002-x},\n\tpages = {54},\n\tnumber = {1},\n\tjournaltitle = {npj Comput Mater},\n\tauthor = {Mojsiejuk, Jakub and Ziętek, Sławomir and Grochot, Krzysztof and Skowroński, Witold and Stobiecki, Tomasz},\n\tdate = {2023-04-06},\n}\n```\n\n# Development\n\n## Acknowledgements\n\nMany thanks to professor Jack Sankey for his help with the development of thermal contributions, with inspiration from the [macrospinmob project](https://github.com/Spinmob/macrospinmob).\n\n## Contributions\n\nAll contributions are welcome, please leave an issue if you've encountered any trouble with setup or running the library.\n\n## Docker\n\nIn the `docker` directory there's a `Dockerfile` that can be used to build a docker image with the library installed.\n`Dockerfile.app` is used for streamlit development.\n\n## Precommit\n\nThere's a `.pre-commit-config.yaml` that does some basic python and cpp lints and checks. More static analysis to come in the future.\nThis may be run with:\n\n```\npre-commit run -v\n```\n\nor\n\n```\npre-commit run -a (or --files core/* cmtj/*)\n```\n\n## Documentation builds\n\n**Note**\nFor stub generation add `__init__.py` to the `cmtj` directory.\n\nThere are a couple of stages to building the documentation\n\n1. Build Doxygen documentation\n   ```\n   doxygen Doxyfile\n   ```\n   This is mostly for the C++ documentation. Future changes may couple C++ and Python docs.\n2. Build stubs\n   The stubgen is `pybind11-stubgen` or `mypy stubgen` with the latter being preferred now.\n   Before running the stubgen, make sure to install the package with:\n   ```\n   python3 -m pip install .\n   ```\n   avoid using `-e` flag as it may cause issues with the stubgen.\n   Then to generate, for instance, `Stack` module stubs we can do:\n   ```\n   stubgen -m cmtj.stack -o target-stub-dir/\n   ```\n   or\n   ```\n   python3 -c \"import mypy.stubgen; mypy.stubgen.main(['-p', 'cmtj.stack', '-o', 'target-stub-dir/'])\"\n   ```\n   More info here: https://mypy.readthedocs.io/en/stable/stubgen.html.\n3. Parse stubs to Markdown.\n   This stage is done by running: `python3 docs/docgen.py `\n   The deployment of the documentation is done via:\n   ```bash\n   mkdocs gh-deploy\n   ```\n   But first, worth a check:\n   ```bash\n   mkdocs serve\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemurpwned%2Fcmtj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemurpwned%2Fcmtj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemurpwned%2Fcmtj/lists"}