Skip to content

Commit

Permalink
Merge pull request #96 from hadar-simulator/release/v0.5.0
Browse files Browse the repository at this point in the history
Release/v0.5.0
  • Loading branch information
FrancoisJ authored Dec 3, 2020
2 parents ed2ec55 + bb18cfd commit 9e65621
Show file tree
Hide file tree
Showing 109 changed files with 10,216 additions and 2,211 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,16 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: psf/black@stable
if: matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
if: matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest'
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install -r requirements.test.txt
- name: Test with unittest
run: |
pip install coverage
coverage run --source=./hadar -m unittest discover tests
coverage xml -i
- name: SonarCloud Scan
if: matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest'
uses: sonarsource/sonarcloud-github-action@master
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install -r requirements.test.txt
- name: Test with unittest
run: |
pip install coverage
coverage run --source=./hadar -m unittest discover tests
coverage xml -i
Expand All @@ -43,14 +35,12 @@ jobs:
run: |
git lfs pull
pip install -i https://test.pypi.org/simple/ hadar
pip install jupyter click
cd examples
python3 utils.py --src=./ --check=./
- name: Release pypi.org
run: |
export PYTHONPATH=$(pwd)
pip install setuptools wheel twine
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/* -u __token__ -p $PYPI_PROD_TOKEN
env:
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install -r requirements.test.txt
- name: Check with black
uses: psf/black@stable
- name: Test with unittest
run: |
pip install coverage
coverage run --source=./hadar -m unittest discover tests
coverage xml -i
Expand All @@ -41,7 +35,6 @@ jobs:
- name: Release test.pypi.org
run: |
export PYTHONPATH=$(pwd)
pip install setuptools wheel twine
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* -u __token__ -p $PYPI_TEST_TOKEN
env:
Expand Down
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
build:
image: latest
sphinx:
builder: html
python:
version: 3
install:
- requirements: requirements.docs.txt
- method: pip
path: .
system_packages: true
formats: all
11 changes: 0 additions & 11 deletions docs/requirements.txt

This file was deleted.

Binary file added docs/source/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/source/architecture/analyzer.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _analyzer:

Analyzer
========

Expand Down
14 changes: 14 additions & 0 deletions docs/source/architecture/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _architecture:

============
Architecture
============

.. toctree::
:maxdepth: 2

overview
workflow
optimizer
analyzer
viewer
2 changes: 2 additions & 0 deletions docs/source/architecture/optimizer.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _optimizer:

Optimizer
=========

Expand Down
4 changes: 3 additions & 1 deletion docs/source/architecture/overview.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.. _overview:

Overview
========
============

Welcome to the Hadar Architecture Documentation.

Expand Down
2 changes: 2 additions & 0 deletions docs/source/architecture/viewer.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _viewer:

Viewer
======

Expand Down
2 changes: 2 additions & 0 deletions docs/source/architecture/workflow.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _workflow:

Workflow
========

Expand Down
31 changes: 17 additions & 14 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

sys.path.insert(0, os.path.abspath("../.."))


import hadar

# -- Project information -----------------------------------------------------
master_doc = 'index'
project = 'hadar-simulator'
copyright = 'Except where otherwise noted, this content is Copyright (c) 2020, RTE (https://www.rte-france.com) and licensed under a CC-BY-4.0 (https://creativecommons.org/licenses/by/4.0/) license.'
author = 'RTE'
master_doc = "index"
project = "hadar-simulator"
copyright = "Except where otherwise noted, this content is Copyright (c) 2020, RTE (https://www.rte-france.com) and licensed under a CC-BY-4.0 (https://creativecommons.org/licenses/by/4.0/) license."
author = "RTE"

# The full version, including alpha/beta/rc tags
release = hadar.__version__
Expand All @@ -32,31 +34,32 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_rtd_theme',
'sphinx.ext.autodoc',
"sphinx.ext.autodoc",
"nbsphinx",
"IPython.sphinxext.ipython_console_highlighting",
"sphinx.ext.mathjax",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', '**.ipynb_checkpoints']
exclude_patterns = ["_build", "**.ipynb_checkpoints"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the reference for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "pydata_sphinx_theme"
html_logo = "_static/logo.png"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

nbsphinx_execute = 'never'
html_static_path = ["_static"]

autodoc_mock_imports = ['pandas', 'numpy', 'ortools', 'plotly', 'jupyter', 'matplotlib', 'requests', 'progress']
nbsphinx_execute = "never"
2 changes: 2 additions & 0 deletions docs/source/dev-guide/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _contributing:

How to Contribute
=================

Expand Down
12 changes: 12 additions & 0 deletions docs/source/dev-guide/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _dev-guide:

============
Contributing
============


.. toctree::
:maxdepth: 2

contributing
repository
2 changes: 2 additions & 0 deletions docs/source/dev-guide/repository.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _repository:

Repository Organization
=======================

Expand Down
Loading

0 comments on commit 9e65621

Please sign in to comment.