Skip to content
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

Dev 846 release ci fix #1216

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

yambottle
Copy link
Contributor

@yambottle yambottle commented Mar 15, 2025

Please check comments in the diff to help you review, please resolve conversations if nothing wrong.

Change Summary:

  • pyproject.toml
  • development.yaml -> test.yaml + release.yaml
    • release.yaml will call docs.yaml
  • added github actions workflow lint pre-commit hook
  • added missing flake8 syntax check

@@ -28,7 +28,7 @@
// "runServices": [],
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
"shutdownAction": "stopCompose",
"onCreateCommand": "python3 -m pip install -q -e .[test]",
"onCreateCommand": "python3 -m pip install -q -e .[dev]",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

pyproject optional_dependency added dev and test for different use case

@@ -0,0 +1,125 @@
name: Release
on:
workflow_dispatch:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Manual trigger + optionally release to TestPyPI

asset_name: pip-datajoint-${{env.DJ_VERSION}}.tar.gz
asset_content_type: application/gzip
# only release docs when a release is published
call-publish-docs:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Consolidated previous duplicated doc release step, this is going to reuse the manual doc release workflow

@@ -0,0 +1,53 @@
name: Test
on:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test will be triggered on every push and open/update PR

- uses: actions/checkout@v4
- uses: actions/setup-python@v5
# enforce the same check as pre-commit
# but only run important checks
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reuse pre-commit, but only run codespell, black and flake8 - doing exactly the same as previous development.yaml

tqdm(desc="Processes: ", total=nkeys)
if display_progress
else contextlib.nullcontext()
) as progress_bar:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once changed pyproject.toml:require-python from >=3.8 to 3.9, black fails on format check, so update the format here, and only here

@yambottle yambottle added the enhancement Indicates new feature requests label Mar 15, 2025
]

[project.urls]
Homepage = "https://datajoint.com/docs"
Documentation = "https://datajoint.com/docs"
Repository = "https://github.com/datajoint/datajoint-python"
"Bug Tracker" = "https://github.com/datajoint/datajoint-python/issues"
Changelog = "https://github.com/datajoint/datajoint-python/blob/master/CHANGELOG.md"
"Release Notes" = "https://github.com/datajoint/datajoint-python/releases"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are going to use git-diff as changelog like minio/minio-py@7.2.14...7.2.15, and it will be at the end of a release note like https://github.com/minio/minio-py/releases, so putting release notes here instead

run: |
DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
RELEASE_BODY=$(python -c \
'print(open("./CHANGELOG.md").read().split("\n\n")[1].split("\n", 1)[1])' \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Changelog in release note" isn't ready yet, will be available very soon. If release before that, please update changelog as usual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant