semvec/pypi-packages huggingface dataset:
pytest-beartype 0.2.0
Pytest plugin to run your tests with beartype checking enabled.
License: MIT
Requires Python: >=3.8

# pytest-beartype

Pytest plugin to run your tests with beartype checking enabled.

## Installation

```bash
pip install pytest_beartype
```

## Usage

```bash
pytest --beartype-packages='your_package_name,other_package_name'
```

This will ensure that any type annotations in those packages are checked at
runtime, while your tests are running.

## Local Development / Testing

- Create and activate a virtual environment
- Run `pip install -r requirements-dev.txt` to do an editable install
- Run `pytest` to run tests

## Type Checking

Run `mypy .`

## Create and upload a package to PyPI

Make sure to bump the version in `setup.cfg`.

Then run the following commands:

```bash
rm -rf build dist
python setup.py sdist bdist_wheel
```

Then upload it to PyPI using [twine](https://twine.readthedocs.io/en/latest/#installation):

```bash
twine upload dist/*
```
pySWEETCat 1.1.1
A pure-Python package to download data from SWEET-Cat
License: MIT
Requires Python: >=3.7

pySWEETCat
==========
 
A pure-Python package to download data from SWEET-Cat_.

This small package was developed as an exercise in a Python course (see CONTRIBUTORS_).
It downloads all the data from the SWEET-Cat online catalogue of stellar parameters 
and builds a (custom) dictionary with each column. 
It is a pure-Python package with no extra dependencies (see below).


|License MIT| |PyPI version|

How to use
----------

Install it from pip (**pySWEETCat** has no extra depencies)

::

    pip install pySWEETCat

and it's ready to use from Python

.. code:: python

    import pysweetcat


**pySWEETCat** has one simple function, ``get_data()``,
which downloads the data from the online archive and returns it in a dictionary.

.. code:: python

    >>> data = pysweetcat.get_data()

.. code::

    Downloading SWEET-Cat data
    Saved SWEET-Cat data to $HOME/.pysweetcat/SWEET_cat.csv
    Data in `SWEET_cat.csv` is recent.
    There are 25 columns with 2627 entries each in `SWEET_cat.csv`

where ``$HOME`` will  be your home directory.
The second time you call ``get_data()`` it will check if the data was downloaded recently, 
and only conditionally download it again.

.. code:: python

    >>> data = pysweetcat.get_data()

.. code::

    Data in `SWEET_cat.csv` is recent.
    There are 25 columns with 2627 entries each in `SWEET_cat.csv`

Now, `data` is (basically) a Python dictionary with the each column as keys.
But it has a couple extra methods and properties. For example

.. code:: python

    data.size
    2627
    
returns the number of values in each column.

The columns can be accessed as in a normal dictionary,
as in 

.. code:: python

    data['feh']   # stellar metallicity
    data['name']  # name of the star


and both of these will work

.. code:: python

    data['σ_vmag']   
    data['sigma_vmag']
    
Also, to drop the NaN values in a column (for some columns there will be quite a few)
we can use

.. code:: python

    data['teff_nonan']
    
    np.isnan(data['teff']).any()       # True
    np.isnan(data['teff_nonan']).any() # False
    

which allows us to more easily do histograms of the values.

Finnally, the ``.to_numpy(inplace=True)`` method converts all the columns to
numpy arrays, either in place or not (this is the only function in
**pySWEETCat** that requires numpy).


License
-------

Copyright 2018 João Faria.

**pySWEETCat** is free software made available under the MIT License. For
details see the LICENSE_ file.

.. _SWEET-Cat: https://www.astro.up.pt/resources/sweet-cat/
.. _CONTRIBUTORS: https://github.com/j-faria/pySWEETCat/blob/master/CONTRIBUTORS.md
.. _License: https://github.com/j-faria/pySWEETCat/blob/master/LICENSE
.. |License MIT| image:: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
   :target: https://github.com/j-faria/pySWEETCat/blob/master/LICENSE
.. |PyPI version| image:: https://badge.fury.io/py/pySWEETCat.svg
    :target: https://badge.fury.io/py/pySWEETCat