同步操作将从 连享会/stata_kernel 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
All types of contributions are welcome. You can:
The best way to get your issue solved is to provide a minimal, complete, verifiable example. In order to submit a bug report, click here and fill out the template.
The following seems to be the easiest way to debug internals:
from stata_kernel.kernel import StataKernel
from stata_kernel.code_manager import CodeManager
kernel = StataKernel()
session = kernel.stata
# If on windows, may be helpful
session.show_gui()
code = 'sysuse auto, clear'
cm = CodeManager(code)
text_to_run, md5, text_to_exclude = cm.get_text(kernel.conf, session)
rc, res = session.do(
text_to_run, md5, text_to_exclude=text_to_exclude, display=False)
Tests are contained in the Python files in the tests/
folder. The test_stata_lexer.py
and test_mata_lexer.py
files run automated tests on the code Stata kernel uses to parse user input.
To run the tests, you need to install pytest
and jupyter_kernel_test
:
pip install pytest jupyter_kernel_test
From the project root, to run all tests, run
pytest tests/
To run just the non-automated tests that depend on having Stata available locally, run
pytest tests/test_kernel.py
For each of the above, if you get a ModuleNotFound
error, you may need to use python -m pytest tests/
.
First install mkdocs
:
pip install mkdocs mkdocs-material
Then cd
to the docs folder:
cd docs/
Then to serve the documentation website in real time, run
mkdocs serve
This starts a web server on localhost, usually on port 8000. So you can open your web browser and type in localhost:8000
, click Enter, and you should see the website. This will update in real time as you write more documentation.
To create a static website, run:
mkdocs build
To publish the website to the documentation website (if you have repository push access) run:
mkdocs gh-deploy
To increment version numbers, run one of:
bumpversion major
bumpversion minor
bumpversion patch
in the project's root directory. This will also automatically create a git commit and tag of the version. Then push with:
git push origin master --tags
so that Github sees the newest tag.
Then to release:
python setup.py sdist bdist_wheel
python -m twine upload dist/stata_kernel-VERSION*
and put in the PyPI username and password.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。