fem-on-colab / open-in-colab-workflow

MIT License
0 stars 1 forks source link

Possibility to hardcode current fem on colab/git commits in uploaded notebooks #1

Closed francesco-ballarin closed 2 years ago

francesco-ballarin commented 2 years ago

Currently supported: if not saying anything, do not hardcode and always use the latest commit

      fem_on_colab_packages: |
        fenicsx$dolfinx
        gmsh
      pip_packages: |
        multiphenicsx@https://github.com/multiphenics/multiphenicsx.git
        femlium@https://github.com/FEMlium/FEMlium.git

Advantages: clean installation cell (as on the website), which the user can cut & paste elsewhere Disadvantage: upstream projects might make some changes and the uploaded notebook may not work anymore, especially if it is published once in a while.

Currently supported: manually specified commits

      fem_on_colab_packages: |
        fenicsx@ef2237e$dolfinx
        gmsh@ef2237e
      pip_packages: |
        multiphenicsx@https://github.com/multiphenics/multiphenicsx.git@7fa2fd1
        femlium@https://github.com/FEMlium/FEMlium.git@1ff77c6

Advantages: guaranteed compatibility between the upstream library and the content of the notebook (e.g., good for teaching) Disadvantage: manually need to update the commit SHAs

Desired: current commits

      fem_on_colab_packages: |
        fenicsx@current$dolfinx
        gmsh@current
      pip_packages: |
        multiphenicsx@https://github.com/multiphenics/multiphenicsx.git@current
        femlium@https://github.com/FEMlium/FEMlium.git@current

It should produce a code similar to the case above, but replacing the keyword current with the appropiate commit SHA. Advantages: guaranteed compatibility between the upstream library and the content of the notebook if CI is successful (e.g., good for websites)

francesco-ballarin commented 2 years ago

Implemented in 9266571.