LeaderF
=======

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly.

 - Written in Python.
 - Support fuzzy and regex searching.
 - Full-featured.
 - Well-designed fuzzy matching algorithm.
 - [Extensible](https://github.com/Yggdroot/LeaderF/wiki/Extensions).

Changelog
---------

Please see the [CHANGELOG](https://github.com/Yggdroot/LeaderF/blob/master/CHANGELOG.md) for a release history.

Wiki
----

[Wiki](https://github.com/Yggdroot/LeaderF/wiki).

Extensions
----------

A list of community extensions can be found in the [Extensions](https://github.com/Yggdroot/LeaderF/wiki/Extensions) wiki.

Screenshots
-----------

![Popup Mode][1]

![And Mode][2]

Requirements
------------

 - vim7.3 or higher. Only support 7.4.1126+ after [v1.01](https://github.com/Yggdroot/LeaderF/releases/tag/v1.01).
 - Python2.7+ or Python3.1+.
 - To use the popup mode, neovim 0.5.0+ or vim 8.1.1615+ are required.

Installation
------------

For [vim-plug][5] user:

```vim
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }
```

Performance
-----------

LeaderF is already very fast. If you'd like better performance, install the C extension of the fuzzy matching algorithm, which is more than 10 times faster.
To install the C extension, firstly, make sure `python2` and/or `python3` commands are available on Linux/Unix/MacOS and `py -2` and/or `py -3` commands are available on Windows.

 - Install the C extension
    ```vim
    :LeaderfInstallCExtension
    ```
    There may be some errors during the installation, please google the error messages to resolve it.
    For example, `"error: Unable to find vcvarsall.bat"`, you can turn to [here][6] for help.

- Uninstall the C extension
    ```vim
    :LeaderfUninstallCExtension
    ```

After running any command of LeaderF, check the value of `echo g:Lf_fuzzyEngine_C`, if the value is 1, it means the C extension is loaded sucessfully.

Usage
-----

```
usage: Leaderf[!] [-h] [--reverse] [--stayOpen] [--input <INPUT> | --cword]
                  [--top | --bottom | --left | --right | --belowright | --aboveleft | --fullScreen | --popup]
                  [--nameOnly | --fullPath | --fuzzy | --regexMode] [--nowrap] [--next | --previous]
                  [--recall] [--popup-height <POPUP_HEIGHT>] [--popup-width <POPUP_WIDTH>] [--no-sort]
                  [--case-insensitive] [--auto-preview | --no-auto-preview]

                  {file,tag,function,mru,searchHistory,cmdHistory,help,line,colorscheme,gtags,
                      self,bufTag,buffer,rg,filetype,command,window,quickfix,loclist,jumps}
                  ...

optional arguments:
  -h, --help            show this help message and exit
  --reverse             show results in bottom-up order
  --stayOpen            don't quit LeaderF after accepting an entry
  --input <INPUT>       specifies INPUT as the pattern inputted in advance
  --cword               current word under cursor is inputted in advance
  --top                 the LeaderF window is at the top of the screen
  --bottom              the LeaderF window is at the bottom of the screen
  --left                the LeaderF window is at the left of the screen
  --right               the LeaderF window is at the right of the screen
  --belowright          the LeaderF window is at the belowright of the screen
  --aboveleft           the LeaderF window is at the aboveleft of the screen
  --fullScreen          the LeaderF window takes up the full screen
  --popup               the LeaderF window is a popup window or floating window
  --nameOnly            LeaderF is in NameOnly mode by default
  --fullPath            LeaderF is in FullPath mode by default
  --fuzzy               LeaderF is in Fuzzy mode by default
  --regexMode           LeaderF is in Regex mode by default
  --nowrap              long lines in the LeaderF window won't wrap
  --next                Jump to the next result.
  --previous            Jump to the previous result.
  --recall              Recall last search. If the result window is closed, reopen it.
  --popup-height <POPUP_HEIGHT>
                        specifies the maximum height of popup window, only available in popup mode.
  --popup-width <POPUP_WIDTH>
                        specifies the width of popup window, only available in popup mode.
  --no-sort             do not sort the result.
  --case-insensitive    fuzzy search case insensitively.
  --auto-preview        open preview window automatically.
  --no-auto-preview     don't open preview window automatically.

subcommands:

  {file,tag,function,mru,searchHistory,cmdHistory,help,line,colorscheme,gtags,
      self,bufTag,buffer,rg,filetype,command,window,quickfix,loclist,jumps}
    file                search files
    tag                 navigate tags using the tags file
    function            navigate functions or methods in the buffer
    mru                 search most recently used files
    searchHistory       execute the search command in the history
    cmdHistory          execute the command in the history
    help                navigate the help tags
    line                search a line in the buffer
    colorscheme         switch between colorschemes
    gtags               navigate tags using the gtags
    self                execute the commands of itself
    bufTag              navigate tags in the buffer
    buffer              search buffers
    rg                  grep using rg
    filetype            navigate the filetype
    command             execute built-in/user-defined Ex commands.
    window              search windows.
    quickfix            navigate the quickfix.
    loclist             navigate the location list.

If [!] is given, enter normal mode directly.
```

use `:Leaderf <subcommand> -h` to get specific help of subcommand, e.g., `:Leaderf rg -h`.

Once LeaderF is launched:

| Command                    | Description
| -------                    | -----------
| `<C-C>`
`<ESC>`         | quit from LeaderF
| `<C-R>`                    | switch between fuzzy search mode and regex mode
| `<C-F>`                    | switch between full path search mode and name only search mode
| `<Tab>`                    | switch to normal mode
| `<C-V>`
`<S-Insert>`    | paste from clipboard
| `<C-U>`                    | clear the prompt
| `<C-W>`                    | delete the word before the cursor in the prompt
| `<C-J>`                    | move the cursor downward in the result window
| `<C-K>`                    | move the cursor upward in the result window
| `<Up>`/`<Down>`            | recall last/next input pattern from history
| `<2-LeftMouse>`
`<CR>`  | open the file under cursor or selected(when multiple files are selected)
| `<C-X>`                    | open in horizontal split window
| `<C-]>`                    | open in vertical split window
| `<C-T>`                    | open in new tabpage
| `<C-\>`                    | show a prompt enable to choose split window method: vertical, horizontal, tabpage, etc
| `<F5>`                     | refresh the cache
| `<C-LeftMouse>`
`<C-S>` | select multiple files
| `<S-LeftMouse>`            | select consecutive multiple files
| `<C-A>`                    | select all files
| `<C-L>`                    | clear all selections
| `<BS>`                     | delete the preceding character in the prompt
| `<Del>`                    | delete the current character in the prompt
| `<Home>`                   | move the cursor to the begin of the prompt
| `<End>`                    | move the cursor to the end of the prompt
| `<Left>`                   | move the cursor one character to the left in the prompt
| `<Right>`                  | move the cursor one character to the right in the prompt
| `<C-P>`                    | preview the result
| `<C-Up>`                   | scroll up in the popup preview window
| `<C-Down>`                 | scroll down in the popup preview window

Input formats:

 * In **NameOnly** mode (*fuzzy mode*)

    If the first character you input is `';'`, then the searching will be the same as in **FullPath** mode.

    If you input string as `'abc;def'`, then `'abc'` will match the file name and `'def'` will match the directory name.

 * In **FullPath** mode (*fuzzy mode*)

    Same as in **NameOnly** mode except that the pattern will match the full path but not the file name only.

 * In **Regexp** mode

    The input string is the same as the Vim's regexp.

Smart Case:

 * If the characters in search pattern are all lowercase, the matching is case-insensitive. If the search pattern contains uppercase characters, all lowercase characters still are matched case-insensitively, the uppercase characters can only match upper case. So uppercase characters can speed up the narrowing down of the searching result.

    e.g., input `abcDef`，it can match the following strings:
    ```
    abcDef
    AbcDef
    abcDEf
    aBcDeF
    ```
    but can not match the strings such as:
    ```
    abcdef
    Abcdef
    ```
    Note: `abc` and `ef` are still case-insensitive.

And operator:

 * In fuzzy mode, using `' '`(space) as the **and** operator, the candidate lines should fuzzily match all the substrings separated by space.

    e.g., input `abc def gh`，it can match the following strings:
    ```
    ...a.b.c...d.e.f...g.h...
    ...a.b.c...g.h...d.e.f...
    ...a.d..e.g.b.c...h..f...
    ...gh...def...abc...
    ```

Popup Mode
----------

Popup Mode is to open LeaderF in a popup window(vim 8.1.1615+) or floating window(nvim 0.4.2+).

To enable popup mode:
```vim
let g:Lf_WindowPosition = 'popup'
```
or add `--popup` after each subcommand, e.g.,
```
Leaderf file --popup
```

Customization
-------------

 * Change key bindings

    By default, `<Up>` and `<Down>` are used to recall last/next input pattern from history. If you want to use them to navigate the result list just like `<C-K>` and `<C-J>` :

    `let g:Lf_CommandMap = {'<C-K>': ['<Up>'], '<C-J>': ['<Down>']}`

    for more detail, please refer to `:h g:Lf_CommandMap`.

 * Change the colors used in LeaderF

    ```vim
    let g:Lf_PopupPalette = {
        \  'light': {
        \      'Lf_hl_match': {
        \                'gui': 'NONE',
        \                'font': 'NONE',
        \                'guifg': 'NONE',
        \                'guibg': '#303136',
        \                'cterm': 'NONE',
        \                'ctermfg': 'NONE',
        \                'ctermbg': '236'
        \              },
        \      'Lf_hl_cursorline': {
        \                'gui': 'NONE',
        \                'font': 'NONE',
        \                'guifg': 'NONE',
        \                'guibg': '#303136',
        \                'cterm': 'NONE',
        \                'ctermfg': 'NONE',
        \                'ctermbg': '236'
        \              },
        \      },
        \  'dark': {
        \         ...
        \         ...
        \      }
        \  }
    ```
    All the highlight groups supported are defined in
    [LeaderF/autoload/leaderf/colorscheme/popup/default.vim](https://github.com/Yggdroot/LeaderF/blob/master/autoload/leaderf/colorscheme/popup/default.vim).

 * Change the default mapping of searching files command

    e.g. `let g:Lf_ShortcutF = '<C-P>'`

 * Show icons (should install fonts from https://github.com/ryanoasis/nerd-fonts)

    Support commands: buffer,file,mru,window

    ```vim
    " Show icons, icons are shown by default
    let g:Lf_ShowDevIcons = 1
    " For GUI vim, the icon font can be specify like this, for example
    let g:Lf_DevIconsFont = "DroidSansM Nerd Font Mono"
    " If needs
    set ambiwidth=double
    ```

Configuration examples
----------------------

```vim
" don't show the help in normal mode
let g:Lf_HideHelp = 1
let g:Lf_UseCache = 0
let g:Lf_UseVersionControlTool = 0
let g:Lf_IgnoreCurrentBufferName = 1
" popup mode
let g:Lf_WindowPosition = 'popup'
let g:Lf_StlSeparator = { 'left': "\ue0b0", 'right': "\ue0b2", 'font': "DejaVu Sans Mono for Powerline" }
let g:Lf_PreviewResult = {'Function': 0, 'BufTag': 0 }

let g:Lf_ShortcutF = "<leader>ff"
noremap <leader>fb :<C-U><C-R>=printf("Leaderf buffer %s", "")<CR><CR>
noremap <leader>fm :<C-U><C-R>=printf("Leaderf mru %s", "")<CR><CR>
noremap <leader>ft :<C-U><C-R>=printf("Leaderf bufTag %s", "")<CR><CR>
noremap <leader>fl :<C-U><C-R>=printf("Leaderf line %s", "")<CR><CR>

noremap <C-B> :<C-U><C-R>=printf("Leaderf! rg --current-buffer -e %s ", expand("<cword>"))<CR>
noremap <C-F> :<C-U><C-R>=printf("Leaderf! rg -e %s ", expand("<cword>"))<CR>
" search visually selected text literally
xnoremap gf :<C-U><C-R>=printf("Leaderf! rg -F -e %s ", leaderf#Rg#visual())<CR>
noremap go :<C-U>Leaderf! rg --recall<CR>

" should use `Leaderf gtags --update` first
let g:Lf_GtagsAutoGenerate = 0
let g:Lf_Gtagslabel = 'native-pygments'
noremap <leader>fr :<C-U><C-R>=printf("Leaderf! gtags -r %s --auto-jump", expand("<cword>"))<CR><CR>
noremap <leader>fd :<C-U><C-R>=printf("Leaderf! gtags -d %s --auto-jump", expand("<cword>"))<CR><CR>
noremap <leader>fo :<C-U><C-R>=printf("Leaderf! gtags --recall %s", "")<CR><CR>
noremap <leader>fn :<C-U><C-R>=printf("Leaderf gtags --next %s", "")<CR><CR>
noremap <leader>fp :<C-U><C-R>=printf("Leaderf gtags --previous %s", "")<CR><CR>
```

FAQ
---

https://github.com/Yggdroot/LeaderF/issues?q=label%3AFAQ+

License
-------

This plugin is released under the Apache License, Version 2.0 (the "License").

:heart: Sponsor
-------

If you like this software, please consider buying me a coffee.
https://github.com/Yggdroot/SponsorMe/blob/main/README.md#donate
(捐赠的朋友最好备注一下自己的ID）

  [1]: https://github.com/Yggdroot/Images/blob/master/leaderf/leaderf_popup.gif
  [2]: https://github.com/Yggdroot/Images/blob/master/leaderf/leaderf_2.gif
  [3]: https://github.com/gmarik/Vundle.vim
  [4]: https://github.com/Yggdroot/LeaderF/blob/master/doc/leaderf.txt#L189-L349
  [5]: https://github.com/junegunn/vim-plug
  [6]: https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat


# Green

[![Version](https://img.shields.io/pypi/v/green.svg?style=flat)](https://pypi.python.org/pypi/green)
[![PyPI downloads](https://img.shields.io/pypi/dm/green.svg)](https://pypistats.org/packages/green)
[![CI Status](https://github.com/CleanCut/green/workflows/CI/badge.svg)](https://github.com/CleanCut/green/actions)
[![Coverage Status](https://img.shields.io/coveralls/CleanCut/green.svg?style=flat)](https://coveralls.io/r/CleanCut/green?branch=main)

A clean, colorful, fast python test runner.

Features
--------

- **Clean** - Low redundancy in output. Result statistics for each test is vertically aligned.
- **Colorful** - Terminal output makes good use of color when the terminal supports it.
- **Fast** - Tests run in independent processes.  (One per processor by default.  Does *not* play nicely with `gevent`)
- **Powerful** - Multi-target + auto-discovery.
- **Traditional** - Use the normal `unittest` classes and methods for your unit tests.
- **Descriptive** - Multiple verbosity levels, from just dots to full docstring output.
- **Convenient** - Bash-completion and ZSH-completion of options and test targets.
- **Thorough** - Built-in integration with [coverage](http://nedbatchelder.com/code/coverage/).
- **Embedded** - Can be run with a setup command without in-site installation.
- **Modern** - Supports Python 3.8+. Additionally, [PyPy](http://pypy.org) is supported on a best-effort basis.
- **Portable** - macOS, Linux, and BSDs are fully supported.  Windows is supported on a best-effort basis.
- **Living** - This project grows and changes.  See the
  [changelog](https://github.com/CleanCut/green/blob/main/CHANGELOG.md)

Community
---------

- For **questions**, **comments**, or **feature requests**, please [open a discussion](https://github.com/CleanCut/green/discussions)
- For **bug reports**, please
  [submit an issue](https://github.com/CleanCut/green/issues/new) to the GitHub
  issue tracker for Green.
- Submit a [pull
  request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
  with a bug fix or new feature.
- :sparkling_heart: [Sponsor](https://github.com/sponsors/CleanCut) the maintainer to support this project

Training Course
--------

There is a training course available if you would like professional training:
[Python Testing with Green](https://www.udemy.com/python-testing-with-green/?couponCode=GREEN_GITHUB).

 ![Python Testing with Green](https://raw.githubusercontent.com/CleanCut/green/main/img/GreenCourseImagePromoStripe.png)

Screenshots
-----------

#### Top: With Green!  Bottom: Without Green :-(

![Python Unit Test Output](https://raw.githubusercontent.com/CleanCut/green/main/img/screenshot.png)

Quick Start
-----------

```bash
pip3 install green    # To upgrade: "pip3 install --upgrade green"
```

Now run green...

```bash
# From inside your code directory
green

# From outside your code directory
green code_directory

# A specific file
green test_stuff.py

# A specific test inside a large package.
#
# Assuming you want to run TestClass.test_function inside
# package/test/test_module.py ...
green package.test.test_module.TestClass.test_function

# To see all examples of all the failures, errors, etc. that could occur:
green green.examples

# To run Green's own internal unit tests:
green green
```

For more help, see the [complete command-line
options](https://github.com/CleanCut/green/blob/main/cli-options.txt) or run
`green --help`.

Config Files
------------

Configuration settings are resolved in this order, with settings found later
in the resolution chain overwriting earlier settings (last setting wins).

1) `$HOME/.green`
2) A config file specified by the environment variable `$GREEN_CONFIG`
3) `setup.cfg` in the current working directory of test run
4) `.green` in the current working directory of the test run
5) A config file specified by the command-line argument `--config FILE`
6) [Command-line arguments](https://github.com/CleanCut/green/blob/main/cli-options.txt)

Any arguments specified in more than one place will be overwritten by the
value of the LAST place the setting is seen.  So, for example, if a setting
is turned on in `~/.green` and turned off by a
[command-line argument](https://github.com/CleanCut/green/blob/main/cli-options.txt),
then the setting will be turned off.

Config file format syntax is `option = value` on separate lines.  `option` is
the same as the long options, just without the double-dash (`--verbose` becomes
`verbose`).

Most values should be `True` or `False`.  Accumulated values (verbose, debug)
should be specified as integers (`-vv` would be `verbose = 2`).

Example:

```
verbose       = 2
logging       = True
omit-patterns = myproj*,*prototype*
```

Troubleshooting
---------------

One easy way to avoid common importing problems is to navigate to the *parent*
directory of the directory your python code is in.  Then pass green the
directory your code is in and let it autodiscover the tests (see the Tutorial below
for tips on making your tests discoverable).

```bash
cd /parent/directory
green code_directory
```

Another way to address importing problems is to carefully set up your
`PYTHONPATH` environment variable to include the parent path of your code
directory.  Then you should be able to just run `green` from _inside_ your code
directory.

```bash
export PYTHONPATH=/parent/directory
cd /parent/directory/code_directory
green
```

Integration
-----------

### Bash and Zsh

To enable Bash-completion and Zsh-completion of options and test targets when
you press `Tab` in your terminal, add the following line to the Bash or Zsh
config file of your choice (usually `~/.bashrc` or `~/.zshrc`)

```bash
which green >& /dev/null && source "$( green --completion-file )"
```

### Coverage

Green has built-in integration support for the
[coverage](http://coverage.readthedocs.org/) module.  Add `-r` or
`--run-coverage` when you run green.

### `setup.py` command

Green is available as a `setup.py` runner, invoked as any other setup command:
```
python setup.py green
```
This requires green to be present in the `setup_requires` section of
your `setup.py` file. To run green on a specific target, use the `test_suite`
argument (or leave blank to let green discover tests itself):
```python
# setup.py
from setuptools import setup

setup(
    ...
    setup_requires = ['green'],
    # test_suite = "my_project.tests"
)
```

You can also add an alias to the `setup.cfg` file, so that `python setup.py test` actually runs green:

```ini
# setup.cfg

[aliases]
test = green
```

### Django

Django can use green as the test runner for running tests.

- To just try it out, use the --testrunner option of `manage.py`:
```
./manage.py test --testrunner=green.djangorunner.DjangoRunner
```
- Make it persistent by adding the following line to your `settings.py`:
```python
TEST_RUNNER="green.djangorunner.DjangoRunner"
```
- For verbosity, green adds an extra command-line option to `manage.py` which
  you can pass the number of `v`'s you would have used on green.
```
./manage.py test --green-verbosity 3
```
- For all other non-default green configuration under Django, you will need to
  use [green configuration files](#config-files).

### nose-parameterized

Green will run generated tests created by
[nose-parameterized](https://github.com/wolever/nose-parameterized).  They have
lots of examples of how to generate tests, so follow the link above if you're
interested.

Unit Test Structure Tutorial
----------------------------

This tutorial covers:

- External structure of your project (directory and file layout)
- Skeleton of a real test module
- How to import stuff from your project into your test module
- Gotchas about naming...everything.
- Where to run green from and what the output could look like.
- DocTests

For more in-depth online training please check out
[Python Testing with Green](https://github.com/CleanCut/green/blob/main/PythonTestingWithGreen.md):

- Layout your test packages and modules correctly
- Organize your tests effectively
- Learn the tools in the `unittest` and `mock` modules
- Write meaningful tests that enable quick refactoring
- Learn the difference between unit and integration tests
- Use advanced tips and tricks to get the most out of your tests
- Improve code quality
- Refactor code without fear
- Have a better coding experience
- Be able to better help others

### External Structure ###

This is what your project layout should look like with just one module in your
package:

    proj                  # 'proj' is the package
    ├── __init__.py
    ├── foo.py            # 'foo' (or proj.foo) is the only "real" module
    └── test              # 'test' is a sub-package
        ├── __init__.py
        └── test_foo.py   # 'test_foo' is the only "test" module

Notes:

1. There is an `__init__.py` in every directory.  Don't forget it.  It can be
   an empty file, but it needs to exist.

2. `proj` itself is a directory that you will be storing somewhere.  We'll
   pretend it's in `/home/user`

3. The `test` directory needs to start with `test`.

4. The test modules need to start with `test`.

When your project starts adding code in sub-packages, you will need to make a
choice on where you put their tests.  I prefer to create a `test` subdirectory
in each sub-package.

    proj
    ├── __init__.py
    ├── foo.py
    ├── subpkg
    │   ├── __init__.py
    │   ├── bar.py
    │   └── test              # test subdirectory in every sub-package
    │       ├── __init__.py
    │       └── test_bar.py
    └── test
        ├── __init__.py
        └── test_foo.py

The other option is to start mirroring your subpackage layout from within a single test directory.

    proj
    ├── __init__.py
    ├── foo.py
    ├── subpkg
    │   ├── __init__.py
    │   └── bar.py
    └── test
        ├── __init__.py
        ├── subpkg            # mirror sub-package layout inside test dir
        │   ├── __init__.py
        │   └── test_bar.py
        └── test_foo.py

### Skeleton of Test Module ###

Assume `foo.py` contains the following contents:

```python
def answer():
    return 42

class School():

    def food(self):
        return 'awful'

    def age(self):
        return 300
```

Here's a possible version of `test_foo.py` you could have.

```python
# Import stuff you need for the unit tests themselves to work
import unittest

# Import stuff that you want to test.  Don't import extra stuff if you don't
# have to.
from proj.foo import answer, School

# If you need the whole module, you can do this:
#     from proj import foo
#
# Here's another reasonable way to import the whole module:
#     import proj.foo as foo
#
# In either case, you would obviously need to access objects like this:
#     foo.answer()
#     foo.School()

# Then write your tests

class TestAnswer(unittest.TestCase):

    def test_type(self):
        "answer() returns an integer"
        self.assertEqual(type(answer()), int)

    def test_expected(self):
        "answer() returns 42"
        self.assertEqual(answer(), 42)

class TestSchool(unittest.TestCase):

    def test_food(self):
        school = School()
        self.assertEqual(school.food(), 'awful')

    def test_age(self):
        school = School()
        self.assertEqual(school.age(), 300)
```

Notes:

1. Your test class must subclass `unittest.TestCase`.  Technically, neither
   unittest nor Green care what the test class is named, but to be consistent
   with the naming requirements for directories, modules, and methods we
   suggest you start your test class with `Test`.

2. Start all your test method names with `test`.

3. What a test class and/or its methods _actually test_ is entirely up to you.
   In some sense it is an artform.  Just use the test classes to group a bunch
   of methods that seem logical to go together.  We suggest you try to test one
   thing with each method.

4. The methods of `TestAnswer` have docstrings, while the methods on
   `TestSchool` do not.  For more verbose output modes, green will use the
   method docstring to describe the test if it is present, and the name of the
   method if it is not.  Notice the difference in the output below.

### DocTests ###

Green can also run tests embedded in documentation via Python's built-in
[doctest] module.  Returning to our previous example, we could add docstrings
with example code to our `foo.py` module:

[doctest]: https://docs.python.org/3.12/library/doctest.html

```python
def answer():
    """
    >>> answer()
    42
    """
    return 42

class School():

    def food(self):
        """
        >>> s = School()
        >>> s.food()
        'awful'
        """
        return 'awful'

    def age(self):
        return 300
```

Then in some _test_ module you need to add a `doctest_modules = [ ... ]` list
to the top-level of the test module.  So lets revisit `test_foo.py` and add
that:

```python
# we could add this to the top or bottom of the existing file...

doctest_modules = ['proj.foo']
```

Then running `green -vv` might include this output:

```
  DocTests via `doctest_modules = [...]`
.   proj.foo.School.food
.   proj.foo.answer
```

...or with one more level of verbosity (`green -vvv`)

```
  DocTests via `doctest_modules = [...]`
.   proj.foo.School.food -> /Users/cleancut/proj/green/example/proj/foo.py:10
.   proj.foo.answer -> /Users/cleancut/proj/green/example/proj/foo.py:1
```

Notes:

1. There needs to be at least one `unittest.TestCase` subclass with a test
   method present in the test module for `doctest_modules` to be examined.

### Running Green ###

To run the unittests, we would change to the parent directory of the project
(`/home/user` in this example) and then run `green proj`.

**In a real terminal, this output is syntax highlighted**

    $ green proj
    ....

    Ran 4 tests in 0.125s using 8 processes

    OK (passes=4)

Okay, so that's the classic short-form output for unit tests.  Green really
shines when you start getting more verbose:

**In a real terminal, this output is syntax highlighted**

    $ green -vvv proj
    Green 4.1.0, Coverage 7.4.1, Python 3.12.2

    test_foo
      TestAnswer
    .   answer() returns 42
    .   answer() returns an integer
      TestSchool
    .   test_age
    .   test_food

    Ran 4 tests in 0.123s using 8 processes

    OK (passes=4)

Notes:

1. Green outputs clean, hierarchical output.

2. Test status is aligned on the _left_ (the four periods correspond to four
   passing tests)

3. Method names are replaced with docstrings when present.  The first two tests
   have docstrings you can see.

4. Green always outputs a summary of statuses that will add up to the total
   number of tests that were run.  For some reason, many test runners forget
   about statuses other than Error and Fail, and even the built-in unittest runner
   forgets about passing ones.

5. Possible values for test status (these match the `unittest` short status characters exactly)
 - `.` Pass
 - `F` Failure
 - `E` Error
 - `s` Skipped
 - `x` Expected Failure
 - `u` Unexpected pass

Origin Story
------------

Green grew out of a desire to see pretty colors.  Really!  A big part of the
whole **Red/Green/Refactor** process in test-driven-development is
_actually getting to see red and green output_.  Most python unit testing
actually goes **Gray/Gray/Refactor** (at least on my terminal, which is gray
text on black background).  That's a shame.  Even TV is in color these days.
Why not terminal output?  Even worse, the default output for most test runners
is cluttered, hard-to-read, redundant, and the dang status indicators are not
lined up in a vertical column!  Green fixes all that.

But how did Green come to be?  Why not just use one of the existing test
runners out there?  It's an interesting story, actually.  And it starts with
trial.

**trial**

I really like Twisted's trial test runner, though I don't really have any need
for the rest of the Twisted event-driven networking engine library.  I started
professionally developing in Python when version 2.3 was the latest, greatest
version and none of us in my small shop had ever even heard of unit testing
(gasp!).  As we grew, we matured and started testing and we chose trial to do
the test running.  If most of my projects at my day job hadn't moved to Python
3,  I probably would have just stuck with trial, but at the time I wrote green
[trial didn't run on Python 3](http://twistedmatrix.com/trac/ticket/5965)
(but since 15.4.0 it does). Trial was and is the foundation for my inspiration
for having better-than-unittest output in the first place.  It is a great
example of reducing redundancy (report module/class once, not on every line),
lining up status vertically, and using color.  I feel like Green trumped trial
in two important ways: 1) It wasn't a part of an immense event-driven
networking engine, and 2) it was not stuck in Python 2 as trial was at the
time.  Green will obviously never replace trial, as trial has features
necessary to run asynchronous unit tests on Twisted code.  After discovering
that I couldn't run trial under Python 3, I next tried...

**nose**

I had really high hopes for nose.  It seemed to be widely accepted.  It seemed
to be powerful.  The output was just horrible (exactly the same as unittest's
output).  But it had a plugin system!  I tried all the plugins I could find
that mentioned improving upon the output.  When I couldn't find one I liked, I
started developing Green (yes, this Green) *as a plugin for nose*.  I chose the
name Green for three reasons: 1) It was available on PyPi! 2) I like to focus
on the positive aspect of testing (everything passes!), and 3) It made a nice
counterpoint to several nose plugins that had "Red" in the name.  I made steady
progress on my plugin until I hit a serious problem in the nose plugin API.
That's when I discovered that [nose is in maintenance
mode](https://github.com/nose-devs/nose/issues/45#issuecomment-40816427) --
abandoned by the original developers, handed off to someone who won't fix
anything if it changes the existing behavior.  What a downer.  Despite the huge
user base, I already consider nose dead and gone.  A project which will not
change (even to fix bugs!) will die.  Even the maintainer keeps pointing
everyone to...

**nose2**

So I pivoted to nose2!  I started over developing Green (same repo -- it's in
the history).  I can understand the allure of a fresh rewrite as much as the
other guy.  Nose had made less-than-ideal design decisions, and this time they
would be done right!  Hopefully.  I had started reading nose code while writing
the plugin for it, and so I dived deep into nose2.  And ran into a mess.  Nose2
is alpha.  That by itself is not necessarily a problem, if the devs will
release early and often and work to fix things you run into.  I submitted a
3-line pull request to [fix some
problems](https://github.com/nose-devs/nose2/pull/171) where the behavior did
not conform to the already-written documentation which broke my plugin.  The
pull request wasn't initially accepted because I (ironically) didn't write unit
tests for it.  This got me thinking "I can write a better test runner than
*this*".  I got tired of the friction dealing with the nose/nose2 and decided
to see what it would take to write my own test runner.  That brought be to...

**unittest**

I finally went and started reading unittest (Python 2.7 and 3.4) source code.
unittest is its own special kind of mess, but it's universally built-in, and
most importantly, subclassing or replacing unittest objects to customize the
output looked a lot *easier* than writing a plugin for nose and nose2.  And it
was, for the output portion!  Writing the rest of the test runner turned out to
be quite a project, though.  I started over on Green *again*, starting down the
road to what we have now.  A custom runner that subclasses or replaces bits of
unittest to provide exactly the output (and other feature creep) that I wanted.

I had three initial goals for Green:

1. Colorful, clean output (at least as good as trial's)
2. Run on Python 3
3. Try to avoid making it a huge bundle of tightly-coupled, hard-to-read code.

I contend that I nailed **1.** and **2.**, and ended up implementing a bunch of
other useful features as well (like very high performance via running tests in
parallel in multiple processes).  Whether I succeeded with **3.** is debatable.
I continue to try to refactor and simplify, but adding features on top of a
complicated bunch of built-in code doesn't lend itself to the flexibility
needed for clear refactors.

Wait!  What about the other test runners?

- **pytest** -- Somehow I never realized pytest existed until a few weeks
  before I released Green 1.0.  Nowadays it seems to be pretty popular.  If I
  had discovered it earlier, maybe I wouldn't have made Green!  Hey, don't give
  me that look!  I'm not omniscient!

- **tox** -- I think I first ran across tox only a few weeks before I heard of
  pytest.  It's homepage didn't mention anything about color, so I didn't try
  using it.

- **the ones I missed** -- Er, haven't heard of them yet either.

I'd love to hear **your** feedback regarding Green.  Like it?  Hate it?  Have
some awesome suggestions?  Whatever the case, go
[open a discussion](https://github.com/CleanCut/green/discussions)


django-page-cms
===============

.. image:: https://readthedocs.org/projects/django-page-cms/badge/?version=latest
  :target: http://django-page-cms.readthedocs.io/en/latest/

.. image:: https://codeclimate.com/github/batiste/django-page-cms/badges/gpa.svg
  :target: https://codeclimate.com/github/batiste/django-page-cms
  :alt: Code Climate

.. image:: https://scrutinizer-ci.com/g/batiste/django-page-cms/badges/quality-score.png?b=master
  :target: https://scrutinizer-ci.com/g/batiste/django-page-cms/?branch=master
  :alt: Scrutinizer Code Quality

This Django CMS enables you to create and administrate hierarchical pages in a simple and powerful way.

For a quick demo.

.. code:: bash

  $ pip3 install "django-page-cms[full]"; gerbi --create mywebsite

Or with docker

.. code:: bash

  docker compose up fast
  # or if you want to build it yourself
  docker compose up web

To create a super user account

.. code:: bash

  docker compose run fast python example/manage.py createsuperuser

To create a demo website

.. code:: bash

 docker compose run fast python example/manage.py pages_demo

To run tests with docker

.. code:: bash

  docker compose run run-test

More informations

  * `Install <http://django-page-cms.readthedocs.io/en/latest/installation.html>`_
  * `Full documentation <http://django-page-cms.readthedocs.io/en/latest/>`_
  * `How to contribute <doc/contributions.rst>`_

Django page CMS is based around a placeholders concept. Placeholder is a special template tag that
you use in your page templates. Every time you add a placeholder in your template such field
dynamically appears in the page admin interface.

Each page can have a different template with different placeholders.

.. image:: https://github.com/batiste/django-page-cms/raw/master/doc/images/admin-screenshot-1.png
    :width: 350px
    :align: center

Those placeholder can also be edited inline

.. image:: https://github.com/batiste/django-page-cms/raw/master/doc/images/inline-edit.png
    :width: 350px
    :align: center


Another Qt installer(aqt)
=========================

- Release: |pypi|
- Documentation: |docs|
- Test status: |gha| and Coverage: |coveralls|
- Project maturity |Package health|

.. |pypi| image:: https://badge.fury.io/py/aqtinstall.svg
   :target: http://badge.fury.io/py/aqtinstall
.. |docs| image:: https://readthedocs.org/projects/aqtinstall/badge/?version=stable
   :target: https://aqtinstall.readthedocs.io/en/latest/?badge=stable
.. |gha| image:: https://github.com/miurahr/aqtinstall/workflows/Test%20on%20GH%20actions%20environment/badge.svg
   :target: https://github.com/miurahr/aqtinstall/actions?query=workflow%3A%22Test+on+GH+actions+environment%22
.. |coveralls| image:: https://coveralls.io/repos/github/miurahr/aqtinstall/badge.svg?branch=master
   :target: https://coveralls.io/github/miurahr/aqtinstall?branch=master
.. |Package health| image:: https://snyk.io/advisor/python/aqtinstall/badge.svg
  :target: https://snyk.io/advisor/python/aqtinstall
  :alt: aqtinstall

This is a utility alternative to the official graphical Qt installer, for using in CI environment
where an interactive UI is not usable, or just on command line.

It can automatically download prebuilt Qt binaries, documents and sources for target specified,
when the versions are on Qt download mirror sites.

.. note::
    Because it is an installer utility, it can download from Qt distribution site and its mirror.
    The site is operated by The Qt Company who may remove versions you may want to use that become end of support.
    Please don't blame us.

.. warning::
    This is NOT franchised with The Qt Company and The Qt Project. Please don't ask them about aqtinstall.

License and copyright
---------------------

This program is distributed under MIT license.

Qt SDK and its related files are under its licenses. When using aqtinstall, you are considered
to agree upon Qt licenses. **aqtinstall installs Qt SDK as of a (L)GPL Free Software.**

For details see `Qt licensing`_ and `Licenses used in Qt5`_

.. _`Qt licensing`: https://www.qt.io/licensing/

.. _`Licenses used in Qt5`: https://doc.qt.io/qt-5/licenses-used-in-qt.html

Requirements
------------

- Minimum Python version:
    3.8

- Recommended Python version:
    3.9, 3.12 (frequently tested on)

- Dependencies:
    requests
    semantic_version
    patch
    py7zr
    texttable
    bs4
    defusedxml

- Operating Systems:
    Linux, macOS, MS Windows

Documentation
-------------

There is precise documentation with many examples.
You are recommended to read the *Getting started* section.

- Getting started: https://aqtinstall.readthedocs.io/en/latest/getting_started.html
- Stable (v3.1.x): https://aqtinstall.readthedocs.io/en/stable
- Latest: https://aqtinstall.readthedocs.io/en/latest
- Old (v2.2.3) : https://aqtinstall.readthedocs.io/en/v2.2.3/

Install
-------

Same as usual, it can be installed with ``pip``:

.. code-block:: console

    pip install -U pip
    pip install aqtinstall

You are recommended to update pip before installing aqtinstall.

.. note::

    aqtinstall depends several packages, that is required to download files from internet, and extract 7zip archives,
    some of which are precompiled in several platforms.
    Older pip does not handle it expectedly(see #230).

.. note::

    When you want to use it on MSYS2/Mingw64 environment, you need to set environmental variable
    ``export SETUPTOOLS_USE_DISTUTILS=stdlib``, because of setuptools package on mingw wrongly
    raise error ``VC6.0 is not supported``

.. warning::

    There is an unrelated package `aqt` in pypi. Please don't confuse with it.

It may be difficult to set up some Windows systems with the correct version of Python and all of ``aqt``'s dependencies.
To get around this problem, ``aqtinstall`` offers ``aqt.exe``, a Windows executable that contains Python and all required dependencies.
You may access ``aqt.exe`` from the `Releases section`_, under "assets", or via the persistent link to `the continuous build`_ of ``aqt.exe``.

.. _`Releases section`: https://github.com/miurahr/aqtinstall/releases
.. _`the continuous build`: https://github.com/miurahr/aqtinstall/releases/download/Continuous/aqt.exe

Example
--------

When installing Qt SDK 6.2.0 for Windows.

Check the options that can be used with the ``list-qt`` subcommand, and query available architectures:

.. code-block:: console

    aqt list-qt windows desktop --arch 6.2.0

Then you may get candidates: ``win64_mingw81 win64_msvc2019_64 win64_msvc2019_arm64``. You can also query the available modules:

.. code-block:: console

    aqt list-qt windows desktop --modules 6.2.0 win64_mingw81

When you decide to install Qt SDK version 6.2.0 for mingw v8.1:

.. code-block:: console

    aqt install-qt windows desktop 6.2.0 win64_mingw81 -m all

The optional `-m all` argument installs all the modules available for Qt 6.2.0; you can leave it off if you don't want those modules.

To install Qt 6.2.0 with the modules 'qtcharts' and 'qtnetworking', you can use this command (note that the module names are lowercase):

.. code-block:: console

    aqt install-qt windows desktop 6.2.0 win64_mingw81 -m qtcharts qtnetworking

When you want to install Qt for android with required desktop toolsets

.. code-block:: console

    aqt install-qt linux android 5.13.2 android_armv7 --autodesktop

When aqtinstall downloads and installs packages, it updates package configurations
such as prefix directory in ``bin/qt.conf``, and ``bin/qconfig.pri``
to make it working well with installed directory.

.. note::
   It is your own task to set some environment variables to fit your platform, such as PATH, QT_PLUGIN_PATH, QML_IMPORT_PATH, and QML2_IMPORT_PATH. aqtinstall will never do it for you, in order not to break the installation of multiple versions.

.. warning::
   If you are using aqtinstall to install the ios version of Qt, please be aware that
   there are compatibility issues between XCode 13+ and versions of Qt less than 6.2.4.
   You may use aqtinstall to install older versions of Qt for ios, but the developers of
   aqtinstall cannot guarantee that older versions will work on the most recent versions of MacOS.
   Aqtinstall is tested for ios on MacOS 12 with Qt 6.2.4 and greater.
   All earlier versions of Qt are expected not to function.

Testimonies
-----------

Some projects utilize aqtinstall, and there are several articles and discussions

* GitHub Actions: `install_qt`_

* Docker image: `docker aqtinstall`_

* Yet another comic reader: `YACReader`_  utilize on Azure-Pipelines

.. _`install_qt`: https://github.com/jurplel/install-qt-action
.. _`docker aqtinstall`: https://github.com/vslotman/docker-aqtinstall
.. _`pyqt5-tools`: https://github.com/altendky/pyqt5-tools
.. _`YACReader`: https://github.com/YACReader/yacreader

* Contributor Nelson's blog article: `Fast and lightweight headless Qt Installer from Qt Mirrors - aqtinstall`_

* Lostdomain.org blog: `Using Azure DevOps Pipelines with Qt`_

* Wincak's Weblog: `Using Azure CI for cross-platform Linux and Windows Qt application builds`_

* Qt Forum: `Automatic installation for Travis CI (or any other CI)`_

* Qt Forum: `Qt silent, unattended install`_

* Reddit: `Qt Maintenance tool now requires you to enter your company name`_

* Qt Study group presentation: `Another Qt CLI installer`_

.. _`Fast and lightweight headless Qt Installer from Qt Mirrors - aqtinstall`: https://mindflakes.com/posts/2019/06/02/fast-and-lightweight-headless-qt-installer-from-qt-mirrors-aqtinstall/
.. _`Using Azure DevOps Pipelines with Qt`: https://lostdomain.org/2019/12/27/using-azure-devops-pipelines-with-qt/
.. _`Using Azure CI for cross-platform Linux and Windows Qt application builds`: https://www.wincak.name/programming/using-azure-ci-for-cross-platform-linux-and-windows-qt-application-builds/
.. _`Automatic installation for Travis CI (or any other CI)`: https://forum.qt.io/topic/114520/automatic-installation-for-travis-ci-or-any-other-ci/2
.. _`Qt silent, unattended install`: https://forum.qt.io/topic/122185/qt-silent-unattended-install
.. _`Qt Maintenance tool now requires you to enter your company name`: https://www.reddit.com/r/QtFramework/comments/grgrux/qt_maintenance_tool_now_requires_you_to_enter/
.. _`Another Qt CLI installer`: https://www.slideshare.net/miurahr-nttdata/aqt-install-for-qt-tokyo-r-2-20196

History
-------

This program is originally shown in Kaidan project as a name `qli-installer`_.
The ``aqtinstall`` project extend and improve it.

.. _`qli-installer`: https://lnj.gitlab.io/post/qli-installer


Intel® Extension for PyTorch\*
===========================

**CPU** [💻main branch](https://github.com/intel/intel-extension-for-pytorch/tree/main)   |   [🌱Quick Start](https://intel.github.io/intel-extension-for-pytorch/cpu/latest/tutorials/getting_started.html)   |   [📖Documentations](https://intel.github.io/intel-extension-for-pytorch/cpu/latest/)   |   [🏃Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=cpu&version=v2.3.0%2Bcpu)   |   [💻LLM Example](https://github.com/intel/intel-extension-for-pytorch/tree/main/examples/cpu/inference/python/llm)

**GPU** [💻main branch](https://github.com/intel/intel-extension-for-pytorch/tree/xpu-main)   |   [🌱Quick Start](https://intel.github.io/intel-extension-for-pytorch/xpu/latest/tutorials/getting_started.html)   |   [📖Documentations](https://intel.github.io/intel-extension-for-pytorch/xpu/latest/)   |   [🏃Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu)   |   [💻LLM Example](https://github.com/intel/intel-extension-for-pytorch/tree/xpu-main/examples/gpu/inference/python/llm)

Intel® Extension for PyTorch\* extends PyTorch\* with up-to-date features optimizations for an extra performance boost on Intel hardware. Optimizations take advantage of Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Vector Neural Network Instructions (VNNI) and Intel® Advanced Matrix Extensions (Intel® AMX) on Intel CPUs as well as Intel Xe Matrix Extensions (XMX) AI engines on Intel discrete GPUs. Moreover, Intel® Extension for PyTorch* provides easy GPU acceleration for Intel discrete GPUs through the PyTorch* xpu device.

## ipex.llm - Large Language Models (LLMs) Optimization

In the current technological landscape, Generative AI (GenAI) workloads and models have gained widespread attention and popularity. Large Language Models (LLMs) have emerged as the dominant models driving these GenAI applications. Starting from 2.1.0, specific optimizations for certain LLM models are introduced in the Intel® Extension for PyTorch\*. Check [**LLM optimizations**](./examples/cpu/inference/python/llm) for details.

### Optimized Model List

| MODEL FAMILY | MODEL NAME (Huggingface hub) | FP32 | BF16 | Static quantization INT8 | Weight only quantization INT8 | Weight only quantization INT4 |
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|LLAMA| meta-llama/Llama-2-7b-hf | 🟩 | 🟩 | 🟩 | 🟩 | 🟨 |
|LLAMA| meta-llama/Llama-2-13b-hf | 🟩 | 🟩 | 🟩 | 🟩 | 🟩 |
|LLAMA| meta-llama/Llama-2-70b-hf | 🟩 | 🟩 | 🟩 | 🟩 | 🟩 |
|LLAMA| meta-llama/Meta-Llama-3-8B | 🟩 | 🟩 | 🟨 | 🟩 |   |
|LLAMA| meta-llama/Meta-Llama-3-70B | 🟩 | 🟩 | 🟨 | 🟩 | 🟨 |
|GPT-J| EleutherAI/gpt-j-6b | 🟩 | 🟩 | 🟩 | 🟩 | 🟩 |
|GPT-NEOX| EleutherAI/gpt-neox-20b | 🟩 | 🟨 | 🟨 | 🟩 | 🟨 |
|DOLLY| databricks/dolly-v2-12b | 🟩 | 🟨 | 🟨 | 🟩 | 🟨 |
|FALCON| tiiuae/falcon-7b  | 🟩 | 🟩 | 🟩 | 🟩 |   |
|FALCON| tiiuae/falcon-40b | 🟩 | 🟩 | 🟩 | 🟩 | 🟩 |
|OPT| facebook/opt-30b | 🟩 | 🟩 | 🟩 | 🟩 | 🟨 |
|OPT| facebook/opt-1.3b | 🟩 | 🟩 | 🟩 | 🟩 | 🟨 |
|Bloom| bigscience/bloom-1b7 | 🟩 | 🟨 | 🟩 | 🟩  | 🟨 |
|CodeGen| Salesforce/codegen-2B-multi | 🟩 | 🟩 | 🟩 | 🟩 | 🟩 |
|Baichuan| baichuan-inc/Baichuan2-7B-Chat | 🟩 | 🟩 | 🟩 | 🟩 |    |
|Baichuan| baichuan-inc/Baichuan2-13B-Chat | 🟩 | 🟩 | 🟨 | 🟩 |    |
|Baichuan| baichuan-inc/Baichuan-13B-Chat | 🟩 | 🟨 | 🟩 | 🟩 |    |
|ChatGLM| THUDM/chatglm3-6b | 🟩 | 🟩 | 🟨 | 🟩 |    |
|ChatGLM| THUDM/chatglm2-6b | 🟩 | 🟩 | 🟨 | 🟩 |    |
|GPTBigCode| bigcode/starcoder | 🟩 | 🟩 | 🟨 | 🟩 | 🟨 |
|T5| google/flan-t5-xl | 🟩 | 🟩 |   | 🟩 |    |
|MPT| mosaicml/mpt-7b | 🟩 | 🟩 | 🟩 | 🟩 | 🟩 |
|Mistral| mistralai/Mistral-7B-v0.1 | 🟩 | 🟩 | 🟨 | 🟩 | 🟨 |
|Mixtral| mistralai/Mixtral-8x7B-v0.1 | 🟩 | 🟩 |  |  🟩 | 🟨 |
|Stablelm| stabilityai/stablelm-2-1_6b | 🟩 | 🟩 | 🟨 | 🟩 | 🟨 |
|Qwen| Qwen/Qwen-7B-Chat | 🟩 | 🟩 | 🟨 |  🟩 |  |
|LLaVA| liuhaotian/llava-v1.5-7b | 🟩 | 🟩 |   | 🟩 |    |
|GIT| microsoft/git-base | 🟩 | 🟩 |   | 🟩 |    |
|Yuan| IEITYuan/Yuan2-102B-hf | 🟩 | 🟩 |   | 🟨 |    |
|Phi| microsoft/phi-2 | 🟩 | 🟩 | 🟩 | 🟩 | 🟨 |

- 🟩 signifies that the model can perform well and with good accuracy (<1% difference as compared with FP32).

- 🟨 signifies that the model can perform well while accuracy may not been in a perfect state (>1% difference as compared with FP32).

*Note*: The above verified models (including other models in the same model family, like "codellama/CodeLlama-7b-hf" from LLAMA family) are well supported with all optimizations like indirect access KV cache, fused ROPE, and prepacked TPP Linear (fp32/bf16).
We are working in progress to better support the models in the tables with various data types. In addition, more models will be optimized in the future.

In addition, Intel® Extension for PyTorch* introduces module level optimization APIs (prototype feature) since release 2.3.0.
The feature provides optimized alternatives for several commonly used LLM modules and functionalities for the optimizations of the niche or customized LLMs.
Please read [**LLM module level optimization practice**](./examples/cpu/inference/python/llm-modeling) to better understand how to optimize your own LLM and achieve better performance.

## Support

The team tracks bugs and enhancement requests using [GitHub issues](https://github.com/intel/intel-extension-for-pytorch/issues/). Before submitting a suggestion or bug report, search the existing GitHub issues to see if your issue has already been reported.

## License

_Apache License_, Version _2.0_. As found in [LICENSE](https://github.com/intel/intel-extension-for-pytorch/blob/main/LICENSE) file.

## Security

See Intel's [Security Center](https://www.intel.com/content/www/us/en/security-center/default.html)
for information on how to report a potential security issue or vulnerability.

See also: [Security Policy](SECURITY.md)


[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
![Contributors](https://img.shields.io/github/contributors-anon/ISS-Mimic/Mimic)
[![Discord](https://img.shields.io/discord/764217406041882684)](https://discord.gg/zPKyE6hBSe)
![GitHub last commit](https://img.shields.io/github/last-commit/ISS-Mimic/Mimic)
[![Twitter Follow](https://img.shields.io/twitter/follow/ISS_Mimic?style=social)](https://twitter.com/ISS_Mimic)
[![YouTube Video Views](https://img.shields.io/youtube/views/W9iZBjzOEEQ?style=social)](https://www.youtube.com/watch?v=W9iZBjzOEEQ)

Welcome to the ISS Mimic project repository! We are developing a 3D printed model of the International Space Station that uses the actual ISS live telemetry to mimic the actual positioning of the ISS solar arrays and radiators! We are also developing tools to visualize all of the ISS public telemetry in informative ways! Join our discord to provide feedback, ask questions, or get involved!

https://discord.gg/zPKyE6hBSe

We are always looking for people to help with the coding of our raspberry pi telemetry display program, the telemetry website, the creation of ISS CAD models, general project ideas, etc...

If you want to build your own ISS Mimic, or just want to use the ISS telemetry in your own application, we are more than happy to help.

Check out our youtube video:

[![ISS MIMIC!](https://img.youtube.com/vi/W9iZBjzOEEQ/0.jpg)](https://www.youtube.com/watch?v=W9iZBjzOEEQ)

![ISS MIMIC!](https://github.com/ISS-Mimic/Mimic/blob/master/Pi/imgs/main/ISSmimicLogoPartsGroundtrack.png)

The International Space Station is constantly downlinking data (telemetry) for Mission Control to monitor. Several years ago, NASA provided some of the data to the public in order to spur interest in the ISS and space exploration under the (now defunct) ISSlive project using the lightstreamer service (http://demos.lightstreamer.com/ISSLive/). We saw this project and wanted to expand on its potential. Since the development of isslive.com, some more data was added to the public feed and was, sadly, never incorporated into the website. The current total epic and all inclusive list of public telemetry can be seen at our page here https://iss-mimic.github.io/Mimic/ and in an even cooler format here https://iss-mimic.github.io/Mimic/dashboard.html Sadly, ISSlive.com is no longer maintained, but thanks largely in part to our efforts, the telemetry is still being provided to the public through the same lightstreamer connection.

You can find info on installing our (still heavily in development but with some pretty cool working features now) custom ISS telemetry display program here: https://github.com/ISS-Mimic/Mimic/wiki/Build-Instruction%3A-Mimic-Software-Setup-Instructions

The telemetry is awesome in and of itself. But we wanted to do something more with the data, using it to drive software and hardware. Software - running a Raspberry Pi, we want to display all of the telemetry in an interesting and informative manner, enabling visualization of more than just boring numbers. Hardware - using Arduino related microcontrollers, receiving data from the Raspberry Pi, we want to control a 3D-printed model of the ISS and make it exactly match up with the actual ISS in real time. All of the solar arrays, radiators, and outboard truss will be able to rotate to match the ISS joint angles.

![Stuff that moves](http://i.imgur.com/ByhYKrL.png)

The project is still a work in progress. We have a fully functioning model that works with all 12 motors turning correctly and able to sync with live data. However, we want to increase the fidelity. Our low-fidelity model is completely finished and available here: [STL Files](https://github.com/ISS-Mimic/Mimic/tree/main/3D_Printing). We are still working on the high fidelity upgrade (help us!) and trying to make the ISS look as detailed as possible while still being printable. The software is still a work in progress, too. But from the standpoint of receiving telemetry and transmitting it to the Arduinos, the basic functionality is finished. The finishing touches on the software are all for visualizing the telemetry.

![Functional but not pretty model!](https://i.imgur.com/OlkpRSA.jpg)

DISCLAIMER - We are not professional programmers. We are just a group of dedicated ISS program employees and enthusiasts trying to share our love of the space program through this awesome project. All the code maintained here was created to work toward our specific goal, and much of it was using languages that none of us had used before. You may find the structure, style, and lack of comments to be completely novice and infuriating. You may scream out in frustration, laugh in disgust, or even weep at the obfuscated nonsense appearing before your eyes.

That said, feel free to improve upon our caffeine-induced, late-night, insanity-plagued programming madness or even just scrap it all and make something better using our ideas.

Check out the wiki for more information.

You can view a video showing some of our project here:https://youtu.be/W9iZBjzOEEQ. Here's an older video: https://www.youtube.com/watch?v=sbdHXjDQ-U8 .

The software is pretty cool and provides even more in-depth functionality than isslive.com. We'll be adding videos and pictures soon to show off the software capabilities.

# Status/Priorities
We are currently focused on refining the CAD model and splitting out all the STL files for printing. All of the STL files currently in this repo are likely outdated or currently changing. We will also release the raw CAD once finished.

We are also working on finishing the software.


|Linux Build Status| |Code coverage| |Documentation Status| |CII Best Practices|

.. |Linux Build Status| image:: https://github.com/common-workflow-language/schema_salad/actions/workflows/ci-tests.yml/badge.svg?branch=main
   :target: https://github.com/common-workflow-language/schema_salad/actions/workflows/ci-tests.yml
.. |Code coverage| image:: https://codecov.io/gh/common-workflow-language/schema_salad/branch/main/graph/badge.svg
   :target: https://codecov.io/gh/common-workflow-language/schema_salad
.. |Documentation Status| image:: https://readthedocs.org/projects/schema-salad/badge/?version=latest
   :target: https://schema-salad.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status
.. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/1867/badge
   :target: https://bestpractices.coreinfrastructure.org/projects/1867

Schema Salad
------------

Salad is a schema language for describing JSON or YAML structured
linked data documents.  Salad schema describes rules for
preprocessing, structural validation, and hyperlink checking for
documents described by a Salad schema. Salad supports rich data
modeling with inheritance, template specialization, object
identifiers, object references, documentation generation, code
generation, and transformation to RDF_. Salad provides a bridge
between document and record oriented data modeling and the Semantic
Web.

The Schema Salad library is Python 3.8+ only.

Installation
------------

::

   pip3 install schema_salad

If you intend to use the `schema-salad-tool --codegen=python` feature, please
include the `[pycodegen]` extra::

   pip3 install schema_salad[pycodegen]

To install from source::

   git clone https://github.com/common-workflow-language/schema_salad
   cd schema_salad
   pip3 install .
   # or pip3 install .[pycodegen] if needed

Commands
--------

Schema salad can be used as a command line tool or imported as a Python module::

   $ schema-salad-tool
   usage: schema-salad-tool [-h] [--rdf-serializer RDF_SERIALIZER] [--skip-schemas]
                         [--strict-foreign-properties] [--print-jsonld-context]
                         [--print-rdfs] [--print-avro] [--print-rdf] [--print-pre]
                         [--print-index] [--print-metadata] [--print-inheritance-dot]
                         [--print-fieldrefs-dot] [--codegen language] [--codegen-target CODEGEN_TARGET]
                         [--codegen-examples directory] [--codegen-package dotted.package]
                         [--codegen-copyright copyright_string] [--print-oneline]
                         [--print-doc] [--strict | --non-strict]
                         [--verbose | --quiet | --debug] [--only ONLY] [--redirect REDIRECT]
                         [--brand BRAND] [--brandlink BRANDLINK] [--brandstyle BRANDSTYLE]
                         [--brandinverse] [--primtype PRIMTYPE] [--version]
                         [schema] [document]

   $ python
   >>> import schema_salad

Validate a schema::

   $ schema-salad-tool myschema.yml

Validate a document using a schema::

   $ schema-salad-tool myschema.yml mydocument.yml

Generate HTML documentation::

   $ schema-salad-tool --print-doc myschema.yml > myschema.html
   $ # or
   $ schema-salad-doc myschema.yml > myschema.html

Get JSON-LD context::

   $ schema-salad-tool --print-jsonld-context myschema.yml mydocument.yml

Convert a document to JSON-LD::

   $ schema-salad-tool --print-pre myschema.yml mydocument.yml > mydocument.jsonld

Generate Python classes for loading/generating documents described by the schema
(Requires the `[pycodegen]` extra)::

   $ schema-salad-tool --codegen=python myschema.yml > myschema.py

Display inheritance relationship between classes as a graphviz 'dot' file and
render as SVG::

   $ schema-salad-tool --print-inheritance-dot myschema.yml | dot -Tsvg > myschema.svg

Codegen Examples
----------------

The examples in the tables below are helpful to see how to use the output of `schema-salad-tool --codegen`
in different languages for loading and/or creating/editing/saving objects.

First set of examples is using the `CWL v1.2 schema <https://github.com/common-workflow-language/cwl-v1.2/blob/1.2.1_proposed/CommonWorkflowLanguage.yml>`_:

+-------------+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Language    | Repository                                              | Serialization Example                                                                                | Deserialization Example                                                                                |
+=============+=========================================================+======================================================================================================================================================+============================================================================================================================================================================+
| Python      | https://github.com/common-workflow-language/cwl-utils/  | `create_cwl_from_objects.py <https://github.com/common-workflow-language/cwl-utils/blob/main/create_cwl_from_objects.py>`_                           | `load_document() <https://github.com/common-workflow-language/cwl-utils/blob/main/cwl_utils/parser/__init__.py#L93>`_                                                      |
+-------------+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Java        | https://github.com/common-workflow-language/cwljava/    | (Not yet implemented)                                                                                | `PackedWorkflowClassTest.java <https://github.com/common-workflow-language/cwljava/blob/cwl-1.2.0/src/test/java/org/w3id/cwl/cwl1_2/utils/PackedWorkflowClassTest.java>`_  |
+-------------+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| TypeScript  | https://github.com/common-workflow-lab/cwl-ts-auto      | `Creating, editing, and saving CWL docs with TypeScript <https://github.com/common-workflow-lab/cwl-ts-auto#creating-editing-and-saving-documents>`_ | `Loading CWL documents with TypeScript <https://github.com/common-workflow-lab/cwl-ts-auto#loading-documents>`_                                                            |
+-------------+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| .Net        | https://github.com/common-workflow-lab/CWLDotNet        | `Creating, editing, and saving CWL docs with .Net <https://github.com/common-workflow-lab/CWLDotNet#creating-editing-and-serializing-documents>`_    | `Loading CWL documents with .Net <https://github.com/common-workflow-lab/CWLDotNet#loading-documents>`_                                                                    |
+-------------+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| C++         | https://github.com/common-workflow-lab/cwl-cpp-auto     | `cwl_output_example.cpp <https://github.com/common-workflow-lab/cwl-cpp-auto/blob/main/cwl_output_example.cpp>`_                                     | `cwl_input_example.cpp <https://github.com/common-workflow-lab/cwl-cpp-auto/blob/main/cwl_input_example.cpp>`_                                                             |
+-------------+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| D           | https://github.com/common-workflow-lab/cwl-d-auto       | `How to use <https://github.com/common-workflow-lab/cwl-d-auto#how-to-use>`_                                                                         | `How to use <https://github.com/common-workflow-lab/cwl-d-auto#how-to-use>`_                                                                                |
+-------------+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Second set of examples is for the `Galaxy Workflow Format 2 <https://github.com/galaxyproject/gxformat2/>`_ schema:

+-------------+------------------------------------------------------------------------------------+
| Language    | Path                                                                               |
+=============+====================================================================================+
| Python      | https://github.com/galaxyproject/gxformat2/blob/master/gxformat2/schema/v19_09.py  |
+-------------+------------------------------------------------------------------------------------+
| Java        | https://github.com/galaxyproject/gxformat2/tree/master/java                        |
+-------------+------------------------------------------------------------------------------------+
| TypeScript  | https://github.com/galaxyproject/gxformat2/tree/master/typescript                  |
+-------------+------------------------------------------------------------------------------------+

Quick Start
-----------

Let's say you have a 'basket' record that can contain items measured either by
weight or by count.  Here's an example::

   basket:
     - product: bananas
       price: 0.39
       per: pound
       weight: 1
     - product: cucumbers
       price: 0.79
       per: item
       count: 3

We want to validate that all the expected fields are present, the
measurement is known, and that "count" cannot be a fractional value.
Here is an example schema to do that::

   - name: Product
     doc: |
       The base type for a product.  This is an abstract type, so it
       can't be used directly, but can be used to define other types.
     type: record
     abstract: true
     fields:
       product: string
       price: float

   - name: ByWeight
     doc: |
       A product, sold by weight.  Products may be sold by pound or by
       kilogram.  Weights may be fractional.
     type: record
     extends: Product
     fields:
       per:
         type:
           type: enum
           symbols:
             - pound
             - kilogram
         jsonldPredicate: '#per'
       weight: float

   - name: ByCount
     doc: |
       A product, sold by count.  The count must be a integer value.
     type: record
     extends: Product
     fields:
       per:
         type:
           type: enum
           symbols:
             - item
         jsonldPredicate: '#per'
       count: int

   - name: Basket
     doc: |
       A basket of products.  The 'documentRoot' field indicates it is a
       valid starting point for a document.  The 'basket' field will
       validate subtypes of 'Product' (ByWeight and ByCount).
     type: record
     documentRoot: true
     fields:
       basket:
         type:
           type: array
           items: Product

You can check the schema and document in schema_salad/tests/basket_schema.yml
and schema_salad/tests/basket.yml::

   $ schema-salad-tool basket_schema.yml basket.yml
   Document `basket.yml` is valid

Documentation
-------------

See the specification_ and the metaschema_ (salad schema for itself).  For an
example application of Schema Salad see the Common Workflow Language_.

Rationale
---------

The JSON data model is an popular way to represent structured data.  It is
attractive because of it's relative simplicity and is a natural fit with the
standard types of many programming languages.  However, this simplicity comes
at the cost that basic JSON lacks expressive features useful for working with
complex data structures and document formats, such as schemas, object
references, and namespaces.

JSON-LD is a W3C standard providing a way to describe how to interpret a JSON
document as Linked Data by means of a "context".  JSON-LD provides a powerful
solution for representing object references and namespaces in JSON based on
standard web URIs, but is not itself a schema language.  Without a schema
providing a well defined structure, it is difficult to process an arbitrary
JSON-LD document as idiomatic JSON because there are many ways to express the
same data that are logically equivalent but structurally distinct.

Several schema languages exist for describing and validating JSON data, such as
JSON Schema and Apache Avro data serialization system, however none
understand linked data.  As a result, to fully take advantage of JSON-LD to
build the next generation of linked data applications, one must maintain
separate JSON schema, JSON-LD context, RDF schema, and human documentation,
despite significant overlap of content and obvious need for these documents to
stay synchronized.

Schema Salad is designed to address this gap.  It provides a schema language
and processing rules for describing structured JSON content permitting URI
resolution and strict document validation.  The schema language supports linked
data through annotations that describe the linked data interpretation of the
content, enables generation of JSON-LD context and RDF schema, and production
of RDF triples by applying the JSON-LD context.  The schema language also
provides for robust support of inline documentation.

.. _JSON-LD: http://json-ld.org
.. _Avro: http://avro.apache.org
.. _metaschema: https://github.com/common-workflow-language/schema_salad/blob/main/schema_salad/metaschema/metaschema.yml
.. _specification: http://www.commonwl.org/v1.2/SchemaSalad.html
.. _Language: https://github.com/common-workflow-language/cwl-v1.2/blob/v1.2.0/CommandLineTool.yml
.. _RDF: https://www.w3.org/RDF/


# COMPAS FAB: Robotic Fabrication for COMPAS

[![Github Actions Build Status](https://github.com/compas-dev/compas_fab/workflows/build/badge.svg)](https://github.com/compas-dev/compas_fab/actions)
[![Github Actions Integration Status](https://github.com/compas-dev/compas_fab/workflows/integration/badge.svg)](https://github.com/compas-dev/compas_fab/actions)
[![License](https://img.shields.io/github/license/compas-dev/compas_fab.svg)](https://pypi.python.org/pypi/compas_fab)
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/compas_fab)](https://anaconda.org/conda-forge/compas_fab)
[![pip downloads](https://img.shields.io/pypi/dm/compas_fab)](https://pypi.python.org/project/compas_fab)
[![PyPI Package latest release](https://img.shields.io/pypi/v/compas_fab.svg)](https://pypi.python.org/pypi/compas_fab)
[![Anaconda](https://img.shields.io/conda/vn/conda-forge/compas_fab.svg)](https://anaconda.org/conda-forge/compas_fab)
[![Supported implementations](https://img.shields.io/pypi/implementation/compas_fab.svg)](https://pypi.python.org/pypi/compas_fab)
[![DOI](https://zenodo.org/badge/107952684.svg)](https://zenodo.org/badge/latestdoi/107952684)
[![Twitter Follow](https://img.shields.io/twitter/follow/compas_dev?style=social)](https://twitter.com/compas_dev)

*Robotic fabrication package for the COMPAS Framework** that facilitates the
planning and execution of robotic fabrication processes. It provides interfaces
to existing software libraries and tools available in the field of robotics
(e.g. OMPL, ROS) and makes them accessible from within the parametric design
environment. The package builds upon [COMPAS](https://compas.dev/),
an open-source Python-based framework for collaboration and research in
architecture, engineering and digital fabrication.

## Main features

* Multiple backends for simulation and execution (eg. [ROS: Robot Operating System](https://ros.org))
* Planning tools: kinematic solvers, path planning, etc.
* Execution tools: feedback loops, robot control, etc.

**COMPAS FAB** runs on Python 3.x and IronPython 2.7.

## Getting Started

The recommended way to install **COMPAS FAB** is to use [anaconda/conda](https://conda.io/docs/):

    conda install -c conda-forge compas_fab

It can also be installed using `pip`:

    pip install compas_fab

> On Windows, you may need to install [Microsoft Visual C++ 14.0](https://www.scivision.co/python-windows-visual-c++-14-required/).

Once the installation is completed, you can verify your setup.
Start Python from the command prompt and run the following:

    >>> import compas_fab

## First Steps

* [Documentation](https://compas.dev/compas_fab/latest/)
* [COMPAS FAB Examples](https://compas.dev/compas_fab/latest/examples.html)
* [COMPAS FAB API Reference](https://compas.dev/compas_fab/latest/api.html)
* [COMPAS User Guide](https://compas.dev/compas/latest/userguide)
* [COMPAS API Reference](https://compas.dev/compas/latest/api)

## Questions and feedback

We encourage the use of the [COMPAS framework forum](https://forum.compas-framework.org/)
for questions and discussions.

## Contributing

We love contributions!

Check the [Contributor's Guide](https://github.com/compas-dev/compas_fab/blob/main/CONTRIBUTING.rst)
for more details.

## Releasing this project

Ready to release a new version of **COMPAS FAB**? Here's how to do it:

* We use [semver][https://semver.org/], ie. we bump versions as follows:

  * `patch`: bugfixes.
  * `minor`: backwards-compatible features added.
  * `major`: backwards-incompatible changes.

* Update the `CHANGELOG.md` with all novelty!
* Ready? Release everything in one command:

      invoke release [patch|minor|major]

* Celebrate! 💃

## Credits

This package is maintained by Gramazio Kohler Research [`@gramaziokohler`](https://github.com/gramaziokohler)
and a long list of [contributors](https://github.com/compas-dev/compas_fab/blob/main/AUTHORS.rst).


## Avoindata.fi [![CircleCI][circleci-image]][circleci-url] [![Cypress Dashboard](https://img.shields.io/badge/cypress-dashboard-brightgreen.svg)](https://dashboard.cypress.io/#/projects/ssb2ut/runs)

Main repository for Yhteentoimivuuspalvelut (_Interoperability services_ in Finnish). This service combines two related subservices:

- [Avoindata.fi](https://www.avoindata.fi/), a search engine and metadata catalog for Finnish open data
- A catalog of interoperability tools and guidelines

The service is publicly available at [Avoindata.fi](https://www.avoindata.fi/). Free registration is required for features such as commenting and publishing of datasets. A developer sandbox is also available at [betaavoindata.fi](http://betaavoindata.fi) or [betaopendata.fi](http://betaopendata.fi).

### Getting started

To try out the service, visit the sandbox/development environment [betaavoindata.fi](http://betaavoindata.fi) or the production environment [avoindata.fi](http://avoindata.fi), and register a user account to create new datasets.

To get started in developing the software, install a local development environment as described in the [documentation](doc/local-installation.md), and then see the [development documentation](doc/local-development.md).

### Documentation

Please refer to the [documentation directory](doc) and [API documentation](https://github.com/vrk-kpa/ytp-api).

### Contact

Please file [issues at Github](https://github.com/vrk-kpa/opendata/issues).

## List of CKAN extensions

| :sunglasses: | Name | Description |
|---|---|---|
| :bookmark_tabs: | [ckanext-orgdashboards](https://github.com/ViderumGlobal/ckanext-orgdashboards) | CKAN extension for creating organization dashboards.
| :chart_with_upwards_trend: | [ckanext-matomo](https://github.com/vrk-kpa/ckanext-matomo) | CKAN extension to integrate Matomo data into CKAN. Gives download stats on package pages, list of most popular packages, etc.
| :tractor: | [ckanext-harvest](https://github.com/ckan/ckanext-harvest) | This extension provides a common harvesting framework for ckan extensions and adds a CLI and a WUI to CKAN to manage harvesting sources and jobs.
| :milky_way: | [ckanext-spatial](https://github.com/ckan/ckanext-spatial) | This extension contains plugins that add geospatial capabilities to CKAN.
| :watch: | [ckanext-realtime](https://github.com/alexandrainst/ckanext-realtime) | CKAN plugin which makes your CKAN site into a Realtime Data Portal.
| :earth_americas: | [ckanext-dataspatial](https://github.com/NaturalHistoryMuseum/ckanext-dataspatial) | Dataspatial is a Ckan extension to provide geospatial awareness of datastore data.
| :mailbox_with_mail: | [ckanext-requestdata](https://github.com/ViderumGlobal/ckanext-requestdata) | This extension introduces a new type of dataset in which access to data is by request.
| :bookmark_tabs: | [ckanext-orgportals](https://github.com/ViderumGlobal/ckanext-orgportals) | CKAN extension for creating organization portals.
| :mag_right: | [Data Solr](https://github.com/NaturalHistoryMuseum/ckanext-datasolr) | Datasolr is a Ckan extension to use Solr for datastore queries.
| :closed_lock_with_key: | [ckanext-cas](https://github.com/keitaroinc/ckanext-cas) | CAS (Central Authentication Service) client extension for CKAN.
| :dvd: | [ckanext-s3filestore](https://github.com/keitaroinc/ckanext-s3filestore) | Use Amazon S3 as a filestore for CKAN.
| :bar_chart: | [ckanext-c3charts](https://github.com/ViderumGlobal/ckanext-c3charts) | c3js based charts for CKAN.
| :truck: | [ckanext-cloudstorage](https://github.com/TkTech/ckanext-cloudstorage) | Implements support for resource storage against multiple popular providers via apache-libcloud (S3, Azure Storage, etc...).
| :station: | [ckanext-dcat](https://github.com/ckan/ckanext-dcat) | This extension provides plugins that allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized using DCAT.
| :speak_no_evil: | [ckanext-fluent](https://github.com/ckan/ckanext-fluent) | This extension provides a way to store and return multilingul fields in CKAN datasets, resources, organizations and groups.
| :japan: | [ckanext-mapviews](https://github.com/ckan/ckanext-mapviews) | CKAN Resource View to build maps and choropleth maps.
| :open_file_folder: | [ckanext-odata](https://github.com/jqnatividad/ckanext-odata) | CKAN OData support to connect to tools like Tableau.
| :notebook: | [ckanext-pages](https://github.com/ckan/ckanext-pages) | This extension gives you an easy way to add simple pages to CKAN.
| :earth_africa: | [ckanext-spatial](https://github.com/ckan/ckanext-spatial) | This extension contains plugins that add geospatial capabilities to CKAN.
| :fast_forward: | [ckanext-xloader](https://github.com/ckan/ckanext-xloader) | Designed as a replacement for DataPusher because it offers ten times the speed and more robustness.

### Copying and License

This material is copyright (c) 2013-2022 Digital and Population Data Services Agency, Finland.

CKAN extensions and Drupal components are licensed under the GNU Affero General Public License (AGPL) v3.0
whose full text may be found at: http://www.fsf.org/licensing/licenses/agpl-3.0.html

All other content in this repository is licensed under MIT License unless otherwise specified.

### External services used during development

Some of the external services used.

<img src="/doc/images/Browserstack-logo.svg" width=200>

Browserstack is used to test the service with different browsers and devices.

[circleci-url]: https://circleci.com/gh/vrk-kpa/opendata
[circleci-image]: https://circleci.com/gh/vrk-kpa/opendata.svg?style=svg


=======
desisim
=======

|Actions Status| |Coveralls Status| |Documentation Status|

.. |Actions Status| image:: https://github.com/desihub/desisim/workflows/CI/badge.svg
    :target: https://github.com/desihub/desisim/actions
    :alt: GitHub Actions CI Status

.. |Coveralls Status| image:: https://coveralls.io/repos/desihub/desisim/badge.svg
    :target: https://coveralls.io/github/desihub/desisim
    :alt: Test Coverage Status

.. |Documentation Status| image:: https://readthedocs.org/projects/desisim/badge/?version=latest
    :target: https://desisim.readthedocs.io/en/latest/
    :alt: Documentation Status

Introduction
------------

This package contains scripts and packages for simulating DESI spectra.
For full documentation, please visit `desisim on Read the Docs`_

.. _`desisim on Read the Docs`: https://desisim.readthedocs.io/en/latest/

License
-------

desisim is free software licensed under a 3-clause BSD-style license. For details see
the ``LICENSE.rst`` file.


# nbgrader

Build: [![Build](https://img.shields.io/github/workflow/status/jupyter/nbgrader/Test?logo=github&label=tests)](https://github.com/jupyter/nbgrader/actions)
Forum: [![Google Group](https://img.shields.io/badge/-Google%20Group-lightgrey.svg)](https://groups.google.com/forum/#!forum/jupyter)
Cite: [![DOI](https://jose.theoj.org/papers/10.21105/jose.00032/status.svg)](https://doi.org/10.21105/jose.00032)

A system for assigning and grading Jupyter notebooks.

[Documentation can be found on Read the Docs.](https://nbgrader.readthedocs.io/en/stable/)

## Highlights of nbgrader

### Instructor toolbar extension for Jupyter notebooks
The nbgrader toolbar extension for Jupyter notebooks guides the instructor through
assignment and grading tasks using the familiar Jupyter notebook interface.

![Creating assignment](nbgrader/docs/source/user_guide/images/creating_assignment.gif "Creating assignment")

### Instructor "formgrader" extension for Jupyter notebooks

The formgrader extension for the Jupyter notebook allows instructors to use
the core functionality of nbgrader---generating the student version of an
assignment, releasing assignments to students, collecting assignments,
autograding submissions, and manually grading submissions.

![Formgrader extension](nbgrader/docs/source/user_guide/images/formgrader.gif "Formgrader extension")

### Student assignment list extension for Jupyter notebooks
Using the assignment list extension, students may conveniently view, fetch,
submit, and validate their assignments.

![nbgrader assignment list](nbgrader/docs/source/user_guide/images/student_assignment.gif "nbgrader assignment list")

### The command line tools of nbgrader

[Command line tools](https://nbgrader.readthedocs.io/en/latest/command_line_tools/index.html)
offer an efficient way for the instructor to generate, assign, release, collect,
and grade notebooks.

### SciPy 2017 overview talk (click to view on YouTube)

[![nbgrader: A Tool for Creating and Grading Assignments in the Jupyter Notebook | SciPy 2017 ](http://img.youtube.com/vi/5WUm0QuJdFw/0.jpg)](http://www.youtube.com/watch?v=5WUm0QuJdFw "nbgrader: A Tool for Creating and Grading Assignments in the Jupyter Notebook | SciPy 2017 ")

## Installation

For detailed instructions on installing nbgrader and the nbgrader extensions
for Jupyter notebook, please see [Installation](https://nbgrader.readthedocs.io/en/latest/user_guide/installation.html)
section in the User Guide.

## Contributing
Please see the [contributing guidelines and documentation](https://nbgrader.readthedocs.io/en/latest/contributor_guide/overview.html).

If you want to develop features for nbgrader, please follow the
[development installation instructions](https://nbgrader.readthedocs.io/en/latest/contributor_guide/installation_developer.html).


.. image:: https://img.shields.io/pypi/v/jsonpickle.svg
   :target: `PyPI link`_

.. image:: https://img.shields.io/pypi/pyversions/jsonpickle.svg
   :target: `PyPI link`_

.. _PyPI link: https://pypi.org/project/jsonpickle

.. image:: https://readthedocs.org/projects/jsonpickle/badge/?version=latest
   :target: https://jsonpickle.readthedocs.io/en/latest/?badge=latest

.. image:: https://github.com/jsonpickle/jsonpickle/actions/workflows/test.yml/badge.svg
   :target: https://github.com/jsonpickle/jsonpickle/actions
   :alt: Github Actions

.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
   :target: https://github.com/jsonpickle/jsonpickle/blob/main/COPYING
   :alt: BSD

jsonpickle
==========

jsonpickle is a library for the two-way conversion of complex Python objects
and `JSON <http://json.org/>`_.  jsonpickle builds upon existing JSON
encoders, such as simplejson, json, and ujson.

.. warning::

   jsonpickle can execute arbitrary Python code.

   Please see the Security section for more details.

For complete documentation, please visit the
`jsonpickle documentation <http://jsonpickle.readthedocs.io/>`_.

Bug reports and merge requests are encouraged at the
`jsonpickle repository on github <https://github.com/jsonpickle/jsonpickle>`_.

Why jsonpickle?
===============

Data serialized with python's pickle (or cPickle or dill) is not easily readable outside of python. Using the json format, jsonpickle allows simple data types to be stored in a human-readable format, and more complex data types such as numpy arrays and pandas dataframes, to be machine-readable on any platform that supports json. E.g., unlike pickled data, jsonpickled data stored in an Amazon S3 bucket is indexible by Amazon's Athena.

Security
========

jsonpickle should be treated the same as the
`Python stdlib pickle module <https://docs.python.org/3/library/pickle.html>`_
from a security perspective.

.. warning::

   The jsonpickle module **is not secure**.  Only unpickle data you trust.

   It is possible to construct malicious pickle data which will **execute
   arbitrary code during unpickling**.  Never unpickle data that could have come
   from an untrusted source, or that could have been tampered with.

   Consider signing data with an HMAC if you need to ensure that it has not
   been tampered with.

   Safer deserialization approaches, such as reading JSON directly,
   may be more appropriate if you are processing untrusted data.

Install
=======

Install from pip for the latest stable release:

::

    pip install jsonpickle

Install from github for the latest changes:

::

    pip install git+https://github.com/jsonpickle/jsonpickle.git

Numpy/Pandas Support
====================

jsonpickle includes built-in numpy and pandas extensions.  If you would
like to encode sklearn models, numpy arrays, pandas DataFrames, and other
numpy/pandas-based data, then you must enable the numpy and/or pandas
extensions by registering their handlers::

    >>> import jsonpickle.ext.numpy as jsonpickle_numpy
    >>> import jsonpickle.ext.pandas as jsonpickle_pandas
    >>> jsonpickle_numpy.register_handlers()
    >>> jsonpickle_pandas.register_handlers()

Development
===========

Use `make` to run the unit tests::

        make test

`pytest` is used to run unit tests internally.

A `tox` target is provided to run tests using all installed and supported Python versions::

        make tox

`jsonpickle` itself has no dependencies beyond the Python stdlib.
`tox` is required for testing when using the `tox` test runner only.

The testing requirements are specified in `setup.cfg`.
It is recommended to create a virtualenv and run tests from within the
virtualenv.::

        python3 -mvenv env3
        source env3/bin/activate
        pip install --editable '.[dev]'
        make test

You can also use a tool such as `vx <https://github.com/davvid/vx/>`_
to activate the virtualenv without polluting your shell environment::

        python3 -mvenv env3
        vx env3 pip install --editable '.[dev]'
        vx env3 make test

If you can't use a venv, you can install the testing packages as follows::

        pip install .[testing]

`jsonpickle` supports multiple Python versions, so using a combination of
multiple virtualenvs and `tox` is useful in order to catch compatibility
issues when developing.

GPG Signing
===========

Unfortunately, while versions of jsonpickle before 3.0.1 should still be signed, GPG signing support was removed from PyPi (https://blog.pypi.org/posts/2023-05-23-removing-pgp/) back in May 2023.

License
=======

Licensed under the BSD License. See COPYING for details.


Eliot: Logging that tells you *why* it happened
================================================

Python's built-in ``logging`` and other similar systems output a stream of factoids: they're interesting, but you can't really tell what's going on.

* Why is your application slow?
* What caused this code path to be chosen?
* Why did this error happen?

Standard logging can't answer these questions.

But with a better model you could understand what and why things happened in your application.
You could pinpoint performance bottlenecks, you could understand what happened when, who called what.

That is what Eliot does.
``eliot`` is a Python logging system that outputs causal chains of **actions**: actions can spawn other actions, and eventually they either **succeed or fail**.
The resulting logs tell you the story of what your software did: what happened, and what caused it.

Eliot supports a range of use cases and 3rd party libraries:

* Logging within a single process.
* Causal tracing across a distributed system.
* Scientific computing, with `built-in support for NumPy and Dask <https://eliot.readthedocs.io/en/stable/scientific-computing.html>`_.
* `Asyncio and Trio coroutines <https://eliot.readthedocs.io/en/stable/generating/asyncio.html>`_ and the `Twisted networking framework <https://eliot.readthedocs.io/en/stable/generating/twisted.html>`_.

Eliot is only used to generate your logs; you will might need tools like Logstash and ElasticSearch to aggregate and store logs if you are using multiple processes across multiple machines.

Eliot supports Python 3.8-3.12, as well as PyPy3.
It is maintained by Itamar Turner-Trauring, and released under the Apache 2.0 License.

* `Read the documentation <https://eliot.readthedocs.io>`_.
* Download from `PyPI`_ or `conda-forge <https://anaconda.org/conda-forge/eliot>`_.
* Need help or have any questions? `File an issue <https://github.com/itamarst/eliot/issues/new>`_ on GitHub.
* **Commercial support** is available from `Python⇒Speed <https://pythonspeed.com/services/#eliot>`_.

Testimonials
------------

    "Eliot has made tracking down causes of failure (in complex external integrations and internal uses) tremendously easier. Our errors are logged to Sentry with the Eliot task UUID. That means we can go from a Sentry notification to a high-level trace of operations—with important metadata at each operation—in a few seconds. We immediately know which user did what in which part of the system."

    —Jonathan Jacobs

.. _Github: https://github.com/itamarst/eliot
.. _PyPI: https://pypi.python.org/pypi/eliot


[![Build Status](https://travis-ci.com/ansible/galaxy.svg?branch=devel)](https://travis-ci.com/ansible/galaxy)

# Ansible Galaxy

This is the source code behind Galaxy - https://galaxy.ansible.com.

For help using the public Galaxy web site to find and install Ansible content, or to share your Ansible content with the community, [visit the Galaxy docs site](https://galaxy.ansible.com/docs/).

## Installing

**NOTE:** Our installation guide is out of date. The old installer does not work with the latest architectural changes introduced in v3.0, and has since been removed from the devel branch. (The previously provided docker image was intended to be used by the old installer, and henceforth that image is now considered deprecated.  Our updated [contributing guide](./CONTRIBUTING.rst) now walks you through creating your own docker image)

**Local Install:** If you want to run Ansible Galaxy locally, follow our contributing guide: [contributing guide](./CONTRIBUTING.rst)

## Roadmap

To see what we're working on, and where we're headed, view the [road map](./ROADMAP.md)

## Change Log

To view a release history and what changed, [view our change log](./CHANGELOG.rst)

## Announcements

For the [galaxy.ansible.com](https://galaxy.ansible.com) site, get alerted when maintenance windows are scheduled, or when a release is scheduled to deploy, by subscribing to the [ansible-project](https://groups.google.com/group/ansible-project) Google group.

## Contributing

 * If you're interested in jumping in and helping out, view the [contributing guide](./CONTRIBUTING.rst).
 * Chat with us on irc.freenode.net: #ansible-galaxy

## Branch Information

 * Releases are named after Daft Punk songs.
 * The *devel* branch is the release actively under development.
 * The *master* branch corresponds to the latest stable release.
 * Submit pull requests for bug fixes and new features to *devel*.
 * Various [release/X.Y.Z branches exist for previous releases](https://github.com/ansible/galaxy/tags).
 * Contributors welcome! Get started by reviewing [CONTRIBUTING.rst](./CONTRIBUTING.rst).

## Authors

View [AUTHORS](./AUTHORS) for a list contributors to Ansible Galaxy. Thanks everyone!

Ansible Galaxy is an [Ansible by Red Hat](https://ansible.com) sponsored project.


============
pytest-xdist
============

.. image:: http://img.shields.io/pypi/v/pytest-xdist.svg
    :alt: PyPI version
    :target: https://pypi.python.org/pypi/pytest-xdist

.. image:: https://img.shields.io/conda/vn/conda-forge/pytest-xdist.svg
    :target: https://anaconda.org/conda-forge/pytest-xdist

.. image:: https://img.shields.io/pypi/pyversions/pytest-xdist.svg
    :alt: Python versions
    :target: https://pypi.python.org/pypi/pytest-xdist

.. image:: https://github.com/pytest-dev/pytest-xdist/workflows/test/badge.svg
    :target: https://github.com/pytest-dev/pytest-xdist/actions

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/ambv/black

The `pytest-xdist`_ plugin extends pytest with new test execution modes, the most used being distributing
tests across multiple CPUs to speed up test execution::

    pytest -n auto

With this call, pytest will spawn a number of workers processes equal to the number of available CPUs, and distribute
the tests randomly across them.

Documentation
=============

Documentation is available at `Read The Docs <https://pytest-xdist.readthedocs.io>`__.