Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtd structure #30

Merged
merged 14 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added initial structure rtd
  • Loading branch information
Denis Sidorenko committed Jun 7, 2022
commit 5f8ae8b956e91bab777dc9c0dec778ac5e663e44
16 changes: 16 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py


python:
version: 3.7
install:
- requirements: requirements.txt
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
4 changes: 4 additions & 0 deletions docs/gefest/gefest.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Intro to GEFEST
==============

some information
12 changes: 12 additions & 0 deletions docs/gefest/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
GEFEST
=====

**That is all about GEFEST**

.. toctree::
:glob:
:maxdepth: 1

gefest
installation
quickstart
18 changes: 18 additions & 0 deletions docs/gefest/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Installation from GitHub
========================
| git clone https://github.com/ITMO-NSS-team/GEFEST.git
| cd GEFEST
| pip install .
| pytest -s test/

or full installation

| git clone https://github.com/ITMO-NSS-team/GEFEST.git
| cd FEDOT
nicl-nno marked this conversation as resolved.
Show resolved Hide resolved
| pip install .[extra]
| pytest -s test/

Installation from PyPI
======================
| pip install gefest # common
| pip install gefest[extra] # full
10 changes: 10 additions & 0 deletions docs/gefest/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Quickstart
==========

GEFEST Framework quick start guide

How to install
--------------
.. code::

pip install gefest
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
6 changes: 6 additions & 0 deletions docs/source/about.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
About us
========

The FEDOT is developed and maintained by the `NSS Lab <https://itmo-nss-team.github.io/>`__ team.

Our laboratory is part of the National Center for Cognitive Technologies (ITMO University, Russia), which provides cutting-edge software and algorithmic solutions. We focus on natural systems simulations, generative design of real and virtual objects, data-driven modeling, automated machine learning.
63 changes: 63 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

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

# -- Project information -----------------------------------------------------

project = 'GEFEST'
copyright = '2021-2022, NSS Lab'
author = 'NSS Lab'

# The full version, including alpha/beta/rc tags
release = '0.0.1'
# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.autodoc.typehints',
]
autodoc_typehints = 'description'

autodoc_mock_imports = ['objgraph', 'memory_profiler', 'gprof2dot', 'snakeviz']

autodoc_member_order = 'bysource'

# Add any paths that contain templates here, relative to this directory.
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 = []

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = "sphinx_rtd_theme"

# 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']
master_doc = 'index'
179 changes: 179 additions & 0 deletions docs/source/contribution.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
Contribution
============

We welcome you to `check the existing
issues <https://github.com/ITMO-NSS-team/GEFEST/issues>`__ for bugs or
enhancements to work on. If you have an idea for an extension to GEFEST,
please `file a new
issue <https://github.com/ITMO-NSS-team/GEFEST/issues/new`__ so we can
discuss it.

Make sure to familiarize yourself with the project layout before making
any major contributions.

Instructions
-----------------

There is a presentation to help you to take your first steps to become a FEDOT contributor below.

:download:`Want to implement a custom operation in GEFEST <path to guide file>`


How to contribute
-----------------

The preferred way to contribute to GEFEST is to fork the `main
repository <https://github.com/ITMO-NSS-team/GEFEST/>`__ on GitHub:

1. Fork the `project repository <https://github.com/ITMO-NSS-team/GEFEST>`__:
click on the 'Fork' button near the top of the page. This creates a
copy of the code under your account on the GitHub server.

2. Clone this copy to your local disk:

::

$ git clone git@github.com:YourUsername/GEFEST.git
$ cd GEFEST

3. Create a branch to hold your changes:

::

$ git checkout -b my-contribution

4. Make sure your local environment is setup correctly for development.
Installation instructions are almost identical to `the user
instructions <instructions file>`__ except that GEFEST should *not* be
installed. If you have GEFEST installed on your computer then make
sure you are using a virtual environment that does not have GEFEST
installed.

