semvec/pypi-packages huggingface dataset:
refchef 1.0.1
Genome reference manager.

RefChef
~~~~~~~

|Travis| |Coverage| |Docs| |License| |PyPi|

RefChef is a reference management tool used to (1) document the exact
steps undertaken in the retrieval of genomic references, (2) maintain
the associated metadata, (3) provide a mechanism for automatically
reproducing retrieval and creation of an exact copy of genomic
references.

Installation
~~~~~~~~~~~~

| To install from PyPI using **pip**:
| ``pip install refchef``

| To install using **Anaconda Python**:
| ``conda install -c compbiocore refchef``

Development
~~~~~~~~~~~

To install a **development version** from the current directory:

.. code:: bash

    git clone https://github.com/compbiocore/refchef.git
    cd refchef
    pip install -e .

Run unit tests as: ``python setup.py test``

Set up ``.env`` file with GitHub Access Token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sensitive environment variables are stored in the .env file. This file
is included in .gitignore intentionally, so that it is never committed.
- Create a ``.env`` file and copy into it the contents of
``.env.template`` - Get your `GitHub Access
Token <https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/>`__
and add to the ``.env`` file.

Contributing
~~~~~~~~~~~~

Contributions consistent with the style and quality of existing code are
welcome. Be sure to follow the guidelines below.

Check the issues page of this repository for available work.

Committing
^^^^^^^^^^

This project uses `commitizen <https://pypi.org/project/commitizen/>`__
to ensure that commit messages remain well-formatted and consistent
across different contributors.

Before committing for the first time, install commitizen and read
`Conventional
Commits <https://www.conventionalcommits.org/en/v1.0.0-beta.2/>`__.

::

    pip install commitizen

To start work on a new change, pull the latest ``develop`` and create a
new *topic branch* (e.g. ``feature-resume-model``,
``chore-test-update``, ``bugfix-bad-bug``).

::

    git add .

To commit, run the following command (instead of ``git commit``) and
follow the directions:

::

    cz commit

Contact
^^^^^^^

Contact cbc-help@brown.edu - this is our general help line, so please
specify that your issue is with this site's contents

.. |Travis| image:: https://img.shields.io/travis/compbiocore/refchef/master.svg?style=flat-square
   :target: https://travis-ci.org/compbiocore/refchef
.. |Coverage| image:: https://img.shields.io/coveralls/github/compbiocore/refchef/master.svg?style=flat-square
   :target: https://coveralls.io/github/compbiocore/refchef
.. |Docs| image:: https://img.shields.io/badge/docs-stable-blue.svg?style=flat-square
   :target: https://compbiocore.github.io/refchef
.. |License| image:: https://img.shields.io/badge/license-GPL_3.0-orange.svg?style=flat-square
   :target: https://raw.githubusercontent.com/compbiocore/cbc-documentation-templates/master/LICENSE.md
.. |PyPi| image:: https://img.shields.io/pypi/v/refchef.svg?style=flat-square
   :target: https://pypi.org/project/refchef/
adt-extension 0.2.0
Python abstract data structure (ADT) extension

# adt-extension
<a href="https://pypi.org/project/adt-extension/">
  <img src="https://img.shields.io/pypi/v/adt-extension.svg" alt="latest release" />
</a>

Python abstract data structure (ADT) extension.

**Install**:
```bash
pip install adt-extension
```

**Import**:
```python
from adt_extension import Set, SwitchDict
```

## Extensions
Currently the package have the ADT extensions:

| Class | Extension of | Description |
| ----- | ------------ | ----------- |
| `Set` | [`set`](https://docs.python.org/3.7/tutorial/datastructures.html#sets) | Set with element type and validation rule. |
| `SwitchDict` | [`dict`](https://docs.python.org/3.7/tutorial/datastructures.html#dictionaries) | Dictionary with the possibility of behavior of a `switch case`. |

### Set
Set with element type and validation rule for the elements that will be inserted into the set.

**Example**:
```python
from adt_extension import Set

# A set with only even integers
set_int_even = Set(element_type=int, rule=lambda x: (x % 2 == 0))

# Elements that satisfies the element type and validation rule
set_int_even.update({4, 6})
# Elements that satisfies the element type, but not validation rule
set_int_even.update({5})
# Elements that not satisfies the element type
set_int_even.update({"qwe", True})

print(set_int_even)
# Output:
# Set({4, 6})

# Remove element type
set_int_even.element_type = None
# Remove validation rule
set_int_even.rule = None
```

### SwitchDict
Dictionary with the possibility to perform a function or return a value when trying to access a nonexistent index in the dictionary class.

**Example**:
```python
from adt_extension import SwitchDict

# Same behavior of a normal dictionary
switch_dict = SwitchDict({
    'Apartament': 125,
    'House': 250,
    'Condominium': 300,
})

# Add default case
switch_dict.default_case = 999

# List example
properties_list = [
    'Apartament',
    'House',
    'Condominium',
    'Treehouse',
    'Hotel',
]

# Get values
properties_values = [ switch_dict[ x ] for x in properties_list ]
print(properties_values)
# Output:
# [ 125, 250, 300, 999, 999 ]

# Remove default case, becomes a normal dictionary
switch_dict.default_case = None
```