Read-only mirror of https://github.com/MeteoSwiss/Open-Source-Template — MeteoSwiss. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-18 08:23:08 +02:00
.github TIP-269 Enhance documentation displaying the mch logo in the header and moving the version to the footer using a reduced config for sphinx 2026-02-02 09:31:04 +01:00
.vscode First commit 2025-07-04 15:50:53 +02:00
doc TIP-269 Enhance documentation displaying the mch logo in the header and moving the version to the footer using a reduced config for sphinx 2026-02-02 09:31:04 +01:00
open_source_template TIP-232 Fix linting issues 2025-12-18 16:55:23 +01:00
test TIP-232 Fix linting issues 2025-12-18 16:55:23 +01:00
.gitignore First commit 2025-07-04 15:50:53 +02:00
.python-version First commit 2025-07-04 15:50:53 +02:00
AUTHORS TIP-239 Add code of conduct and contributing pages 2026-01-14 14:48:15 +01:00
CHANGELOG.rst TIP-207 Upgrade to poetry 2.x 2026-04-23 16:49:34 +02:00
CODE_OF_CONDUCT.md TIP-239 Add Code of Conduct in Markdown 2026-01-14 15:21:09 +01:00
CONTRIBUTING.md TIP-239 Link code of conduct in contributing 2026-01-14 15:31:10 +01:00
LICENSE First commit 2025-07-04 15:50:53 +02:00
poetry.lock TIP-207 Upgrade to poetry 2.x 2026-04-23 16:49:34 +02:00
pyproject.toml TIP-207 Upgrade to poetry 2.x 2026-04-23 16:49:34 +02:00
README.rst TIP-269 Enhance documentation displaying the mch logo in the header and moving the version to the footer using a reduced config for sphinx 2026-02-02 09:31:04 +01:00

.. image:: https://img.shields.io/pypi/v/Open-Source-Template.svg
    :target: https://pypi.org/project/Open-Source-Template/

.. image:: https://img.shields.io/pypi/pyversions/Open-Source-Template.svg
    :target: https://pypi.org/project/Open-Source-Template/

.. image:: https://img.shields.io/pypi/l/Open-Source-Template.svg
    :target: https://pypi.org/project/Open-Source-Template/

.. image:: https://github.com/MeteoSwiss/Open-Source-Template/actions/workflows/github-code-scanning/codeql/badge.svg
    :target: https://github.com/MeteoSwiss/Open-Source-Template/actions/workflows/github-code-scanning/codeql

.. image:: https://github.com/MeteoSwiss/Open-Source-Template/actions/workflows/CI_test.yaml/badge.svg
    :target: https://github.com/MeteoSwiss/Open-Source-Template/actions/workflows/CI_test.yaml

.. image:: https://github.com/MeteoSwiss/Open-Source-Template/actions/workflows/CI_publish_dev_documentation.yaml/badge.svg
    :target: https://github.com/MeteoSwiss/Open-Source-Template/actions/workflows/CI_publish_dev_documentation.yaml

===============
Getting Started
===============

A demo for the OSS template at MeteoSwiss.

The template can be use as an example how to configure MeteoSwiss Github projects.

It uses:

* Github actions to execute the CI/CD pipelines
* Github pages to host the documentation
* PyPI to publish the python packages

Development Setup with Poetry
-----------------------------

Building the Project
''''''''''''''''''''
.. code-block:: console

    $ cd open-source-template
    $ poetry install

Run Tests
'''''''''

.. code-block:: console

    $ poetry run pytest

Run Quality Tools
'''''''''''''''''

.. code-block:: console

    $ poetry run pylint open_source_template
    $ poetry run mypy open_source_template

Generate Documentation
''''''''''''''''''''''

.. code-block:: console

    $ poetry run sphinx-build doc doc/_build

Then open the index.html file generated in *open-source-template/doc/_build/*.

Build wheels
''''''''''''

.. code-block:: console

    $ poetry build

Using the Library
-----------------

To install open-source-template in your project, run this command in your terminal:

.. code-block:: console

    $ poetry add open-source-template

You can then use the library in your project through

    import open_source_template

Releasing
---------

* Adapt CHANGELOG.rst with release information
* Adapt ``doc/_static/switcher_config.json`` adding the new documentation URL for the release
* Create a new Release in the Github project