5. Start making changes on your newly created branch, remembering to
never work on the ``main`` branch! Work on this copy on your
computer using Git to do the version control.

6. To check your changes haven't broken any existing tests and to check
new tests you've added pass run the following (note, you must have
the ``nose`` package installed within your dev environment for this
to work):

::

$ pytest -s

7. When you're done editing and local testing, run:

::

$ git add modified_files
$ git commit

to record your changes in Git, then push them to GitHub with:

::

$ git push -u origin my-contribution

Finally, go to the web page of your fork of the FEDOT repo, and click
'Pull Request' (PR) to send your changes to the maintainers for review.

(If it looks confusing to you, then look up the `Git
documentation <http://git-scm.com/documentation>`__ on the web.)

Before submitting your pull request
-----------------------------------

Before you submit a pull request for your contribution, please work
through this checklist to make sure that you have done everything
necessary so we can efficiently review and accept your changes.

If your contribution changes GEFEST in any way:

- Update the
`documentation <https://github.com/ITMO-NSS-team/GEFEST/tree/main/docs>`__
so all of your changes are reflected there.

- Update the
`README <https://github.com/ITMO-NSS-team/GEFEST/blob/main/README.md>`__
if anything there has changed.

If your contribution involves any code changes:

- Update the `project unit
tests <https://github.com/ITMO-NSS-team/GEFEST/tree/main/test>`__ to
test your code changes.

- Make sure that your code is properly commented with
`docstrings <https://www.python.org/dev/peps/pep-0257/>`__ and
comments explaining your rationale behind non-obvious coding
practices.

If your contribution requires a new library dependency:

- Double-check that the new dependency is easy to install via ``pip``
or Anaconda and supports Python 3. If the dependency requires a
complicated installation, then we most likely won't merge your
changes because we want to keep GEFEST easy to install.

- Add the required version of the library to
`requirements.txt <https://github.com/ITMO-NSS-team/GEFEST/blob/main/requirements.txt>`__

Contribute to the documentation
-------------------------------
Take care of the documentation.

All the documentation is created with the Sphinx autodoc feature. Use ..
automodule:: <module_name> section which describes all the code in the module.

- If a new package with several scripts:

1. Go to `docs/source/gefest <https://github.com/ITMO-NSS-team/GEFEST/tree/main/docs/source/gefest>`__ and create new your_name_for_file.rst file.

2. Add a Header underlined with “=” sign. It’s crucial.

3. Add automodule description for each of your scripts. ::

.. automodule:: gefest.core.your.first.script.path
:members:
:undoc-members:
:show-inheritance:

.. automodule:: gefest.core.your.second.script.path
:members:
:undoc-members:
:show-inheritance:
...

4. Add your_name_for_file to the toctree at docs/source/gefest/index.rst

- If a new module to the existed package:

Most of the sections are already described in `docs/source/gefest <https://github.com/ITMO-NSS-team/GEFEST/tree/main/docs/source/gefest>`__ , so you can:

- choose the most appropriate and repeat 3-d step from the previous section.
- or create a new one and repeat 2-3 steps from the previous section.

- If a new function or a class to the existing module:

Be happy. Everything is already done for you.

After submitting your pull request
----------------------------------

After submitting your pull request,
`Travis-CI <https://travis-ci.com/>`__ will automatically run unit tests
on your changes and make sure that your updated code builds and runs on
Python 3. We also use services that automatically check code quality and
test coverage.

Check back shortly after submitting your pull request to make sure that
your code passes these checks. If any of the checks come back with a red
X, then do your best to address the errors.

Acknowledgements
----------------

This document guide is based at well-written `TPOT Framework
contribution
guide <https://github.com/EpistasisLab/tpot/blob/master/docs_sources/contributing.md>`__.
9 changes: 9 additions & 0 deletions docs/source/faq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FAQ
===

Frequently asked questions and answers

What is GEFEST?
--------------

Some information
Loading