Debian Codegraph @

RELEASE.md

raw
1 ## Releasing `ipydatagrid`
2
3 ### Tagging and creating a publishing environment
4
5 1. Create a new release branch: `git checkout -n release_1.0.x` (**replace .x with the actual version**).
6 2. Install `tbump` with `pip install tbump`.
7 3. Bump the version with `tbump --only-patch 1.0.x`
8 4. Save, sign and commit your changes: `git commit -s -m "Release 1.0.x"`.
9 5. Open a PR with your release branch: `git push -u origin release_1.0.x`.
10 6. Once your PR has been merged (!), pull the new main branch `git checkout main && git pull upstream main`.
11 7. Add a new release tag: `git tag -a 1.0.x -m "Release 1.0.x"`.
12 8. Push the new tag to GitHub: `git push upstream --tags`.
13 9. Create a new conda environment: `conda create -n release_grid -c conda-forge python=3.8 python-build`.
14 10. Activate the environment: `conda activate release_grid`.
15
16 ### Releasing on pypi
17
18 8. Make sure the `dist` folder under the `ipydatagrid` root folder is empty - delete previous release tarballs if they're present.
19 9. Build the Python release by running `python -m build` in the root directory.
20 10. Check the `dist` folder for the output from the build process. You should see the following files:
21 - ipydatagrid-1.0.x-py3-none-any.whl
22 - ipydatagrid-1.0.x.tar.gz
23 - index.js
24 - index.js.map
25 - index.js.LICENSE.txt
26 11. Delete all \*.js, \*.map and \*.txt files: `rm *.js *.map *.txt`. Only the wheel and tarball files should remain.
27 12. Inspect the contents of the tarball to see everything is in check: `tar -tvf ipydatagrid-1.0.x.tar.gz`.
28 13. Install `twine` by running `pip install twine`.
29 14. Once `twine` is installed, upload the Python release to pypi: `twine upload dist/*`. You will need to have upload credentials for `ipydatagrid` on pypi for this step to work. If the step was successful, you should see an output similar to the one below:
30
31 ```bash
32 Uploading ipydatagrid-1.0.x-py3-none-any.whl
33 100%|████████████████████████████████████████████████████████████████████████████████████████████| 3.38M/3.38M [00:04<00:00, 720kB/s]
34 Uploading ipydatagrid-1.0.x.tar.gz
35 100%|███████████████████████████████████████████████████████████████████████████████████████████| 22.4M/22.4M [00:07<00:00, 3.22MB/s]
36
37 View at:
38 https://pypi.org/project/ipydatagrid/1.0.x/
39 ```
40
41 ### Releasing on npm
42
43 15. In the root folder of the `ipydatagrid`, run `npm publish --dry-run`. This will perform a dry run release so you can check everything looks right before an actual release. It should generate an output similar to the one below:
44
45 ```bash
46 webpack 5.34.0 compiled with 3 warnings in 93596 ms
47 npm notice
48 npm notice 📦 [email protected]
49 npm notice === Tarball Contents ===
50 npm notice 4.5kB style/feathergrid.css
51 npm notice 56B style/jupyter-widget.css
52 npm notice 4.5kB lib/core/barrenderer.js
53 npm notice 11.1kB lib/cellrenderer.js
54 npm notice 165.1kB lib/core/datagrid.js
55 npm notice 19.5kB lib/datagrid.js
56 npm notice 1.3kB lib/extension.js
57 npm notice 30.4kB lib/feathergrid.js
58 npm notice 45.1kB lib/core/filterMenu.js
59 npm notice 13.7kB lib/core/graphicscontext.js
60 npm notice 5.2kB lib/core/gridContextMenu.js
61 npm notice 13.6kB lib/core/headerRenderer.js
62 npm notice 1.1MB dist/index.js
63 npm notice 930B lib/index.js
64 npm notice 1.4kB lib/keyhandler.js
65 npm notice 3.1kB lib/plugin.js
66 npm notice 114B lib/core/transform.js
67 npm notice 10.8kB lib/core/transformExecutors.js
68 npm notice 7.1kB lib/core/transformStateManager.js
69 npm notice 6.2kB lib/utils.js
70 npm notice 4.6kB lib/core/valueRenderer.js
71 npm notice 3.8kB lib/vegaexpr.js
72 npm notice 584B lib/version.js
73 npm notice 7.8kB lib/core/view.js
74 npm notice 16.7kB lib/core/viewbasedjsonmodel.js
75 npm notice 4.0kB package.json
76 npm notice 3.1kB lib/core/barrenderer.js.map
77 npm notice 7.7kB lib/cellrenderer.js.map
78 npm notice 128.2kB lib/core/datagrid.js.map
79 npm notice 15.8kB lib/datagrid.js.map
80 npm notice 368B lib/extension.js.map
81 npm notice 22.8kB lib/feathergrid.js.map
82 npm notice 31.4kB lib/core/filterMenu.js.map
83 npm notice 13.1kB lib/core/graphicscontext.js.map
84 npm notice 2.8kB lib/core/gridContextMenu.js.map
85 npm notice 10.6kB lib/core/headerRenderer.js.map
86 npm notice 4.3MB dist/index.js.map
87 npm notice 189B lib/index.js.map
88 npm notice 689B lib/keyhandler.js.map
89 npm notice 1.6kB lib/plugin.js.map
90 npm notice 117B lib/core/transform.js.map
91 npm notice 8.4kB lib/core/transformExecutors.js.map
92 npm notice 4.9kB lib/core/transformStateManager.js.map
93 npm notice 4.1kB lib/utils.js.map
94 npm notice 3.7kB lib/core/valueRenderer.js.map
95 npm notice 2.7kB lib/vegaexpr.js.map
96 npm notice 287B lib/version.js.map
97 npm notice 4.1kB lib/core/view.js.map
98 npm notice 9.9kB lib/core/viewbasedjsonmodel.js.map
99 npm notice 4.6kB README.md
100 npm notice 416B style/icons/arrow-down-short-dark.svg
101 npm notice 416B style/icons/arrow-down-short.svg
102 npm notice 400B style/icons/arrow-up-short-dark.svg
103 npm notice 400B style/icons/arrow-up-short.svg
104 npm notice 349B style/icons/filter-dark.svg
105 npm notice 349B style/icons/filter.svg
106 npm notice 3.8kB lib/core/barrenderer.d.ts
107 npm notice 4.5kB lib/cellrenderer.d.ts
108 npm notice 38.0kB lib/core/datagrid.d.ts
109 npm notice 2.6kB lib/datagrid.d.ts
110 npm notice 25B lib/extension.d.ts
111 npm notice 3.9kB lib/feathergrid.d.ts
112 npm notice 10.0kB lib/core/filterMenu.d.ts
113 npm notice 5.5kB lib/core/graphicscontext.d.ts
114 npm notice 3.3kB lib/core/gridContextMenu.d.ts
115 npm notice 2.5kB lib/core/headerRenderer.d.ts
116 npm notice 103B lib/index.d.ts
117 npm notice 584B lib/keyhandler.d.ts
118 npm notice 231B lib/plugin.d.ts
119 npm notice 1.6kB lib/core/transform.d.ts
120 npm notice 3.2kB lib/core/transformExecutors.d.ts
121 npm notice 2.7kB lib/core/transformStateManager.d.ts
122 npm notice 1.4kB lib/utils.d.ts
123 npm notice 1.4kB lib/core/valueRenderer.d.ts
124 npm notice 1.4kB lib/vegaexpr.d.ts
125 npm notice 262B lib/version.d.ts
126 npm notice 4.7kB lib/core/view.d.ts
127 npm notice 11.8kB lib/core/viewbasedjsonmodel.d.ts
128 npm notice 1.5kB LICENSE.txt
129 npm notice === Tarball Details ===
130 npm notice name: ipydatagrid
131 npm notice version: 1.0.5
132 npm notice package size: 1.3 MB
133 npm notice unpacked size: 6.2 MB
134 npm notice shasum: f8743bf45c0667b2f99631b73f5df465534549fc
135 npm notice integrity: sha512-4E1xna+4Sy33k[...]eQx2mpnwvYKOw==
136 npm notice total files: 79
137 npm notice
138 + [email protected]
139 ```
140
141 One specific item to watch for is the inclusion of `dist/index.js` in the output generated by the console, as that's the file being used by CDNs, which `voila` relies on as a fallback.
142
143 16. If everything looks right, you can now publish to NPM. Login to NPM: `npm login` and enter your credentials.
144 17. Run `npm publish` in the root directory of `ipydatagrid`. You will need to have upload credentials for `ipydatagrid` on NPM for this step to work. If the publishing step was successful, you will see an output on your console which is similar to the one from step (15).
145
146 ### Cleaning up the release environment
147
148 18. Deactivate the release environment: `conda deactivate`.
149 19. Delete the release environment: `conda env remove -n release_grid`.
150
151 Congratulations! You successfully published `ipydatagrid`!