Skip to content
Snippets Groups Projects
Select Git revision
  • 883c08694b7cdf8f3917456e162d253353bf3345
  • main default protected
2 results

example-repository-stable

  • Open with
  • Download source code
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • Name Last commit Last update
    qimex
    tests
    .gitignore
    .gitlab-ci.yml
    LICENSE
    README.md

    Example repository

    This is an example repository of how Python projects should be organized as at QIM.

    File structure

    On the root of the repository, at minimum you should have:

    • README.md
    • LICENSE
    • An .gitignore file (you can use the one from here as a base template)
    • A single project_name directory that contains all the main code
    • requirements.txt (for the pip requirements)

    Depending on your project, you might also have:

    • y

    Code directory

    Use a simple but meaningful name, as this is the name you're project is going to be imported in case it is packed as a library.

    Here we use qimex as in QIM Example

    Remember to have a __init__.py file in your directory, so that it can be imported as a library. The file can be empty.

    Coding guidelines

    Details of the coding guidelines can be found at the QIM Gitlab Wiki

    In summary:

    • Use Google style for docstrings.
    • Do not add files larger than 32MB, unless stricly necessary.

    Testing

    We should use pytest to manage unit testing of the repository.

    All tests should be inside a testsdirectory at the root of the repository.