cuspaceflight / cuspaceflight/firefish

Add some well known dimensions to cusfsum.Case

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
enhancement newbie friendly
Dominant language
Python
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Description

It would be convenient if `cusfsim.case` could have some constants for well known units. E.g.:

``` python
# inside case.py
class Dimension(...):
KILOGRAM = Dimension(1, 0, 0, 0, 0, 0, 0)
NEWTON = Dimension(1, 1, -2, 0, 0, 0, 0)
PASCAL = Dimension(1, -1, -2, 0, 0, 0, 0)
```

Etc, etc. Look in the [sphinx documentation](http://sphinx-doc.org/ext/autodoc.html#directive-autoattribute) for how to document class attributes.

One may need to do

``` python
Dimension.KILOGRAM = Dimension(1, 0, 0, 0, 0, 0, 0)
```

rather than the method above. This depends on whether the `Dimension()` constructor is available to class attributes.

After this, one could refer simply to `Dimension.PASCAL` in scripts which is a little less obtuse :).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.