sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

Meta-ticket: Gitpod usability improvements #33113

Open mkoeppe opened 2 years ago

mkoeppe commented 2 years ago
sage: polytopes.cube().show()
Launched html viewer for Graphics3d Object
sage: polytopes.regular_polygon(5).show()
Launched png viewer for Graphics object consisting of 7 graphics primitives

CC: @tobiasdiez @dimpase

Component: user interface

Issue created by migration from https://trac.sagemath.org/ticket/33113

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -11,4 +11,5 @@

 - The scipy folks have some good documentation and configuration (​https://scipy.github.io/devdocs/dev/contributor/quickstart_gitpod.html), perhaps we can lift something from there.

+- The docker image is quite big and thus it takes long to open a new gitpod workspace. (from [#33103 comment:19](https://github.com/sagemath/sage/issues/33103#comment:19)): could use `docker/.gitpod.Dockerfile` again with COPY --from to make the final image smaller (e.g., currently /home/gitpod/sage has the old source tree)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -13,3 +13,6 @@

 - The docker image is quite big and thus it takes long to open a new gitpod workspace. (from [#33103 comment:19](https://github.com/sagemath/sage/issues/33103#comment:19)): could use `docker/.gitpod.Dockerfile` again with COPY --from to make the final image smaller (e.g., currently /home/gitpod/sage has the old source tree)

+- Make docker image smaller by using `mv` instead of `cp` when installing packages via DESTDIR staging ([#29585 comment:5](https://github.com/sagemath/sage/issues/29585#comment:5))
+
+
mkoeppe commented 2 years ago

Changed dependencies from #33103 to #30677, #33103

tobiasdiez commented 2 years ago

Description changed:

--- 
+++ 
@@ -11,8 +11,11 @@

 - The scipy folks have some good documentation and configuration (​https://scipy.github.io/devdocs/dev/contributor/quickstart_gitpod.html), perhaps we can lift something from there.

-- The docker image is quite big and thus it takes long to open a new gitpod workspace. (from [#33103 comment:19](https://github.com/sagemath/sage/issues/33103#comment:19)): could use `docker/.gitpod.Dockerfile` again with COPY --from to make the final image smaller (e.g., currently /home/gitpod/sage has the old source tree)
+- The docker image is quite big and thus it takes long to open a new gitpod workspace. (from [#33103 comment:19](https://github.com/sagemath/sage/issues/33103#comment:19)): could use `docker/.gitpod.Dockerfile` again with COPY --from to make the final image smaller (e.g., currently /home/gitpod/sage has the old source tree) Also installation of system packages should make use of the `install-packages` script https://github.com/gitpod-io/workspace-images/blob/master/base/install-packages which does a bit of cleanup after the installation. 

 - Make docker image smaller by using `mv` instead of `cp` when installing packages via DESTDIR staging ([#29585 comment:5](https://github.com/sagemath/sage/issues/29585#comment:5))

+- Add gitpod badge to trac tickets:
+  Image `https://img.shields.io/badge/-Gitpod-908a85?logo=gitpod`
+  Link `https://gitpod.io/#https://github.com/sagemath/sagetrac-mirror/tree/<branch>`
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -19,3 +19,6 @@
   Image `https://img.shields.io/badge/-Gitpod-908a85?logo=gitpod`
   Link `https://gitpod.io/#https://github.com/sagemath/sagetrac-mirror/tree/<branch>`

+- Remove popup notifications:
+  - "Snooty language server is not installed or out of date."
+
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -6,8 +6,6 @@
 sage: polytopes.regular_polygon(5).show()
 Launched png viewer for Graphics object consisting of 7 graphics primitives

- -- (from #33103 comment:31) the configuration of VS Code (from #30677) should be improved. It seems to start up using the wrong interpreter (not venv/bin/python3), and also one needs to manually select the right Jupyter kernel.

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -9,10 +9,6 @@

 - The scipy folks have some good documentation and configuration (​https://scipy.github.io/devdocs/dev/contributor/quickstart_gitpod.html), perhaps we can lift something from there.

-- The docker image is quite big and thus it takes long to open a new gitpod workspace. (from [#33103 comment:19](https://github.com/sagemath/sage/issues/33103#comment:19)): could use `docker/.gitpod.Dockerfile` again with COPY --from to make the final image smaller (e.g., currently /home/gitpod/sage has the old source tree) Also installation of system packages should make use of the `install-packages` script https://github.com/gitpod-io/workspace-images/blob/master/base/install-packages which does a bit of cleanup after the installation. 
-
-- Make docker image smaller by using `mv` instead of `cp` when installing packages via DESTDIR staging ([#29585 comment:5](https://github.com/sagemath/sage/issues/29585#comment:5))
-
 - Add gitpod badge to trac tickets:
   Image `https://img.shields.io/badge/-Gitpod-908a85?logo=gitpod`
   Link `https://gitpod.io/#https://github.com/sagemath/sagetrac-mirror/tree/<branch>`
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -16,3 +16,7 @@
 - Remove popup notifications:
   - "Snooty language server is not installed or out of date."

+- Extensions for:
+  - Cython
+  - autoconf
+
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -20,3 +20,5 @@
   - Cython
   - autoconf

+- Prebuild documentation in a way that incremental docbuilds are fast ([#33103 comment:101](https://github.com/sagemath/sage/issues/33103#comment:101)); perhaps best done after #29868 (`pip`-installable packages `sagemath-doc-html` etc.)
+
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -22,3 +22,4 @@

 - Prebuild documentation in a way that incremental docbuilds are fast ([#33103 comment:101](https://github.com/sagemath/sage/issues/33103#comment:101)); perhaps best done after #29868 (`pip`-installable packages `sagemath-doc-html` etc.)

+- docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -8,6 +8,8 @@
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -10,6 +10,10 @@
 - The scipy folks have some good documentation and configuration (​https://scipy.github.io/devdocs/dev/contributor/quickstart_gitpod.html), perhaps we can lift something from there.

 - Link to https://code.visualstudio.com/docs/datascience/jupyter-notebooks
+
+- Link to https://www.gitpod.io/docs/configure/browser-settings
+
+

 - Add gitpod badge to trac tickets:
   Image `https://img.shields.io/badge/-Gitpod-908a85?logo=gitpod`
@@ -25,3 +29,5 @@
 - Prebuild documentation in a way that incremental docbuilds are fast ([#33103 comment:101](https://github.com/sagemath/sage/issues/33103#comment:101)); perhaps best done after #29868 (`pip`-installable packages `sagemath-doc-html` etc.)

 - docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
+  - add in from https://github.com/gitpod-io/workspace-images/blob/master/full/Dockerfile#L218
+
mkoeppe commented 2 years ago

Changed dependencies from #30677, #33103 to none

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,5 @@
+- #32753 Prefer Linux package manager over linuxbrew (or remove linuxbrew from the Docker image)
+
 - in the terminal, viewing graphics silently does nothing
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -28,7 +28,7 @@
   - Cython
   - autoconf

-- Prebuild documentation in a way that incremental docbuilds are fast ([#33103 comment:101](https://github.com/sagemath/sage/issues/33103#comment:101)); perhaps best done after #29868 (`pip`-installable packages `sagemath-doc-html` etc.)
+- #33354: Prebuild documentation in a way that incremental docbuilds are fast ([#33103 comment:101](https://github.com/sagemath/sage/issues/33103#comment:101)); perhaps best done after #29868 (`pip`-installable packages `sagemath-doc-html` etc.)

 - docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
   - add in from https://github.com/gitpod-io/workspace-images/blob/master/full/Dockerfile#L218
mkoeppe commented 2 years ago
comment:18

Ticket branches are often based on an older beta version. Given that we build on top of the Docker image for the current beta version (dev), shouldn't we attempt to merge the branch into the base of the Docker image and build that?

tobiasdiez commented 2 years ago
comment:19

Isn't this what the prebuild at gitpod is essentially doing?

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,5 @@
+- #33450 Improve vs code config
+
 - #32753 Prefer Linux package manager over linuxbrew (or remove linuxbrew from the Docker image)

 - in the terminal, viewing graphics silently does nothing
mkoeppe commented 2 years ago
comment:21

Replying to @tobiasdiez:

Isn't this what the prebuild at gitpod is essentially doing?

No, it's not merging. It's building the top of the branch.

tobiasdiez commented 2 years ago
comment:22

Then I don't understand what you mean. The docker image used by gitpod is the same for all branches.

mkoeppe commented 2 years ago
comment:23

Yes, it is, and it is based on the latest beta.

The branch that is being tested, however, may be based on a much older beta. When building this branch, it will downgrade packages to the versions recorded in that older beta.

tobiasdiez commented 2 years ago
comment:24

Yes, that's the current behavior, right? So what are you proposing to improve there?

mkoeppe commented 2 years ago
comment:25

As I said in comment:18, to merge the current branch into the branch from which the Docker image has been built.

tobiasdiez commented 2 years ago

Description changed:

--- 
+++ 
@@ -32,6 +32,11 @@

 - #33354: Prebuild documentation in a way that incremental docbuilds are fast ([#33103 comment:101](https://github.com/sagemath/sage/issues/33103#comment:101)); perhaps best done after #29868 (`pip`-installable packages `sagemath-doc-html` etc.)

+- Add instruction on how to display build docs:
+  - `python3 -m http.server --directory ./local/share/doc/sage/html/ 8001`
+  - https://www.gitpod.io/docs/languages/html and https://www.gitpod.io/docs/config-ports
+  - Should we start this sever automatically and display the build docs in a vscode browser tab?
+
 - docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
   - add in from https://github.com/gitpod-io/workspace-images/blob/master/full/Dockerfile#L218
tobiasdiez commented 2 years ago
comment:27

Replying to @mkoeppe:

As I said in comment:18, to merge the current branch into the branch from which the Docker image has been built.

So you want to merge the develop branch into the branch that is open in gitpod?

Note also that gitpod prebuild the branch when a new commit arrives. Thus the docker image used is the one that had been published when the branch had its last commit.

tobiasdiez commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,5 @@
+- Prebuild of `develop` branch is not available (probably because the prebuild of the develop branch still uses the old docker image)
+
 - #33450 Improve vs code config

 - #32753 Prefer Linux package manager over linuxbrew (or remove linuxbrew from the Docker image)
@@ -16,8 +18,6 @@
 - Link to https://code.visualstudio.com/docs/datascience/jupyter-notebooks

 - Link to https://www.gitpod.io/docs/configure/browser-settings
-
-

 - Add gitpod badge to trac tickets:
   Image `https://img.shields.io/badge/-Gitpod-908a85?logo=gitpod`
mkoeppe commented 2 years ago
comment:29

Replying to @tobiasdiez:

Replying to @mkoeppe:

As I said in comment:18, to merge the current branch into the branch from which the Docker image has been built.

So you want to merge the develop branch into the branch that is open in gitpod?

Technically not the develop branch but the ref from which the Docker image has been built. Most of the times, that's the same.

mkoeppe commented 2 years ago
comment:30

Replying to @tobiasdiez:

Note also that gitpod prebuild the branch when a new commit arrives. Thus the docker image used is the one that had been published when the branch had its last commit.

Yes, that's fine.

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,6 +1,11 @@
+- Added gitpod badge to trac tickets:
+  Image `https://img.shields.io/badge/-Gitpod-908a85?logo=gitpod`
+  Link `https://gitpod.io/#https://github.com/sagemath/sagetrac-mirror/tree/<branch>`
+- #33450 Improve vs code config
+- #33589 Gitpod: track remote trac branch
+- #33613 Gitpod: Install git-trac-command
+
 - Prebuild of `develop` branch is not available (probably because the prebuild of the develop branch still uses the old docker image)
-
-- #33450 Improve vs code config

 - #32753 Prefer Linux package manager over linuxbrew (or remove linuxbrew from the Docker image)

@@ -19,10 +24,6 @@

 - Link to https://www.gitpod.io/docs/configure/browser-settings

-- Add gitpod badge to trac tickets:
-  Image `https://img.shields.io/badge/-Gitpod-908a85?logo=gitpod`
-  Link `https://gitpod.io/#https://github.com/sagemath/sagetrac-mirror/tree/<branch>`
-
 - Remove popup notifications:
   - "Snooty language server is not installed or out of date."
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -3,6 +3,7 @@
   Link `https://gitpod.io/#https://github.com/sagemath/sagetrac-mirror/tree/<branch>`
 - #33450 Improve vs code config
 - #33589 Gitpod: track remote trac branch
+- #33739 Migrate gitpod to conda
 - #33613 Gitpod: Install git-trac-command

 - Prebuild of `develop` branch is not available (probably because the prebuild of the develop branch still uses the old docker image)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -40,5 +40,4 @@
   - Should we start this sever automatically and display the build docs in a vscode browser tab?

 - docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
-  - add in from https://github.com/gitpod-io/workspace-images/blob/master/full/Dockerfile#L218
-
+  - add in from https://github.com/gitpod-io/workspace-images/blob/main/chunks/tool-docker/Dockerfile
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -5,6 +5,8 @@
 - #33589 Gitpod: track remote trac branch
 - #33739 Migrate gitpod to conda
 - #33613 Gitpod: Install git-trac-command
+- #34255 docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
+  - add in from https://github.com/gitpod-io/workspace-images/blob/main/chunks/tool-docker/Dockerfile

 - Prebuild of `develop` branch is not available (probably because the prebuild of the develop branch still uses the old docker image)

@@ -39,5 +41,4 @@
   - https://www.gitpod.io/docs/languages/html and https://www.gitpod.io/docs/config-ports
   - Should we start this sever automatically and display the build docs in a vscode browser tab?

-- docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
-  - add in from https://github.com/gitpod-io/workspace-images/blob/main/chunks/tool-docker/Dockerfile
+
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -5,8 +5,7 @@
 - #33589 Gitpod: track remote trac branch
 - #33739 Migrate gitpod to conda
 - #33613 Gitpod: Install git-trac-command
-- #34255 docker - [#33103 comment:123](https://github.com/sagemath/sage/issues/33103#comment:123)
-  - add in from https://github.com/gitpod-io/workspace-images/blob/main/chunks/tool-docker/Dockerfile
+- #34255 docker 

 - Prebuild of `develop` branch is not available (probably because the prebuild of the develop branch still uses the old docker image)