Skip to content

Commit

Permalink
Merge pull request #145 from NOAA-GFDL/add_badges
Browse files Browse the repository at this point in the history
Add  pipeline badges to README!
  • Loading branch information
ilaflott authored Aug 14, 2024
2 parents 220c9e7 + e050fa6 commit 18719f7
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 45 deletions.
43 changes: 36 additions & 7 deletions .github/workflows/create_test_conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down Expand Up @@ -53,12 +52,42 @@ jobs:
# does this need to be done a third time?
echo $CONDA/envs/fre-cli/bin >> $GITHUB_PATH
# are we talking to the right python?
- name: Run pytest in fre-cli environment
run: |
# try to make sure the right things are in GITHUB_PATH
echo $CONDA/envs/fre-cli/bin >> $GITHUB_PATH
which python
python --version
$CONDA/envs/fre-cli/bin/python --version
# run pylint, not explicitly from the conda env?
which pylint
# ignore toothless complaint pylint has about netCDF4's stuff
pylint --ignored-modules netCDF4 fre/ || echo "pylint returned non-zero exit code. preventing workflow from dying with this echo."
# run pytest
pytest --junit-xml=pytest_results.xml --config-file=fre/pytest.ini --cov-config=fre/coveragerc --cov-report=xml --cov=fre fre/
# install genbadge to generate coverage badge based on xml
pip install genbadge
genbadge coverage -v -i coverage.xml -o docs/cov_badge.svg
genbadge tests -v -i pytest_results.xml -o docs/pytest_badge.svg
- name: Run pylint in fre-cli environment
run: |
# try to make sure the right things are in GITHUB_PATH
echo $CONDA/envs/fre-cli/bin >> $GITHUB_PATH
which python
python --version
$CONDA/envs/fre-cli/bin/python --version
# run pylint
pylint fre/ || echo "pylint returned non-zero exit code. preventing workflow from dying with this echo."
- name: Install Sphinx and Build Documentation
run: |
pip install sphinx renku-sphinx-theme sphinx-rtd-theme
pip install --upgrade sphinx-rtd-theme
sphinx-apidoc --output-dir docs fre/ --separate
sphinx-build docs build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/
force_orphan: true
35 changes: 0 additions & 35 deletions .github/workflows/documentation.yml

This file was deleted.

14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<!-- from https://anaconda.org/NOAA-GFDL/fre-cli/badges -->
[![Anaconda-Server Badge](https://anaconda.org/noaa-gfdl/fre-cli/badges/version.svg)](https://anaconda.org/noaa-gfdl/fre-cli)
[![Anaconda-Server Badge](https://anaconda.org/noaa-gfdl/fre-cli/badges/latest_release_date.svg)](https://anaconda.org/noaa-gfdl/fre-cli)
[![Anaconda-Server Badge](https://anaconda.org/noaa-gfdl/fre-cli/badges/latest_release_relative_date.svg)](https://anaconda.org/noaa-gfdl/fre-cli)
[![CI](https://github.com/NOAA-GFDL/fre-cli/workflows/publish_conda/badge.svg)](https://github.com/NOAA-GFDL/fre-cli/actions?query=workflow%3Apublish_conda+branch%3Amain++)
![Coverage Badge](https://noaa-gfdl.github.io/fre-cli/_images/cov_badge.svg)
![Pytest Badge](https://noaa-gfdl.github.io/fre-cli/_images/pytest_badge.svg)

# **FRE-CLI**

FMS Runtime Environment (FRE) CLI developed using Python's Click package

* [Sphinx Page](https://noaa-gfdl.github.io/fre-cli/index.html)
* [Project Outline](https://docs.google.com/document/d/19Uc01IPuuIuMtOyAvxXj9Mn6Ivc5Ql6NZ-Q6I8YowRI/edit?usp=sharing)
* [Sphinx Documentation](https://noaa-gfdl.github.io/fre-cli/index.html)
<!--* ... internal doc, should remove, if anything...
[Project Outline](https://docs.google.com/document/d/19Uc01IPuuIuMtOyAvxXj9Mn6Ivc5Ql6NZ-Q6I8YowRI/edit?usp=sharing) -->

![IMG_1076](https://github.com/NOAA-GFDL/fre-cli/assets/98476720/817cabe1-6e3b-4210-9874-b13f601265d6)

## **Background**

`fre-cli` is a modern, user-friendly CLI that will allow users to call FRE commands using a **_fre_** **tool** _subtool_ syntax. Leveraging Click, an easily installable Python package available via PyPI and/or Conda, `fre-cli` gives users intuitive and easy-to-understand access to many FRE tools and workflows from one packaged, centralized CLI.

![Screenshot from 2024-04-18 13-42-04](https://github.com/NOAA-GFDL/fre-cli/assets/98476720/43c028a6-4e6a-42fe-8bec-008b6758ea9b)
Expand Down
5 changes: 5 additions & 0 deletions docs/badges.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Badges
======

.. image:: cov_badge.svg
.. image:: pytest_badge.svg
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Welcome to Fre-Cli's documentation!
usage
subtools
FAQ
badges

Indices and tables
==================
Expand Down

0 comments on commit 18719f7

Please sign in to comment.