Skip to content

Commit 0ad1bd1

Browse files
Add badges, links and labels (#20)
* Add dependabot.yml for dependency update. * Add dependabot.yml * Add badge to README * Update README with badges * Modify readme. * Add additional badges. * Add labeler.yml file. * configure latex build as pdf build * Apply suggestions from code review Co-authored-by: Maxime Rey <[email protected]> Co-authored-by: Maxime Rey <[email protected]>
1 parent ddb3549 commit 0ad1bd1

File tree

7 files changed

+52
-10
lines changed

7 files changed

+52
-10
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ updates:
66
schedule:
77
interval: "daily"
88
labels:
9-
- "maintenance"
10-
- "dependencies"
9+
- "Maintenance"
10+
- "Dependencies"

.github/labeler.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Documentation:
2+
- doc/source/**/*
3+
Maintenance:
4+
- .github/**/*
5+
- .flake8
6+
- ignore_words.txt
7+
Dependencies:
8+
- requirements/*
9+
CI/CD:
10+
- .github/**/*

.github/workflows/ci_cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
run: |
103103
sudo apt update
104104
sudo apt-get install -y texlive-latex-extra latexmk
105-
make -C doc latexpdf
105+
make -C doc pdf
106106
107107
- name: Upload HTML Documentation
108108
uses: actions/upload-artifact@v2

README.rst

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
PyOptics Library
2-
########################
2+
================
3+
|pyansys| |GH-CI| |MIT| |black|
4+
5+
.. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
6+
:target: https://docs.pyansys.com/
7+
:alt: PyAnsys
8+
9+
.. |GH-CI| image:: https://github.com/pyansys/pyoptics/actions/workflows/ci_cd.yml/badge.svg
10+
:target: https://github.com/pyansys/pyoptics/actions/workflows/ci_cd.yml
11+
12+
.. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
13+
:target: https://opensource.org/licenses/MIT
14+
:alt: MIT
15+
16+
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
17+
:target: https://github.com/psf/black
18+
:alt: Black
319

4-
.. image:: https://github.com/pyansys/pyoptics/actions/workflows/ci_cd.yml/badge.svg
520

621
Project Overview
722
----------------
@@ -13,10 +28,10 @@ Installation can be done using the published `package`_ or the repository `sourc
1328

1429
Package
1530
~~~~~~~
16-
.. warning:: Not currently available, work in progress... Please use `Sources`_
31+
.. warning:: Not currently available, work in progress... Please use `Sources`_.
1732

1833
This repository is deployed as the Python packages `ansys-pyoptics <...>`_.
19-
As usual, installation is done by running
34+
As usual, installation is done by running:
2035

2136
.. code::
2237
@@ -52,7 +67,7 @@ All sources are located in `<./ansys>`_ folder.
5267
Documentation
5368
-------------
5469
Documentation is stored in `<./doc>`_ folder and generated using `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
55-
To build it manually, just run
70+
To build it manually, just run:
5671

5772
.. code::
5873
@@ -74,8 +89,8 @@ Test configuration file
7489
~~~~~~~~~~~~~~~~~~~~~~~
7590
The configuration file `<tests/local_config.json>`_ located in tests folder contains several parameters that can be changed according to your needs, for example:
7691

77-
- **SpeosServerOnDocker** (boolean): Speos server launched in a docker container
78-
- **SpeosServerPort** (integer): Port used by Speos server for HTTP transfert
92+
- **SpeosServerOnDocker** (boolean): Speos server launched in a docker container.
93+
- **SpeosServerPort** (integer): Port used by Speos server for HTTP transfer.
7994

8095
Start server
8196
~~~~~~~~~~~~

doc/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ help:
2222
# customized clean due to examples gallery
2323
clean:
2424
rm -rf build
25+
26+
#customized pdf build due to svg badges
27+
pdf:
28+
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
29+
cd build/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
30+
(test -f build/latex/*.pdf && echo pdf exists) || exit 1

doc/make.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set SOURCEDIR=source
1111
set BUILDDIR=build
1212

1313
if "%1" == "" goto help
14+
if "%1" == "pdf" goto pdf
1415

1516
%SPHINXBUILD% >NUL 2>NUL
1617
if errorlevel 9009 (
@@ -31,5 +32,11 @@ goto end
3132
:help
3233
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3334

35+
:pdf
36+
%SPHINXBUILD% -M latex %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
37+
cd "%BUILDDIR%\latex"
38+
for %%f in (*.tex) do (
39+
pdflatex "%%f" --interaction=nonstopmode)
40+
3441
:end
3542
popd

doc/source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
from ansys.pyoptics.speos import __version__
77

8+
from sphinx.builders.latex import LaTeXBuilder
9+
10+
LaTeXBuilder.supported_image_types = ["image/png", "image/pdf", "image/svg+xml"]
11+
812
# Project information
913
project = 'ansys-pyoptics'
1014
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"

0 commit comments

Comments
 (0)