Try   HackMD

Package development in Julia

General info

Icebreaker

  • What have you used Julia for in the past?

    • everything from numerical methods to web development :D
    • Nothing! Here to learn more about it.
    • nothing yet, only few experiments while going through small tutorials +1
    • nothing yet, but looking forward to learning about it :)
    • Played around with lattice theories in Julia (Ising model and similar)
    • Haven't done anything yet! But hoping to learn soon :)
  • What makes you interested in Julia?

    • The cool promo t-shirt
    • Typed language with the potential for fast code
    • Solving the "two-language problem" - combining flexiblity/modularity with performance. +1
    • I have heard that Julia has many geospatial libraries that make geoprocessing faster than with python
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
      • https://juliageo.org/
        • Image Not Showing Possible Reasons
          • The image file may be corrupted
          • The server hosting the image is unavailable
          • The image path is incorrect
          • The image format is not supported
          Learn More →
    • use emojis as variable names
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
      • Is this possible!?
        • Yes, I can demo it soon
          *
          Image Not Showing Possible Reasons
          • The image file may be corrupted
          • The server hosting the image is unavailable
          • The image path is incorrect
          • The image format is not supported
          Learn More →
          Image Not Showing Possible Reasons
          • The image file may be corrupted
          • The server hosting the image is unavailable
          • The image path is incorrect
          • The image format is not supported
          Learn More →

About the series

This is the first event in the Nordic RSE seminar series.

About the Nordic RSE

  • Represents Research Software Engineers in the Nordics.
  • Check out nordic-rse.org/ for other activities.
  • Registering as an association this fall.

Speaker

Today's speaker is Luca Ferranti,

Setup instructions

See setup instructions: https://github.com/lucaferranti/juliaPackageDevelopment/

Agenda

  • Julia REPL+environments
  • Creating packages from scratch
    • structure of a typical Julia package
    • package development workflow
  • Tools for creating and managing documentation
  • Tools for testing
  • Contributing to existing packages

Ask your questions here

  • It checks compatibility by looking at semantic versioning?

    • short answer: yes
  • Can you please summarize again what the difference was between Project.toml and Manifest.toml?

    • Project.toml: more general information, but no info about their versions
    • Project.toml listst packages you have installed manually in the environment
      • so Manifest.toml is like a "lock" file in other languages?
        • Yes, it is similar
    • Manifest.toml contains all information to replicate your environment exactly.
  • Why are there the semicolons inside the Template() and GitHubActions()?

    • In Julia, name parameters are separated by a ;
      • for example, function f(x, y; z=1) to define function f with one z optional parameter.
  • How do you get back to julia> after being in package mode?

    • press backspace (delete the invisible ] or ;)
  • Sorry I missed it: How did you create the mycoolpackage?

    • thanks :)
  • Can you use @edit on function defined inside REPL instead of source file?

    • No, it needs to be in a source file.
  • Would it be bad practice or technically not possible to define tests in the same place where code is defined? To avoid changing two files every time you want to move something around.

    • The test package looks for test/runtests.jl (at least by default, I don't know if you can change it)
      • but you can @include files in other paths in the test/runtests.jl file.
    • It is good practice to have tests in the test folder. You might also want to add some tests to src/subpackage/tests, for example.