Skip to content

Commit

Permalink
think 0.1 is done
Browse files Browse the repository at this point in the history
  • Loading branch information
leliel12 committed Nov 17, 2020
1 parent 471957d commit 42ebc8c
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 255 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2020, QuatroPe
Copyright (c) 2020, Juan B Cabral and QuatroPe.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ include LICENSE
include README.md
include CODE_OF_CONDUCT.md

recursive-exclude draft *
recursive-exclude res *

exclude test_*.py
Expand Down
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,29 @@
[![License](https://img.shields.io/pypi/l/uttrs?color=blue)](https://tldrlegal.com/license/bsd-3-clause-license-(revised))
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://badge.fury.io/py/uttrs)


**uttrs** is mainly two functions:

- `uttr.ib` which generates attributes sensitive to units.
- `uttr.array_accessor` which allows access to attributes linked to units, and transform them into numpy arrays.

The following piece of code is an exampl prototype of a Class representing a Galaxy.
## Installing

- From PyPI

```s
$ pip install uttrs
```

- Simply clone and from within the repo

```s
$ pip install -e .
```


## Quick Start

The following piece of code is an example prototype of a Class representing a Galaxy.
The Galaxy contains:

- three arrays (`x`, `y`, `z`) with particle positions, measured in *kiloparsecs* (`u.kpc`).
Expand Down Expand Up @@ -136,3 +153,12 @@ Lets fot example define `x` as a kilogram (`u.kg`)

ValueError: Unit of attribute 'x' must be equivalent to 'kpc'.Found 'kg'.
```


## References

### Astropy

> Price-Whelan, Adrian M., et al. "The Astropy project:
Building an open-science project and status of the v2. 0 core
package." The Astronomical Journal 156.3 (2018): 123.
231 changes: 0 additions & 231 deletions draft/draft.ipynb

This file was deleted.

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2019, Juan B Cabral
# Copyright (c) 2020, Juan B Cabral and QuatroPe.
# License: BSD-3-Clause
# Full Text: https://github.com/quatrope/uttrs/blob/master/LICENSE

Expand Down Expand Up @@ -66,7 +66,7 @@
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
author="QuatroPe",
author="JB Cabral and QuatroPe",
author_email="jbcabral@unc.edu.ar",
url="https://github.com/quatrope/utts",
license="3 Clause BSD",
Expand All @@ -77,7 +77,7 @@
"units",
"astropy",
],
classifiers=(
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
Expand All @@ -87,7 +87,7 @@
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
),
],
py_modules=["uttr", "ez_setup"],
install_requires=REQUIREMENTS,
)
Loading

0 comments on commit 42ebc8c

Please sign in to comment.