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

Notebook metadata #115

Merged
merged 12 commits into from
Jan 3, 2023
37 changes: 17 additions & 20 deletions .github/workflows/license-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,31 @@ jobs:
with:
mode: fix

- name: List files changed
id: files-changed
shell: bash -l {0}
run: |
set -ex
export CHANGES=$(git status --porcelain | tee modified.log | wc -l)
cat modified.log
# Remove the log otherwise it will be committed
rm modified.log

echo "N_CHANGES=${CHANGES}" >> $GITHUB_OUTPUT

git diff

- name: Commit any changes
if: steps.files-changed.outputs.N_CHANGES != '0'
shell: bash -l {0}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

git pull --no-tags
git add *
git commit --allow-empty -m "Automatic application of license header"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get modified files
id: changed-files
uses: tj-actions/[email protected]
with:
base_sha: 'HEAD~1'
sha: 'HEAD'

- name: Push fixes
if: steps.changed-files.outputs.any_changed == 'true'
shell: bash -l {0}
run: |
echo "Changed files"
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo " $file"
done
git diff HEAD~1
git add *
git commit -m "Automatic application of license header"

git config push.default upstream
git push
Expand Down
5 changes: 1 addition & 4 deletions javascript/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,7 @@ export type NotebookChange = DocumentChange & {
/**
* Notebook metadata changes
*/
metadataChange?: {
oldValue: nbformat.INotebookMetadata;
newValue?: nbformat.INotebookMetadata;
};
metadataChange?: MapChanges;
/**
* nbformat version change
*/
Expand Down
14 changes: 13 additions & 1 deletion javascript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@
*/

export * from './api.js';
export * from './ymodels.js';
export * from './utils.js';

export * from './ytext.js';
export * from './ydocument.js';
export * from './yfile.js';
export * from './ynotebook.js';
export {
YCellType,
YBaseCell,
YRawCell,
YMarkdownCell,
YCodeCell,
createStandaloneCell
} from './ycell.js';
Loading