From cc520f529866c601445dd32202297856ffef4692 Mon Sep 17 00:00:00 2001 From: Xiaokui Shu Date: Wed, 18 Oct 2023 13:04:03 -0400 Subject: [PATCH 1/4] fix build path in release workflow --- .github/workflows/publish-to-pypi.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index f6bbfc0f..301b02dd 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -35,6 +35,7 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: | - build --sdist --wheel --outdir dist/ . + # `build` is installed as a Python module, not a standalone commandline + python -m build --sdist --wheel --outdir dist/ . twine check dist/* twine upload --verbose dist/* From 84865723abcedcb03e61139b0a9dfea5e9d2ead1 Mon Sep 17 00:00:00 2001 From: Xiaokui Shu Date: Wed, 18 Oct 2023 20:16:57 +0000 Subject: [PATCH 2/4] add readme field to pyproject.toml --- packages/kestrel_analytics_docker/pyproject.toml | 1 + packages/kestrel_analytics_python/pyproject.toml | 1 + packages/kestrel_core/pyproject.toml | 1 + packages/kestrel_datasource_stixbundle/pyproject.toml | 1 + packages/kestrel_datasource_stixshifter/pyproject.toml | 1 + packages/kestrel_jupyter/pyproject.toml | 1 + 6 files changed, 6 insertions(+) diff --git a/packages/kestrel_analytics_docker/pyproject.toml b/packages/kestrel_analytics_docker/pyproject.toml index bee64046..05302319 100644 --- a/packages/kestrel_analytics_docker/pyproject.toml +++ b/packages/kestrel_analytics_docker/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_analytics_docker" version = "1.8.0" description = "Kestrel Docker Analytics Interface" +readme = "../../README.md" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_analytics_python/pyproject.toml b/packages/kestrel_analytics_python/pyproject.toml index 5b5e1b2f..4ce8338b 100644 --- a/packages/kestrel_analytics_python/pyproject.toml +++ b/packages/kestrel_analytics_python/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_analytics_python" version = "1.8.0" description = "Kestrel Python Analytics Interface" +readme = "../../README.md" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_core/pyproject.toml b/packages/kestrel_core/pyproject.toml index 2ba1ec03..0628c285 100644 --- a/packages/kestrel_core/pyproject.toml +++ b/packages/kestrel_core/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_core" version = "1.8.0" description = "Kestrel Threat Hunting Language" +readme = "../../README.md" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_datasource_stixbundle/pyproject.toml b/packages/kestrel_datasource_stixbundle/pyproject.toml index 89322cd4..e748a3b5 100644 --- a/packages/kestrel_datasource_stixbundle/pyproject.toml +++ b/packages/kestrel_datasource_stixbundle/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_datasource_stixbundle" version = "1.8.0" description = "Kestrel STIX-bundle Datasource Interface" +readme = "../../README.md" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_datasource_stixshifter/pyproject.toml b/packages/kestrel_datasource_stixshifter/pyproject.toml index 6682e9ad..1591f929 100644 --- a/packages/kestrel_datasource_stixshifter/pyproject.toml +++ b/packages/kestrel_datasource_stixshifter/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_datasource_stixshifter" version = "1.8.0" description = "Kestrel STIX-shifter Datasource Interface" +readme = "../../README.md" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_jupyter/pyproject.toml b/packages/kestrel_jupyter/pyproject.toml index 7fb2690c..ec283a90 100644 --- a/packages/kestrel_jupyter/pyproject.toml +++ b/packages/kestrel_jupyter/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_jupyter" version = "1.8.0" description = "Kestrel Jupyter Kernel" +readme = "../../README.md" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ From a2b60a67e5fc58c2257acde5c878be6e0913dd62 Mon Sep 17 00:00:00 2001 From: Xiaokui Shu Date: Wed, 18 Oct 2023 22:25:41 -0400 Subject: [PATCH 3/4] prepare pypi publishing --- docs/installation/runtime.rst | 6 +++--- packages/kestrel_analytics_docker/README.rst | 1 + packages/kestrel_analytics_docker/pyproject.toml | 2 +- packages/kestrel_analytics_python/README.rst | 1 + packages/kestrel_analytics_python/pyproject.toml | 2 +- packages/kestrel_core/README.rst | 1 + packages/kestrel_core/pyproject.toml | 2 +- packages/kestrel_datasource_stixbundle/README.rst | 1 + packages/kestrel_datasource_stixbundle/pyproject.toml | 2 +- packages/kestrel_datasource_stixshifter/README.rst | 1 + packages/kestrel_datasource_stixshifter/pyproject.toml | 2 +- packages/kestrel_jupyter/README.rst | 1 + packages/kestrel_jupyter/pyproject.toml | 2 +- 13 files changed, 15 insertions(+), 9 deletions(-) create mode 120000 packages/kestrel_analytics_docker/README.rst create mode 120000 packages/kestrel_analytics_python/README.rst create mode 120000 packages/kestrel_core/README.rst create mode 120000 packages/kestrel_datasource_stixbundle/README.rst create mode 120000 packages/kestrel_datasource_stixshifter/README.rst create mode 120000 packages/kestrel_jupyter/README.rst diff --git a/docs/installation/runtime.rst b/docs/installation/runtime.rst index 203d59bf..c220f264 100644 --- a/docs/installation/runtime.rst +++ b/docs/installation/runtime.rst @@ -131,7 +131,7 @@ any newly opened terminal. .. code-block:: console - $ pip install kestrel_jupyter + $ pip install kestrel-jupyter $ kestrel_jupyter_setup .. tab-item:: Nightly Built @@ -179,7 +179,7 @@ invoke any of them: - Start a Kestrel session in Python directly. See more at :doc:`../source/kestrel.session`. - - Use `magic command`_ in iPython environment. Check `kestrel_jupyter`_ package for usage. + - Use `magic command`_ in iPython environment. Check `kestrel-jupyter`_ package for usage. What's to Do Next ================= @@ -193,7 +193,7 @@ What's to Do Next .. _Python virtual environment: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ .. _Xcode: https://developer.apple.com/xcode/ .. _kestrel-lang: http://github.com/opencybersecurityalliance/kestrel-lang -.. _kestrel_jupyter: http://github.com/opencybersecurityalliance/kestrel-jupyter +.. _kestrel-jupyter: http://github.com/opencybersecurityalliance/kestrel-jupyter .. _firepit: http://github.com/opencybersecurityalliance/firepit .. _Jupyter Notebook: https://jupyter.org/ .. _magic command: https://ipython.readthedocs.io/en/stable/interactive/magics.html diff --git a/packages/kestrel_analytics_docker/README.rst b/packages/kestrel_analytics_docker/README.rst new file mode 120000 index 00000000..c768ff7d --- /dev/null +++ b/packages/kestrel_analytics_docker/README.rst @@ -0,0 +1 @@ +../../README.rst \ No newline at end of file diff --git a/packages/kestrel_analytics_docker/pyproject.toml b/packages/kestrel_analytics_docker/pyproject.toml index 05302319..1f668918 100644 --- a/packages/kestrel_analytics_docker/pyproject.toml +++ b/packages/kestrel_analytics_docker/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_analytics_docker" version = "1.8.0" description = "Kestrel Docker Analytics Interface" -readme = "../../README.md" +readme = "README.rst" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_analytics_python/README.rst b/packages/kestrel_analytics_python/README.rst new file mode 120000 index 00000000..c768ff7d --- /dev/null +++ b/packages/kestrel_analytics_python/README.rst @@ -0,0 +1 @@ +../../README.rst \ No newline at end of file diff --git a/packages/kestrel_analytics_python/pyproject.toml b/packages/kestrel_analytics_python/pyproject.toml index 4ce8338b..f0ef25ad 100644 --- a/packages/kestrel_analytics_python/pyproject.toml +++ b/packages/kestrel_analytics_python/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_analytics_python" version = "1.8.0" description = "Kestrel Python Analytics Interface" -readme = "../../README.md" +readme = "README.rst" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_core/README.rst b/packages/kestrel_core/README.rst new file mode 120000 index 00000000..c768ff7d --- /dev/null +++ b/packages/kestrel_core/README.rst @@ -0,0 +1 @@ +../../README.rst \ No newline at end of file diff --git a/packages/kestrel_core/pyproject.toml b/packages/kestrel_core/pyproject.toml index 0628c285..d6a3921d 100644 --- a/packages/kestrel_core/pyproject.toml +++ b/packages/kestrel_core/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_core" version = "1.8.0" description = "Kestrel Threat Hunting Language" -readme = "../../README.md" +readme = "README.rst" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_datasource_stixbundle/README.rst b/packages/kestrel_datasource_stixbundle/README.rst new file mode 120000 index 00000000..c768ff7d --- /dev/null +++ b/packages/kestrel_datasource_stixbundle/README.rst @@ -0,0 +1 @@ +../../README.rst \ No newline at end of file diff --git a/packages/kestrel_datasource_stixbundle/pyproject.toml b/packages/kestrel_datasource_stixbundle/pyproject.toml index e748a3b5..37a29fa2 100644 --- a/packages/kestrel_datasource_stixbundle/pyproject.toml +++ b/packages/kestrel_datasource_stixbundle/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_datasource_stixbundle" version = "1.8.0" description = "Kestrel STIX-bundle Datasource Interface" -readme = "../../README.md" +readme = "README.rst" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_datasource_stixshifter/README.rst b/packages/kestrel_datasource_stixshifter/README.rst new file mode 120000 index 00000000..c768ff7d --- /dev/null +++ b/packages/kestrel_datasource_stixshifter/README.rst @@ -0,0 +1 @@ +../../README.rst \ No newline at end of file diff --git a/packages/kestrel_datasource_stixshifter/pyproject.toml b/packages/kestrel_datasource_stixshifter/pyproject.toml index 1591f929..18d5fc7d 100644 --- a/packages/kestrel_datasource_stixshifter/pyproject.toml +++ b/packages/kestrel_datasource_stixshifter/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_datasource_stixshifter" version = "1.8.0" description = "Kestrel STIX-shifter Datasource Interface" -readme = "../../README.md" +readme = "README.rst" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ diff --git a/packages/kestrel_jupyter/README.rst b/packages/kestrel_jupyter/README.rst new file mode 120000 index 00000000..c768ff7d --- /dev/null +++ b/packages/kestrel_jupyter/README.rst @@ -0,0 +1 @@ +../../README.rst \ No newline at end of file diff --git a/packages/kestrel_jupyter/pyproject.toml b/packages/kestrel_jupyter/pyproject.toml index ec283a90..58c61db4 100644 --- a/packages/kestrel_jupyter/pyproject.toml +++ b/packages/kestrel_jupyter/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "kestrel_jupyter" version = "1.8.0" description = "Kestrel Jupyter Kernel" -readme = "../../README.md" +readme = "README.rst" requires-python = ">=3.8" license = {text = "Apache 2.0 License"} maintainers = [ From bfbdfc677d95dd2cabcb4e8bbd24f6e127d3561a Mon Sep 17 00:00:00 2001 From: Xiaokui Shu Date: Wed, 18 Oct 2023 22:41:17 -0400 Subject: [PATCH 4/4] update package release flow --- CHANGELOG.rst | 56 ++++++++------------------------------------------ GOVERNANCE.rst | 11 +++++----- 2 files changed, 13 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1d271c02..fb42dc43 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,63 +6,23 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog`_. -2023-10-18 -========== - -kestrel_core 1.8.0 ------------------- +1.8.0 (2023-10-18) +================== Added -^^^^^ +----- - Hide credentials in debug log - Type checking in kestrel/utils.py +- Merge ``opencybersecurityalliance/kestrel-jupyter`` repo into this repo as the umbralla package for Kestrel Changed -^^^^^^^ +------- - Package name from ``kestrel-lang`` to ``kestrel-core`` to peel off components into standalone packages -- Installation documentation - -kestrel_jupyter 1.8.0 ---------------------- - -Added -^^^^^ - -- Merge ``opencybersecurityalliance/kestrel-jupyter`` repo into this repo as the umbralla package for Kestrel - -kestrel_datasource_stixbundle 1.8.0 ------------------------------------ - -Added -^^^^^ - -- Establish standalone package with its own ``pyproject.toml`` - -kestrel_datasource_stixshifter 1.8.0 ------------------------------------- - -Added -^^^^^ - -- Establish standalone package with its own ``pyproject.toml`` - -kestrel_analytics_python 1.8.0 ------------------------------- - -Added -^^^^^ - -- Establish standalone package with its own ``pyproject.toml`` - -kestrel_analytics_docker 1.8.0 ------------------------------- - -Added -^^^^^ - -- Establish standalone package with its own ``pyproject.toml`` +- Establish two standalone datasource interface packages +- Establish two standalone analytics interface packages +- Update installation documentation 1.7.6 (2023-09-25) ================== diff --git a/GOVERNANCE.rst b/GOVERNANCE.rst index c804be3f..b35593d9 100644 --- a/GOVERNANCE.rst +++ b/GOVERNANCE.rst @@ -51,16 +51,15 @@ A maintainer should release a new Kestrel runtime (PyPI package name: ``kestre-l #. Sync the local git repo to the latest of the ``develop`` branch. #. Update the ``version`` field in ``packages/*/pyproject.toml`` for any package that has been updated. #. Update dependencies in ``packages/*/pyproject.toml``. - #. Always bump the ``version`` field in ``packages/kestrel_jupyter/pyproject.toml`` (the umbralla package). - #. Add changes in ``CHANGELOG.rst`` under a new date section. - #. Add changes of each package under a new version subsection of the date section. + #. Always bump the ``version`` field in ``packages/kestrel_jupyter/pyproject.toml`` (the umbrella package). + #. Add changes in ``CHANGELOG.rst`` under the umbrella package version. #. Add new contributors to ``AUTHORS.rst`` if any. - #. Commit the updates with `` NIGHTLY`` as the message. + #. Commit the updates with the umbrella package version as the message. #. Push the local ``develop`` branch to remote. #. Graduate code to the ``release`` branch - #. Open a PR to merge the ``develop`` branch to the ``release`` branch. Use `` TO RELEASE`` as the PR title. + #. Open a PR to merge the ``develop`` branch to the ``release`` branch. Use umbrella package version as the PR title. #. Merge the PR. @@ -68,7 +67,7 @@ A maintainer should release a new Kestrel runtime (PyPI package name: ``kestre-l #. Go to the release page and click *Draft a new release*. - #. Type the version number as the new tag to create. + #. Type the umbrella package version number as the new tag to create. #. Choose ``release`` branch as the *Target*.