Verified Commit 358aa1a3 authored by frnmst's avatar frnmst
Browse files

First commit.

parents
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
Pipfile.lock
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-yapf
rev: 'v0.30.0' # Use the sha / tag you want to point at
hooks:
- id: yapf
args: ['--style', '{based_on_style: pep8; indent_width: 4}']
- repo: https://gitlab.com/pycqa/flake8
rev: '3.8.3' # Use the sha / tag you want to point at
hooks:
- id: flake8
args: ['--ignore=E501,W503,W504']
- repo: https://github.com/PyCQA/bandit
rev: '1.6.2' # Use the sha / tag you want to point at
hooks:
- id: bandit
args: ['--skip', 'B404,B506,B410,B603', '--level', 'LOW']
- repo: https://github.com/twu/skjold
rev: 'v0.1.5'
hooks:
- id: skjold
args: ['-s', 'gemnasium', '-s', 'pyup']
This diff is collapsed.
#!/usr/bin/env make
#
# Makefile
#
# Copyright (C) 2020 frnmst (Franco Masotti) <franco.masotti@live.com>
#
# This file is part of automated-tasks.
#
# automated-tasks is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# automated-tasks is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with automated-tasks. If not, see <http://www.gnu.org/licenses/>.
#
export PACKAGE_NAME=fpydocs
default: pep doc test
doc:
pipenv run $(MAKE) -C docs html
install:
pip3 install . --user
uninstall:
pip3 install $(PACKAGE_NAME)
install-dev:
pipenv install --dev
pipenv run pre-commit install
uninstall-dev:
pipenv --rm
test:
pipenv run python setup.py test
clean:
rm -rf build dist *.egg-info
pipenv run $(MAKE) -C docs clean
.PHONY: default pep doc install-dev uninstall-dev clean
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
# Documentation.
Sphinx = '==3.2.1'
sphinx-rtd-theme = '==0.5.0'
# Tools.
pre-commit = "==2.7.1"
[requires]
python_version = "3.8"
automated-tasks
===============
|buymeacoffee|
.. |buymeacoffee| image:: assets/buy_me_a_coffee.svg
:alt: Buy me a coffee
:target: https://buymeacoff.ee/frnmst
Common instructions for my Python projects so I need to manage only one
documentation.
Documentation
-------------
https://frnmst.github.io/fpydocs/
License
-------
Unless otherwise noted:
Copyright (C) 2020 Franco Masotti <franco.masotti@live.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Trusted source
--------------
You can check the authenticity of new releases using my public key.
Instructions, sources and keys can be found at `frnmst.gitlab.io/software <https://frnmst.gitlab.io/software/>`_.
# 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 = .
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)
# 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 = 'fpydocs'
copyright = '2020, Franco Masotti'
author = 'Franco Masotti'
# The short X.Y version.
version = '0.0.0'
# The full version, including alpha/beta/rc tags
release = '0.0.0'
# -- 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.ext.autodoc',
'sphinx.ext.coverage',
'sphinx_rtd_theme',
'sphinx.ext.githubpages']
# 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 = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'default'
# -- 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 = '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']
# -- Extension configuration -------------------------------------------------
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
html_theme_options = {
'canonical_url': '',
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'style_nav_header_background': 'light-blue',
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 6,
'includehidden': True,
'titles_only': False
}
Contributing
============
Git branches
------------
What follows is a table of the git branches used in these repositories.
.. important:: Open pull requests on the ``dev`` target branch.
Use ``bugfix-${fix_name}`` or ``newfeature-${new_feature_name}`` as names.
===================================== ==================================================== ==============================
Branch Description Update schedule
===================================== ==================================================== ==============================
``master`` the main branch every new release
``dev`` recent changes are merged here before a new release at will
``gh-pages`` contains the built documentation only every new release
``bugfix-${fix_name}`` a generic bug fix
``newfeature-${new_feature_name}`` a generic new feature
===================================== ==================================================== ==============================
Dependencies
------------
First of all install `pipenv <https://pipenv.readthedocs.io/en/latest/>`_ and then
install the software requirements from the Pipfile in the repository's root:
::
$ make install-dev
Documentation
-------------
You can edit and rebuild all this documentation with:
::
$ make doc
TODO and FIXME
--------------
Go in the repository's root and then:
::
$ grep -e TODO -e FIXME -n */*.py
Contribution Steps
------------------
1. clone the repository
2. install the requirements
3. write code
4. write unit tests
5. run tests
6. update relevant documentation, if necessary
7. pull request
.. note:: Have a look at `this post <https://frnmst.gitlab.io/notes/my-python-release-workflow.html>`_ as well.
Copyright and License
=====================
Unless otherwise noted:
Copyright (C) 2020 Franco Masotti <franco.masotti@live.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.. automated-tasks documentation master file, created by
sphinx-quickstart on Fri Oct 16 19:05:00 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to automated-tasks's documentation!
===========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
introduction
contributing
copyright_license
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Introduction
============
This repository contains common documentation instruction used
in multiple Python projects.
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment