-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate project setup to pixi #10
Changes from 4 commits
f68e7f9
c1ea4f2
fe3e3da
c17ea94
a0a84af
facce45
aa3f199
be9931d
2da7c5d
d386089
5b10dc3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML linguist-generated=true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: "weekly" | ||
interval: monthly | ||
groups: | ||
actions: | ||
patterns: | ||
- "*" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
- name: Setup pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1 | ||
with: | ||
environments: build | ||
- name: Build package | ||
run: | | ||
pixi run -e build python -m build --no-isolation . | ||
- name: Upload package | ||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | ||
with: | ||
name: artifact | ||
path: dist/* | ||
if-no-files-found: error | ||
|
||
release: | ||
name: Publish package | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
environment: pypi | ||
steps: | ||
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: Publish package on PyPi | ||
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mscolnick you need to add OIDC trusted publishers in the pypi package for this package to be able to upload tokenless. https://pypi.org/manage/project/mkdocs-marimo/settings/publishing/ Owner: marimo-team There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thank you will do! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,47 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
max-parallel: 5 | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
# Just to slim down the test matrix: | ||
exclude: | ||
- python-version: 3.9 | ||
os: ubuntu-latest | ||
- python-version: 3.10 | ||
os: macos-latest | ||
- python-version: 3.10 | ||
os: windows-latest | ||
env: | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312 | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
- name: Setup pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
environments: ${{ matrix.env }} | ||
- name: Install repository | ||
run: | | ||
python -m pip install --upgrade hatch | ||
pixi run -e ${{ matrix.env }} postinstall | ||
- name: Run tests | ||
run: | | ||
hatch run +py=${{ matrix.py || matrix.python-version }} test:test | ||
shell: bash | ||
pixi run -e ${{ matrix.env }} test | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
- name: Setup pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1 | ||
with: | ||
python-version: '3.12' | ||
- name: Install Python dependencies | ||
environments: lint default | ||
- name: Lint | ||
run: | | ||
python -m pip install hatch | ||
- name: Check style | ||
if: always() | ||
run: hatch run style:check | ||
pixi run lint-all-check |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ site/ | |
.pytest_cache/ | ||
.venv/ | ||
__pycache__/ | ||
.pixi |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Installation | ||
|
||
Add `mkdocs-marimo` to your `pyproject.toml` or `requirements.txt` file or simply install it using `pip`. The plugin will automatically install the minimally required version of `mkdocs` it is compatible with. | ||
Add `mkdocs-marimo` to your `pyproject.toml` or `requirements.txt` file or simply install it using `pip` or `pixi`. The plugin will automatically install the minimally required version of `mkdocs` it is compatible with. | ||
|
||
```bash | ||
pip install mkdocs-marimo | ||
# or | ||
pixi add mkdocs-marimo | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
version = "0.1.0" | ||
import importlib.metadata | ||
import warnings | ||
|
||
try: | ||
__version__ = importlib.metadata.version(__name__) | ||
except importlib.metadata.PackageNotFoundError as e: | ||
warnings.warn(f"Could not determine version of {__name__}\n{e!s}", stacklevel=2) | ||
__version__ = "unknown" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mscolnick you need to create a github environment for this: https://github.com/marimo-team/mkdocs-marimo/settings/environments/new
feel free to add proper protection rules there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might be gated until i make this repo public, but will do once we make it public.