mirror of
https://github.com/datafolklabs/cement.git
synced 2026-02-06 11:16:46 +00:00
Minor Tweaks to New Doc
This commit is contained in:
parent
fc9ba0a6d8
commit
519c52ec1a
49
CHANGELOG.md
Executable file
49
CHANGELOG.md
Executable file
@ -0,0 +1,49 @@
|
||||
# ChangeLog
|
||||
|
||||
## 2.99.1 - DEVELOPMENT (will be released as dev/2.99.2 or stable/3.0.0)
|
||||
|
||||
This is a complete fork from Cement 2 code base. Please continue to use
|
||||
stable versions of Cement 2, until Cement 3.0.0 is released.
|
||||
|
||||
|
||||
Bugs:
|
||||
|
||||
- `[ext.redis]` Unable To Set Redis Host
|
||||
- [Issue #440](https://github.com/datafolklabs/cement/issues/440)
|
||||
|
||||
|
||||
Features:
|
||||
|
||||
- `[core]` Add Docker / Docker Compose Support
|
||||
- [Issue #439](https://github.com/datafolklabs/cement/issues/439)
|
||||
|
||||
|
||||
Refactoring:
|
||||
|
||||
- *Too many to reference*
|
||||
|
||||
|
||||
Incompatible:
|
||||
|
||||
- `[core]` Replace Interfaces with ABC Base Classes
|
||||
- [Issue #192](https://github.com/datafolklabs/cement/issues/192)
|
||||
- `[core.foundation]` Rename `CementApp` to `App`.
|
||||
- `[core.handler]` Rename `CementBaseHandler` to `Handler`
|
||||
- `[core.handler]` Drop deprecated backend globals
|
||||
- `[core.hook]` Drop deprecated backend globals
|
||||
- `[core.controller]` Drop `CementBaseController`
|
||||
- `[ext.argcomplete]` No longer shipped with Cement.
|
||||
- `[ext.reload_config]` No longer shipped with Cement.
|
||||
- `[ext.configobj]` No longer shipped with Cement.
|
||||
- `[ext.json_configobj]` No longer shipped with Cement.
|
||||
- `[ext.yaml_configobj]` No longer shipped with Cement.
|
||||
- `[ext.genshi]` No longer shipped with Cement.
|
||||
- `[ext.argparse]` ArgparseController.Meta.default_func is not `_default`, and
|
||||
will print help info and exit. Can now set this to `None` as well to
|
||||
pass/exit.
|
||||
- [Issue #426](https://github.com/datafolklabs/cement/issues/426)
|
||||
|
||||
|
||||
Deprecation:
|
||||
|
||||
* *Everything with deprecation notices in Cement < 3*
|
||||
@ -1,5 +1,4 @@
|
||||
Contributors
|
||||
============
|
||||
# Contributors
|
||||
|
||||
The following people have contributed to Cement, either by way of source code,
|
||||
documentation, or testing.
|
||||
63
ChangeLog
63
ChangeLog
@ -1,63 +0,0 @@
|
||||
.. _changelog:
|
||||
|
||||
ChangeLog
|
||||
==============================================================================
|
||||
|
||||
All bugs/feature details can be found at:
|
||||
|
||||
https://github.com/datafolklabs/cement/issues/XXXXX
|
||||
|
||||
|
||||
Where XXXXX is the 'Issue #' referenced below. Additionally, this change log
|
||||
is available online at:
|
||||
|
||||
http://builtoncement.com/2.99/changes/
|
||||
|
||||
|
||||
See the :ref:`upgrading` section for more information related to
|
||||
any incompatible changes, and how to update your application to fix them.
|
||||
Also check out the :ref:`whats_new` section for details on new features.
|
||||
|
||||
2.99.1 - DEVELOPMENT (will be released as dev/2.99.2 or stable/3.0.0)
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
This is a complete fork from Cement 2 code base. Please continue to use
|
||||
stable versions of Cement 2, until Cement 3.0.0 is released.
|
||||
|
||||
Bugs:
|
||||
|
||||
* ``[ext.redis]`` Unable To Set Redis Host
|
||||
* :issue:`440`
|
||||
|
||||
Features:
|
||||
|
||||
* ``[core]`` Add Docker / Docker Compose Support
|
||||
* :issue:`439`
|
||||
|
||||
Refactoring:
|
||||
|
||||
* None
|
||||
|
||||
Incompatible:
|
||||
|
||||
* ``[core]`` Replace Interfaces with ABC Base Classes
|
||||
* :issue:`192`
|
||||
* ``[core.foundation]`` Rename ``CementApp`` to ``App``.
|
||||
* ``[core.handler]`` Rename ``CementBaseHandler`` to ``Handler``
|
||||
* ``[core.handler]`` Drop deprecated backend globals
|
||||
* ``[core.hook]`` Drop deprecated backend globals
|
||||
* ``[core.controller]`` Drop ``CementBaseController``
|
||||
* ``[ext.argcomplete]`` No longer shipped with Cement.
|
||||
* ``[ext.reload_config]`` No longer shipped with Cement.
|
||||
* ``[ext.configobj]`` No longer shipped with Cement.
|
||||
* ``[ext.json_configobj]`` No longer shipped with Cement.
|
||||
* ``[ext.yaml_configobj]`` No longer shipped with Cement.
|
||||
* ``[ext.genshi]`` No longer shipped with Cement.
|
||||
* ``[ext.argparse]`` ArgparseController.Meta.default_func is not
|
||||
`_default`, and will print help info and exit. Can now set this to
|
||||
``None`` as well to pass/exit.
|
||||
* :issue:`426`
|
||||
|
||||
Deprecation:
|
||||
|
||||
* None
|
||||
4
LICENSE
4
LICENSE
@ -1,7 +1,3 @@
|
||||
.. _license:
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
Copyright (c) 2009-2017 Data Folk Labs, LLC
|
||||
All rights reserved.
|
||||
|
||||
42
doc-new/content/changelog.md
Normal file → Executable file
42
doc-new/content/changelog.md
Normal file → Executable file
@ -1,33 +1,49 @@
|
||||
---
|
||||
weight: 100
|
||||
title: ChangeLog
|
||||
---
|
||||
|
||||
# ChangeLog
|
||||
|
||||
## 2.99.1 - DEVELOPMENT (will be released as dev/2.99.2 or stable/3.0.0)
|
||||
|
||||
<aside class="warning">
|
||||
This is a complete fork from Cement 2 code base. Please continue to use
|
||||
stable version of Cement 2, until Cement 3.0.0 is released.
|
||||
</aside>
|
||||
stable versions of Cement 2, until Cement 3.0.0 is released.
|
||||
|
||||
|
||||
Bugs:
|
||||
|
||||
* None
|
||||
- `[ext.redis]` Unable To Set Redis Host
|
||||
- [Issue #440](https://github.com/datafolklabs/cement/issues/440)
|
||||
|
||||
|
||||
Features:
|
||||
|
||||
* None
|
||||
- `[core]` Add Docker / Docker Compose Support
|
||||
- [Issue #439](https://github.com/datafolklabs/cement/issues/439)
|
||||
|
||||
|
||||
Refactoring:
|
||||
|
||||
* None
|
||||
- *Too many to reference*
|
||||
|
||||
|
||||
Incompatible:
|
||||
|
||||
* None
|
||||
- `[core]` Replace Interfaces with ABC Base Classes
|
||||
- [Issue #192](https://github.com/datafolklabs/cement/issues/192)
|
||||
- `[core.foundation]` Rename `CementApp` to `App`.
|
||||
- `[core.handler]` Rename `CementBaseHandler` to `Handler`
|
||||
- `[core.handler]` Drop deprecated backend globals
|
||||
- `[core.hook]` Drop deprecated backend globals
|
||||
- `[core.controller]` Drop `CementBaseController`
|
||||
- `[ext.argcomplete]` No longer shipped with Cement.
|
||||
- `[ext.reload_config]` No longer shipped with Cement.
|
||||
- `[ext.configobj]` No longer shipped with Cement.
|
||||
- `[ext.json_configobj]` No longer shipped with Cement.
|
||||
- `[ext.yaml_configobj]` No longer shipped with Cement.
|
||||
- `[ext.genshi]` No longer shipped with Cement.
|
||||
- `[ext.argparse]` ArgparseController.Meta.default_func is not `_default`, and
|
||||
will print help info and exit. Can now set this to `None` as well to
|
||||
pass/exit.
|
||||
- [Issue #426](https://github.com/datafolklabs/cement/issues/426)
|
||||
|
||||
|
||||
Deprecation:
|
||||
|
||||
* None
|
||||
* *Everything with deprecation notices in Cement < 3*
|
||||
|
||||
@ -36,6 +36,8 @@ $ python helloworld.py
|
||||
INFO: Hello World!
|
||||
```
|
||||
|
||||
Let's hope that this long sentence doesn't get eaten up by the `slate monsters of old`.
|
||||
And this one also I want to see what this looks `App.Meta.config_files == 'test'`.
|
||||
|
||||
<aside class="warning">
|
||||
This is the Portland branch of Cement, intended for future-looking and
|
||||
@ -44,13 +46,14 @@ will eventually become Cement 3. It is guaranteed to be broken! Please use
|
||||
Cement 2 in production until stable/3.0.0 is released.
|
||||
</aside>
|
||||
|
||||
Cement is an advanced CLI Application Framework for Python. Its goal is to
|
||||
introduce a standard, and feature-full platform for both simple and complex
|
||||
command line applications as well as support rapid development needs without
|
||||
sacrificing quality. Cement is flexible, and it's use cases span from the
|
||||
simplicity of a micro-framework to the complexity of a mega-framework.
|
||||
Whether it's a single file script, or a multi-tier application, Cement is the
|
||||
foundation you've been looking for.
|
||||
Cement is an advanced Application Framework for Python, with a primary focus
|
||||
on Command Line Interfaces (CLI). Its goal is to introduce a standard, and
|
||||
feature-full platform for both simple and complex command line applications
|
||||
as well as support rapid development needs without sacrificing quality.
|
||||
Cement is flexible, and it's use cases span from the simplicity of a
|
||||
micro-framework to the complexity of a mega-framework. Whether it's a single
|
||||
file script, or a multi-tier application, Cement is the foundation you've been
|
||||
looking for.
|
||||
|
||||
The first commit to Git was on Dec 4, 2009. Since then, the framework has
|
||||
seen several iterations in design, and has continued to grow and improve
|
||||
@ -59,23 +62,23 @@ command line and backend application development.
|
||||
|
||||
Cement core features include (but are not limited to):
|
||||
|
||||
* Core pieces of the framework are customizable via handlers/interfaces
|
||||
* Handler system connects implementation classes with Interfaces
|
||||
* Extension handler interface to easily extend framework functionality
|
||||
* Config handler supports parsing multiple config files into one config
|
||||
* Argument handler parses command line arguments and merges with config
|
||||
* Log handler supports console and file logging
|
||||
* Plugin handler provides an interface to easily extend your application
|
||||
* Output handler interface renders return dictionaries to console
|
||||
* Cache handler interface adds caching support for improved performance
|
||||
* Controller handler supports sub-commands, and nested controllers
|
||||
* Hook support adds a bit of magic to apps and also ties into framework
|
||||
* Zero external dependencies* (not including optional extensions)
|
||||
* 100% test coverage using `nose` and `coverage`
|
||||
* 100% PEP8 and style compliant using `flake8`
|
||||
* Extensive Sphinx documentation
|
||||
* Tested on Python 3.5+
|
||||
* Does not support Python 2.x
|
||||
- Core pieces of the framework are customizable via handlers/interfaces
|
||||
- Handler system connects implementation classes with Interfaces
|
||||
- Extension handler interface to easily extend framework functionality
|
||||
- Config handler supports parsing multiple config files into one config
|
||||
- Argument handler parses command line arguments and merges with config
|
||||
- Log handler supports console and file logging
|
||||
- Plugin handler provides an interface to easily extend your application
|
||||
- Output handler interface renders return dictionaries to console
|
||||
- Cache handler interface adds caching support for improved performance
|
||||
- Controller handler supports sub-commands, and nested controllers
|
||||
- Hook support adds a bit of magic to apps and also ties into framework
|
||||
- Zero external dependencies* (not including optional extensions)
|
||||
- 100% test coverage using `nose` and `coverage`
|
||||
- 100% PEP8 and style compliant using `flake8`
|
||||
- Extensive Sphinx documentation
|
||||
- Tested on Python 3.5+
|
||||
- Does not support Python 2.x
|
||||
|
||||
<aside class="notice">
|
||||
Some optional extensions that are shipped with the mainline Cement sources do
|
||||
@ -86,17 +89,17 @@ Cement explicitly does not include them.
|
||||
|
||||
**More Information**
|
||||
|
||||
* DOCS: http://builtoncement.com/2.99/
|
||||
* CODE: http://github.com/datafolklabs/cement/
|
||||
* PYPI: http://pypi.python.org/pypi/cement/
|
||||
* SITE: http://builtoncement.com/
|
||||
* T-CI: https://travis-ci.org/datafolklabs/cement
|
||||
* HELP: cement@librelist.org - #cement - gitter.im/datafolklabs/cement
|
||||
- [Documentation](http://builtoncement.com/2.99/)
|
||||
- [Source Code](http://github.com/datafolklabs/cement/)
|
||||
- [PyPi](http://pypi.python.org/pypi/cement/)
|
||||
- [Travis Continuous Integration Testing](https://travis-ci.org/datafolklabs/cement/)
|
||||
- [Gitter Discussion Channel](https://gitter.im/datafolklabs/cement/)
|
||||
|
||||
|
||||
**License**
|
||||
|
||||
The Cement CLI Application Framework is Open Source and is distributed under
|
||||
the BSD License (three clause). Please see the LICENSE file included with
|
||||
this software.
|
||||
the BSD License (three clause). Please see the
|
||||
[LICENSE](https://raw.githubusercontent.com/datafolklabs/cement/master/LICENSE)
|
||||
file included with this software.
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
---
|
||||
title: "Quick Start Overview"
|
||||
weight: 2
|
||||
slug: quickstart
|
||||
---
|
||||
|
||||
# Quickstart Overview
|
||||
@ -169,6 +170,31 @@ are referred to by the interfaces they implement, such as
|
||||
customization by plugins.
|
||||
</aside>
|
||||
|
||||
### Overriding Via Configuration Files
|
||||
|
||||
> Overriding Via Configuration File
|
||||
|
||||
```
|
||||
[myapp]
|
||||
|
||||
### override App.Meta.mail_handler
|
||||
mail_handler = my_mail_handler
|
||||
|
||||
```
|
||||
|
||||
`MyApp` defines and/or defaults to builtin handlers for all of the above
|
||||
listed core handlers. Whatever the application code defines is the default,
|
||||
however you can also override via the configuration file(s) as in the example
|
||||
to the right.
|
||||
|
||||
For example, imagine that your default `mail_handler` is `smtp` for
|
||||
sending email via your local SMTP server. This is a configuration that might
|
||||
very on a per-user/environment basis. Via the application configuration, you
|
||||
could override this with an alternative mail handler like
|
||||
`mail_handler=some_other_mail_handler`
|
||||
|
||||
|
||||
|
||||
[comment]: <> (--------------------------------------------------------------)
|
||||
|
||||
## Configuration
|
||||
@ -228,7 +254,8 @@ myapp:
|
||||
Cement supports loading multiple configuration files out-of-the-box.
|
||||
Configurations loaded from files are merged in, overriding the applications
|
||||
default settings (`App.Meta.config_defaults`). The default configuration
|
||||
handler is `ConfigParserConfigHandler`, based on `ConfigParser` in the
|
||||
handler is `ConfigParserConfigHandler`, based on
|
||||
[ConfigParser](https://docs.python.org/3/library/configparser.html) in the
|
||||
standard library, and is instantiated as `app.config`.
|
||||
|
||||
Cement looks for configuration files in the most common places such as:
|
||||
@ -243,8 +270,11 @@ The list of configuration file paths can be customized via the meta option
|
||||
be easily modified with `App.Meta.config_extension`.
|
||||
|
||||
The builtin configuration handler `ConfigParserConfigHandler` uses common
|
||||
unix-like config files where `blocks` or `sections` are defined with
|
||||
`[brackets]`. Additional support for the following file formats is provided
|
||||
unix-like config files where `blocks` or `sections` are defined with brackets:
|
||||
|
||||
I.e. `[myapp]`, `[myplugin]`, `[interface.handler]`, etc
|
||||
|
||||
Additional support for the following file formats is provided
|
||||
via optional extensions:
|
||||
|
||||
* Json
|
||||
@ -286,7 +316,7 @@ with App('myapp') as app:
|
||||
|
||||
```
|
||||
|
||||
> Arguments Defined With Controllers
|
||||
> Arguments Defined by Controllers
|
||||
|
||||
```python
|
||||
|
||||
@ -324,7 +354,6 @@ with MyApp() as app:
|
||||
|
||||
```
|
||||
|
||||
|
||||
> Usage
|
||||
|
||||
```
|
||||
@ -343,14 +372,17 @@ Foo Argument => bar
|
||||
|
||||
Argument parsing is based on the standard
|
||||
[Argparse](https://docs.python.org/3/library/argparse.html) library, with the
|
||||
same usage that you're familiar with. That said, the power of the framework
|
||||
comes into play when we start talking about application controllers that
|
||||
streamline the process of mapping arguments and sub-commands to
|
||||
actions/functions (more on that later).
|
||||
same usage that you're familiar with. The argument handler
|
||||
`ArgparseArgumentHandler` is instantiated as `app.args`, arguments are defined
|
||||
with `app.args.add_argument()`, and parsed arguments are stored as
|
||||
`app.args.parsed_args` (or more conveniently `app.pargs` for easy reference).
|
||||
|
||||
The argument handler `ArgparseArgumentHandler` is instantiated as `app.args`,
|
||||
and the parsed arguments are stored as `app.pargs` for easy reference.
|
||||
|
||||
### Arguments Defined by Controllers
|
||||
|
||||
The power of the framework comes into play when we start talking about
|
||||
application controllers that streamline the process of mapping arguments and
|
||||
sub-commands to actions/functions as in the example (more on that later).
|
||||
|
||||
[comment]: <> (--------------------------------------------------------------)
|
||||
|
||||
|
||||
11
doc-new/layouts/partials/hook_head_end.html
Normal file
11
doc-new/layouts/partials/hook_head_end.html
Normal file
@ -0,0 +1,11 @@
|
||||
<style>
|
||||
.content code {
|
||||
background-color: rgba(0,0,0,0.05);
|
||||
word-break: keep-all;
|
||||
hyphens: none;
|
||||
padding: 3px;
|
||||
border-radius: 3px;
|
||||
@extend %code-font;
|
||||
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,7 @@
|
||||
{{ if getenv "REPOSITORY_URL" -}}
|
||||
<div style="margin-left: 20px; margin-top: 20px">
|
||||
<a href="https://www.netlify.com">
|
||||
<img src="https://www.netlify.com/img/global/badges/netlify-dark.svg"/>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
4
doc-new/themes/docuapi/exampleSite/static/_headers
Normal file
4
doc-new/themes/docuapi/exampleSite/static/_headers
Normal file
@ -0,0 +1,4 @@
|
||||
/*
|
||||
X-Frame-Options: DENY
|
||||
X-XSS-Protection: 1; mode=block
|
||||
|
||||
@ -0,0 +1 @@
|
||||
<img src='{{ relURL "images/logo.png" }}' />
|
||||
@ -89,7 +89,7 @@ intersphinx_mapping = {'py': ('https://docs.python.org/3.4', None)}
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
source_suffix = ['.rst', '.md']
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user