Skip to content

Commit

Permalink
Merge pull request #114 from 0Hughman0/0Hughman0-jupyter_cassini-inte…
Browse files Browse the repository at this point in the history
…gration

0 hughman0 jupyter cassini integration
  • Loading branch information
0Hughman0 committed Feb 19, 2024
2 parents 75b772c + 9fbfc29 commit 3a64b21
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 4 deletions.
51 changes: 49 additions & 2 deletions .github/workflows/build-and-test.yml
Expand Up @@ -5,9 +5,10 @@ name: Build and Test

on:
push:
branches: [ "main", "0.2.x", "0.1.x" ]
branches: [ "main", "*.*.*", "*.*.*-*" ]
pull_request:
branches: [ "main", "0.2.x", "0.1.x" ]
branches: [ "main", "*.*.*", "*.*.*-*" ]
workflow_dispatch:

permissions:
contents: read
Expand Down Expand Up @@ -47,3 +48,49 @@ jobs:
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

compat:
runs-on: ubuntu-latest
steps:
- name: checkout cassini
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: setup pip/ poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
- name: get jupyter_cassini version
run: |
poetry version -s
CURRENT_VERSION=$(poetry version -s | grep -Eo "[0-9]+\.[0-9]+")
CASSINI_MINOR_VERSION="$CURRENT_VERSION.x"
echo "$CASSINI_MINOR_VERSION"
echo "CASSINI_MINOR_VERSION=$CASSINI_MINOR_VERSION" >> "$GITHUB_ENV"
- uses: actions/checkout@v3
with:
repository: 0Hughman0/jupyter_cassini
path: jupyter_cassini
ref: ${{ env.CASSINI_MINOR_VERSION }}
- name: check it's there
run: |
export INSTALL_DIR="$(pwd)"
echo "$INSTALL_DIR"
ls -R
- name: Install jupyter_cassini
run: |
cd jupyter_cassini
python -m pip install -U "jupyterlab>=4.0.0,<5"
python -m pip install .[test]
- name: Install cassini
run: |
cd "$INSTALL_DIR"
poetry build
pip install dist/*.whl --force-reinstall
- name: run jupyter_cassini tests
run: |
cd jupyter_cassini
pip show cassini
pytest -vv jupyter_cassini_server
4 changes: 2 additions & 2 deletions .github/workflows/check-requires-bump.yml
Expand Up @@ -2,7 +2,7 @@ name: Check Requires Bump

on:
pull_request:
branches: [ "main", "0.2.x", "0.1.x" ]
branches: [ "main", "*.*.x" ]
paths:
- 'cassini/*'
- 'tests/*'
Expand Down Expand Up @@ -32,4 +32,4 @@ jobs:
if [[ $CURRENT_VERSION == $THIS_VERSION ]]; then
echo "Versions match but internal changes have been made, bump required"
exit 1
fi
fi
23 changes: 23 additions & 0 deletions doc_src/contributing.rst
Expand Up @@ -173,6 +173,29 @@ Python Docstrings should use the `numpy standard <https://numpydoc.readthedocs.i

TypeScript docstrings should follow the `TypeDoc standard <https://typedoc.org/guides/tags/>`_

GitHub Repos/ Release Cycle
---------------------------

**It's not worth worrying about getting these bits right, if you have a new feature or fix, just submit the PR and we can work around any versioning issues**

We have a branch for each minor version e.g. 0.1.x and 0.2.x, the head of which should always be the latest patch of that minor release.

For development, we specify the whole planned version number, but add -pre for pre-release e.g. 0.2.4-pre.

We then create branches for implementing specific features, and submit PRs into those pre-release branches as progress is made.

If necessary, we publish a pre-release version, but within pyproject.toml will have to use the poetry spec:

https://python-poetry.org/docs/cli/#version

e.g. the version would be something like 0.2.4a0 for the first pre-release.

Once we are happy with the pre-release, it can be merged (via PR) into the appropriate minor version branch and the pre-release branch can be deleted.

Then we can publish the new minor version using the create-release feature.

To publish a release or pre-release we use the publish feature in GitHub.

We create a new tag for that version, prepending with "v" e.g. `v1.2.3`, the tag should be on the branch, not on main.


0 comments on commit 3a64b21

Please sign in to comment.