Skip to content

Commit 74c83b9

Browse files
authored
pgdtools v0.1.0 (#43)
* Refractor pgdtools - remove proxy list - move inner classes into individual files in their own folders - keep pgdtools.py cleaner - allow for keeping all files together cleaner - use imports in `__init__.py` in `sub_tools` - Restructure tests to follow along with everything. There are still a bunch of garbage routines in the files, these will need to be cleaned up next and stuff we don't want deleted. * add nice reference treatment * implement a bunch of dunder methods, cleaner style * add techniques Technique json file handling added, similar to how we handle the references. * end of workday backup * end of day backup * finish filters * add information class * add a doctest and set xdoctests up in rye and CI * add formatting class and start of data class. ratio can be returned already * add ratio_xy routine for data getter. this also allows to get the correlation! * Adding a first example, add capability to filter by reference and search refs * add another example with Stephan et al. data for Mo * stab at docs (API mainly) * BF reset was in wrong spot * fix typo, add a copy to not modify view of db * fix techniques, update docs, add code of conduct * bump version to 0.1.0 * update workflows to latest rye runner
1 parent 2bd2d38 commit 74c83b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6879
-632
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: Install the latest version of rye
18-
uses: eifinger/setup-rye@v1
18+
uses: eifinger/setup-rye@v4
1919
- name: Sync Rye
2020
run: |
2121
rye sync --all-features

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ jobs:
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
- name: Install the latest version of rye
30-
uses: eifinger/setup-rye@v3
30+
uses: eifinger/setup-rye@v4
3131
- name: Sync Rye
3232
run: |
3333
rye pin ${{ matrix.python-version }}
3434
rye sync --all-features
3535
- name: Run Tests for python interface
36-
run: rye test
36+
run: |
37+
rye test
38+
rye run test_docs
3739
- name: Run Lint on one python
3840
if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}
3941
run: rye lint

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ htmlcov
5555

5656
## Jupyter
5757
*.ipynb_checkpoints
58+
59+
## backup files
60+
*.xlsx#

CODE_OF_CONDUCT.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official email address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement
64+
via e-mail
65+
(see [contact info](https://galactic-forensics.space/author/reto-trappitsch/)).
66+
All complaints will be reviewed and investigated promptly and fairly.
67+
68+
All community leaders are obligated to respect the privacy and security of the
69+
reporter of any incident.
70+
71+
## Enforcement Guidelines
72+
73+
Community leaders will follow these Community Impact Guidelines in determining
74+
the consequences for any action they deem in violation of this Code of Conduct:
75+
76+
### 1. Correction
77+
78+
**Community Impact**: Use of inappropriate language or other behavior deemed
79+
unprofessional or unwelcome in the community.
80+
81+
**Consequence**: A private, written warning from community leaders, providing
82+
clarity around the nature of the violation and an explanation of why the
83+
behavior was inappropriate. A public apology may be requested.
84+
85+
### 2. Warning
86+
87+
**Community Impact**: A violation through a single incident or series of
88+
actions.
89+
90+
**Consequence**: A warning with consequences for continued behavior. No
91+
interaction with the people involved, including unsolicited interaction with
92+
those enforcing the Code of Conduct, for a specified period of time. This
93+
includes avoiding interactions in community spaces as well as external channels
94+
like social media. Violating these terms may lead to a temporary or permanent
95+
ban.
96+
97+
### 3. Temporary Ban
98+
99+
**Community Impact**: A serious violation of community standards, including
100+
sustained inappropriate behavior.
101+
102+
**Consequence**: A temporary ban from any sort of interaction or public
103+
communication with the community for a specified period of time. No public or
104+
private interaction with the people involved, including unsolicited interaction
105+
with those enforcing the Code of Conduct, is allowed during this period.
106+
Violating these terms may lead to a permanent ban.
107+
108+
### 4. Permanent Ban
109+
110+
**Community Impact**: Demonstrating a pattern of violation of community
111+
standards, including sustained inappropriate behavior, harassment of an
112+
individual, or aggression toward or disparagement of classes of individuals.
113+
114+
**Consequence**: A permanent ban from any sort of public interaction within the
115+
community.
116+
117+
## Attribution
118+
119+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
120+
version 2.1, available at
121+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
122+
123+
Community Impact Guidelines were inspired by
124+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
128+
[https://www.contributor-covenant.org/translations][translations].
129+
130+
[homepage]: https://www.contributor-covenant.org
131+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
132+
[Mozilla CoC]: https://github.com/mozilla/diversity
133+
[FAQ]: https://www.contributor-covenant.org/faq
134+
[translations]: https://www.contributor-covenant.org/translations

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[![PyPi](https://img.shields.io/pypi/v/pgdtools?color=informational)](https://pypi.org/project/pgdtools/)
22
[![docs](https://readthedocs.org/projects/pgdtools/badge/?version=latest)](https://pgdtools.readthedocs.io)
33
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/NASA-Planetary-Science/pgdtools/blob/main/LICENSE)
4-
[![tests](https://github.com/NASA-Planetary-Science/pgdtools/actions/workflows/rimseval_testing.yml/badge.svg?branch=main)](https://github.com/NASA-Planetary-Science/pgdtools/)
4+
[![tests](https://github.com/NASA-Planetary-Science/pgdtools/actions/workflows/tests.yml/badge.svg)](https://github.com/NASA-Planetary-Science/pgdtools/actions/workflows/tests.yml)
55
[![codecov](https://codecov.io/gh/NASA-Planetary-Science/pgdtools/branch/main/graph/badge.svg?token=N0NNVEI8CX)](https://codecov.io/gh/NASA-Planetary-Science/pgdtools)
6-
[![Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
6+
[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye.astral.sh)
7+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
78

89
# Presolar grain database tools (pgdTools)
910

docs/api/classify.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Classify your own data
2+
3+
::: pgdtools.classify
4+
options:
5+
members: null

docs/api/db.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Database
2+
3+
Details on database management can be found
4+
[here](../users/db.md).
5+
6+
::: pgdtools.db.config
7+
options:
8+
members: null

docs/api/maintainer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Maintainer tools
2+
3+
A detailed walk-through for maintainers can be found in the maintainer user guide.
4+
5+
::: pgdtools.maintainer
6+
options:
7+
members: null

docs/api/pgdtools.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# PGDTools
2+
3+
In here is the main class `PresolarGrains`.
4+
You can either load this class either by importing and defining it:
5+
6+
```python
7+
from pgdtools import PresolarGrains
8+
pgd = PresolarGrains()
9+
```
10+
11+
or by importing the `pgd` command directly:
12+
13+
```python
14+
from pgdtools import pgd
15+
```
16+
17+
Most functionality is available through the available [subtools](subtools.md).
18+
19+
::: pgdtools.pgdtools
20+
options:
21+
members: null

docs/api/subtools.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# PGD Subtools
2+
3+
These are subtools for the `PresolarGrains` class.
4+
All of them must be invoked from the `PresolarGrains` class!
5+
6+
::: pgdtools.sub_tools.data
7+
options:
8+
members: null
9+
10+
::: pgdtools.sub_tools.filters
11+
options:
12+
members: null
13+
14+
::: pgdtools.sub_tools.format
15+
options:
16+
members: null
17+
18+
::: pgdtools.sub_tools.info
19+
options:
20+
members: null
21+
22+
::: pgdtools.sub_tools.references
23+
options:
24+
members: null
25+
26+
::: pgdtools.sub_tools.techniques
27+
options:
28+
members: null

0 commit comments

Comments
 (0)