-
Notifications
You must be signed in to change notification settings - Fork 93
feat: dj.Top order inheritance, part_integrity parameter, and storage fixes #1312
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
Changes from 11 commits
9f28b10
9737dee
c2a2eae
cabdb74
dacf4ac
ae5fd68
fbc4cad
d778e4f
4f4a924
344de9b
2100487
1fdfb3e
307983a
272fcb5
b8645f8
27391c7
f195110
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 |
|---|---|---|
| @@ -1,37 +1,89 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "**" # every branch | ||
| - "!gh-pages" # exclude gh-pages branch | ||
| - "!stage*" # exclude branches beginning with stage | ||
| - "**" | ||
| - "!gh-pages" | ||
| - "!stage*" | ||
| paths: | ||
| - "src/datajoint" | ||
| - "tests" | ||
| - "src/datajoint/**" | ||
| - "tests/**" | ||
| - "pyproject.toml" | ||
| - "docker-compose.yaml" | ||
| - ".github/workflows/test.yaml" | ||
| pull_request: | ||
| branches: | ||
| - "**" # every branch | ||
| - "!gh-pages" # exclude gh-pages branch | ||
| - "!stage*" # exclude branches beginning with stage | ||
| - "**" | ||
| - "!gh-pages" | ||
| - "!stage*" | ||
| paths: | ||
| - "src/datajoint" | ||
| - "tests" | ||
| - "src/datajoint/**" | ||
| - "tests/**" | ||
| - "pyproject.toml" | ||
| - "docker-compose.yaml" | ||
| - ".github/workflows/test.yaml" | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| py_ver: ["3.10", "3.11", "3.12", "3.13"] | ||
| mysql_ver: ["8.0"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{matrix.py_ver}} | ||
|
|
||
| - name: Install system dependencies | ||
| run: sudo apt-get update && sudo apt-get install -y graphviz | ||
|
|
||
| - name: Start services | ||
| run: docker compose up -d db minio --wait | ||
|
||
| env: | ||
| MYSQL_VER: ${{ matrix.mysql_ver }} | ||
|
|
||
| - name: Set up Python ${{ matrix.py_ver }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{matrix.py_ver}} | ||
| - name: Integration test | ||
| python-version: ${{ matrix.py_ver }} | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install -e ".[test]" | ||
|
||
|
|
||
| - name: Run tests | ||
| env: | ||
| MYSQL_VER: ${{matrix.mysql_ver}} | ||
| run: | | ||
| pip install -e ".[test]" | ||
| pytest --cov-report term-missing --cov=datajoint tests | ||
| DJ_USE_EXTERNAL_CONTAINERS: "1" | ||
| DJ_HOST: 127.0.0.1 | ||
| DJ_PORT: 3306 | ||
| DJ_USER: root | ||
| DJ_PASS: password | ||
| S3_ENDPOINT: 127.0.0.1:9000 | ||
| S3_ACCESS_KEY: datajoint | ||
| S3_SECRET_KEY: datajoint | ||
| run: pytest --cov-report term-missing --cov=datajoint tests -v | ||
|
|
||
| - name: Stop services | ||
| if: always() | ||
| run: docker compose down | ||
|
|
||
| # Unit tests run without containers (faster feedback) | ||
| unit-tests: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| py_ver: ["3.11"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.py_ver }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.py_ver }} | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install -e ".[test]" | ||
|
|
||
| - name: Run unit tests | ||
| run: pytest tests/unit -v | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| # DataJoint 2.0 Release Memo | ||
|
|
||
| ## PyPI Release Process | ||
|
|
||
| ### Steps | ||
|
|
||
| 1. **Run "Manual Draft Release" workflow** on GitHub Actions | ||
| 2. **Edit the draft release**: | ||
| - Change release name to `Release 2.0.0` | ||
| - Change tag to `v2.0.0` | ||
| 3. **Publish the release** | ||
| 4. Automation will: | ||
| - Update `version.py` to `2.0.0` | ||
| - Build and publish to PyPI | ||
| - Create PR to merge version update back to master | ||
|
|
||
| ### Version Note | ||
|
|
||
| The release drafter computes version from the previous tag (`v0.14.6`), so it would generate `0.14.7` or `0.15.0`. You must **manually edit** the release name to include `2.0.0`. | ||
|
|
||
| The regex on line 42 of `post_draft_release_published.yaml` extracts version from the release name: | ||
| ```bash | ||
| VERSION=$(echo "${{ github.event.release.name }}" | grep -oP '\d+\.\d+\.\d+') | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Conda-Forge Release Process | ||
|
|
||
| DataJoint has a [conda-forge feedstock](https://github.com/conda-forge/datajoint-feedstock). | ||
|
|
||
| ### How Conda-Forge Updates Work | ||
|
|
||
| Conda-forge has **automated bots** that detect new PyPI releases and create PRs automatically: | ||
|
|
||
| 1. **You publish to PyPI** (via the GitHub release workflow) | ||
| 2. **regro-cf-autotick-bot** detects the new version within ~24 hours | ||
| 3. **Bot creates a PR** to the feedstock with updated version and hash | ||
| 4. **Maintainers review and merge** (you're listed as a maintainer) | ||
| 5. **Package builds automatically** for all platforms | ||
|
|
||
| ### Manual Update (if bot doesn't trigger) | ||
|
|
||
| If the bot doesn't create a PR, manually update the feedstock: | ||
|
|
||
| 1. **Fork** [conda-forge/datajoint-feedstock](https://github.com/conda-forge/datajoint-feedstock) | ||
|
|
||
| 2. **Edit `recipe/meta.yaml`**: | ||
| ```yaml | ||
| {% set version = "2.0.0" %} | ||
|
|
||
| package: | ||
| name: datajoint | ||
| version: {{ version }} | ||
|
|
||
| source: | ||
| url: https://pypi.io/packages/source/d/datajoint/datajoint-{{ version }}.tar.gz | ||
| sha256: <NEW_SHA256_HASH> | ||
|
|
||
| build: | ||
| number: 0 # Reset to 0 for new version | ||
| ``` | ||
|
|
||
| 3. **Get the SHA256 hash**: | ||
| ```bash | ||
| curl -sL https://pypi.org/pypi/datajoint/2.0.0/json | jq -r '.urls[] | select(.packagetype=="sdist") | .digests.sha256' | ||
| ``` | ||
|
|
||
| 4. **Update license** (important for 2.0!): | ||
| ```yaml | ||
| about: | ||
| license: Apache-2.0 # Changed from LGPL-2.1-only | ||
| license_file: LICENSE | ||
| ``` | ||
|
|
||
| 5. **Submit PR** to the feedstock | ||
|
|
||
| ### Action Items for 2.0 Release | ||
|
|
||
| 1. **First**: Publish to PyPI via GitHub release (name it "Release 2.0.0") | ||
| 2. **Wait**: ~24 hours for conda-forge bot to detect | ||
| 3. **Check**: [datajoint-feedstock PRs](https://github.com/conda-forge/datajoint-feedstock/pulls) for auto-PR | ||
| 4. **Review**: Ensure license changed from LGPL to Apache-2.0 | ||
| 5. **Merge**: As maintainer, approve and merge the PR | ||
|
|
||
| ### Timeline | ||
|
|
||
| | Step | When | | ||
| |------|------| | ||
| | PyPI release | Day 0 | | ||
| | Bot detects & creates PR | Day 0-1 | | ||
| | Review & merge PR | Day 1-2 | | ||
| | Conda-forge package available | Day 1-2 | | ||
|
|
||
| ### Verification | ||
|
|
||
| After release: | ||
| ```bash | ||
| conda search datajoint -c conda-forge | ||
| # Should show 2.0.0 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Maintainers | ||
|
|
||
| - @datajointbot | ||
| - @dimitri-yatsenko | ||
| - @drewyangdev | ||
| - @guzman-raphael | ||
| - @ttngu207 | ||
|
|
||
| ## Links | ||
|
|
||
| - [datajoint-feedstock on GitHub](https://github.com/conda-forge/datajoint-feedstock) | ||
| - [datajoint on Anaconda.org](https://anaconda.org/conda-forge/datajoint) | ||
| - [datajoint on PyPI](https://pypi.org/project/datajoint/) |
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.
why do we need to do this?
pixi run -e testshould install graphviz automatically