mirror of
https://github.com/MeteoSwiss/Open-Source-Template.git
synced 2026-08-26 12:04:21 +00:00
Read-only mirror of https://github.com/MeteoSwiss/Open-Source-Template — MeteoSwiss. Issues & pull requests at the source.
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github | ||
| .vscode | ||
| doc | ||
| open_source_template | ||
| test | ||
| .gitignore | ||
| .python-version | ||
| AUTHORS | ||
| CHANGELOG.rst | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.rst | ||
.. 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