Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ runs:
steps:
- name: Build distribution files
shell: bash
working-directory: packages/sdk/server-ai

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple options here. The js-core repository passes in the workspace directory and has individual CI build workflows for each project (https://github.com/launchdarkly/js-core/blob/main/.github/workflows/release-please.yml).

The dotnet repository uses shared workflows but sets a github_actions.env file for each package that is loaded during the CI / build process https://github.com/launchdarkly/dotnet-core/tree/main/pkgs/sdk/server-ai.

run: poetry build
- name: Hash build files for provenance
id: package-hashes
shell: bash
working-directory: ./dist
working-directory: packages/sdk/server-ai/dist
run: |
echo "package-hashes=$(sha256sum * | base64 -w0)" >> "$GITHUB_OUTPUT"
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439

- name: Install requirements
working-directory: packages/sdk/server-ai
run: poetry install

- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{env.PYPI_AUTH_TOKEN}}
packages-dir: packages/sdk/server-ai/dist/

release-provenance:
needs: [ 'build-publish' ]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{env.PYPI_AUTH_TOKEN}}
packages-dir: packages/sdk/server-ai/dist/

release-provenance:
needs: [ 'release-package' ]
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build:
post_create_environment:
- python -m pip install poetry
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
- cd packages/sdk/server-ai && VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs

sphinx:
builder: html
Expand Down
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ help: #! Show this help message

.PHONY: install
install:
@poetry install
@cd packages/sdk/server-ai && poetry install
Comment thread
edwinokonkwo marked this conversation as resolved.
Outdated

#
# Quality control checks
Expand All @@ -24,21 +24,20 @@ install:
.PHONY: test
test: #! Run unit tests
test: install
@poetry run pytest $(PYTEST_FLAGS)
@cd packages/sdk/server-ai && poetry run pytest $(PYTEST_FLAGS)

.PHONY: lint
lint: #! Run type analysis and linting checks
lint: install
@poetry run mypy ldai
@poetry run isort --check --atomic ldai
@poetry run pycodestyle ldai
@cd packages/sdk/server-ai && poetry run mypy src/ldai
@cd packages/sdk/server-ai && poetry run isort --check --atomic src/ldai
@cd packages/sdk/server-ai && poetry run pycodestyle src/ldai

#
# Documentation generation
#

.PHONY: docs
docs: #! Generate sphinx-based documentation
@poetry install --with docs
@cd docs
@poetry run $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@cd packages/sdk/server-ai && poetry install --with docs
@cd packages/sdk/server-ai && poetry run $(SPHINXBUILD) -M html "../../../$(SOURCEDIR)" "../../../$(BUILDDIR)" $(SPHINXOPTS) $(O)
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os
import sys

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../packages/sdk/server-ai/src'))

import ldai

Expand Down
1 change: 1 addition & 0 deletions js-core - copied from another project for reference
Comment thread
edwinokonkwo marked this conversation as resolved.
Outdated
Submodule js-core - copied from another project for reference added at 213fc7
1 change: 0 additions & 1 deletion ldai/__init__.py

This file was deleted.

Loading
Loading