across-tools 0.1.dev42__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- across_tools-0.1.dev42/.git_archival.txt +4 -0
- across_tools-0.1.dev42/.gitattributes +24 -0
- across_tools-0.1.dev42/.github/ISSUE_TEMPLATE/bug.yaml +37 -0
- across_tools-0.1.dev42/.github/ISSUE_TEMPLATE/spike.yaml +40 -0
- across_tools-0.1.dev42/.github/ISSUE_TEMPLATE/ticket.yaml +114 -0
- across_tools-0.1.dev42/.github/dependabot.yml +10 -0
- across_tools-0.1.dev42/.github/pull_request_template.md +39 -0
- across_tools-0.1.dev42/.github/workflows/build-documentation.yml +39 -0
- across_tools-0.1.dev42/.github/workflows/pre-commit-ci.yml +36 -0
- across_tools-0.1.dev42/.github/workflows/publish-to-pypi.yml +38 -0
- across_tools-0.1.dev42/.github/workflows/smoke-test.yml +75 -0
- across_tools-0.1.dev42/.github/workflows/testing-and-coverage.yml +38 -0
- across_tools-0.1.dev42/.gitignore +312 -0
- across_tools-0.1.dev42/.pre-commit-config.yaml +115 -0
- across_tools-0.1.dev42/.readthedocs.yml +23 -0
- across_tools-0.1.dev42/CODE_OF_CONDUCT.md +43 -0
- across_tools-0.1.dev42/CONTRIBUTING.md +97 -0
- across_tools-0.1.dev42/LICENSE +201 -0
- across_tools-0.1.dev42/PKG-INFO +320 -0
- across_tools-0.1.dev42/README.md +80 -0
- across_tools-0.1.dev42/across/__init__.py +21 -0
- across_tools-0.1.dev42/across/tools/__init__.py +19 -0
- across_tools-0.1.dev42/across/tools/_version.py +34 -0
- across_tools-0.1.dev42/across/tools/core/__init__.py +0 -0
- across_tools-0.1.dev42/across/tools/core/config.py +29 -0
- across_tools-0.1.dev42/across/tools/core/enums/__init__.py +7 -0
- across_tools-0.1.dev42/across/tools/core/enums/constraint_type.py +16 -0
- across_tools-0.1.dev42/across/tools/core/enums/depth_unit.py +12 -0
- across_tools-0.1.dev42/across/tools/core/enums/energy_unit.py +13 -0
- across_tools-0.1.dev42/across/tools/core/enums/frequency_unit.py +13 -0
- across_tools-0.1.dev42/across/tools/core/enums/wavelength_unit.py +12 -0
- across_tools-0.1.dev42/across/tools/core/math.py +36 -0
- across_tools-0.1.dev42/across/tools/core/schemas/__init__.py +26 -0
- across_tools-0.1.dev42/across/tools/core/schemas/bandpass.py +199 -0
- across_tools-0.1.dev42/across/tools/core/schemas/base.py +16 -0
- across_tools-0.1.dev42/across/tools/core/schemas/coordinate.py +42 -0
- across_tools-0.1.dev42/across/tools/core/schemas/custom_types.py +17 -0
- across_tools-0.1.dev42/across/tools/core/schemas/exceptions.py +16 -0
- across_tools-0.1.dev42/across/tools/core/schemas/healpix_order.py +12 -0
- across_tools-0.1.dev42/across/tools/core/schemas/polygon.py +65 -0
- across_tools-0.1.dev42/across/tools/core/schemas/roll_angle.py +12 -0
- across_tools-0.1.dev42/across/tools/core/schemas/tle.py +100 -0
- across_tools-0.1.dev42/across/tools/core/schemas/visibility.py +39 -0
- across_tools-0.1.dev42/across/tools/ephemeris/__init__.py +17 -0
- across_tools-0.1.dev42/across/tools/ephemeris/base.py +212 -0
- across_tools-0.1.dev42/across/tools/ephemeris/ground_ephem.py +135 -0
- across_tools-0.1.dev42/across/tools/ephemeris/jpl_ephem.py +160 -0
- across_tools-0.1.dev42/across/tools/ephemeris/spice_ephem.py +180 -0
- across_tools-0.1.dev42/across/tools/ephemeris/tle_ephem.py +138 -0
- across_tools-0.1.dev42/across/tools/example_module.py +23 -0
- across_tools-0.1.dev42/across/tools/footprint/__init__.py +4 -0
- across_tools-0.1.dev42/across/tools/footprint/footprint.py +86 -0
- across_tools-0.1.dev42/across/tools/footprint/healpix_joins.py +44 -0
- across_tools-0.1.dev42/across/tools/footprint/projection.py +82 -0
- across_tools-0.1.dev42/across/tools/py.typed +0 -0
- across_tools-0.1.dev42/across/tools/tle/__init__.py +3 -0
- across_tools-0.1.dev42/across/tools/tle/exceptions.py +7 -0
- across_tools-0.1.dev42/across/tools/tle/tle.py +166 -0
- across_tools-0.1.dev42/across/tools/visibility/__init__.py +14 -0
- across_tools-0.1.dev42/across/tools/visibility/base.py +275 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/__init__.py +25 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/alt_az.py +92 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/base.py +73 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/earth_limb.py +91 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/moon_angle.py +81 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/polygon.py +34 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/saa.py +65 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints/sun_angle.py +87 -0
- across_tools-0.1.dev42/across/tools/visibility/constraints_constructor.py +65 -0
- across_tools-0.1.dev42/across/tools/visibility/ephemeris_visibility.py +179 -0
- across_tools-0.1.dev42/across/tools/visibility/joint_visibility.py +157 -0
- across_tools-0.1.dev42/across_tools.egg-info/PKG-INFO +320 -0
- across_tools-0.1.dev42/across_tools.egg-info/SOURCES.txt +126 -0
- across_tools-0.1.dev42/across_tools.egg-info/dependency_links.txt +1 -0
- across_tools-0.1.dev42/across_tools.egg-info/requires.txt +24 -0
- across_tools-0.1.dev42/across_tools.egg-info/top_level.txt +1 -0
- across_tools-0.1.dev42/docs/Makefile +31 -0
- across_tools-0.1.dev42/docs/_static/logo.png +0 -0
- across_tools-0.1.dev42/docs/bandpass.rst +466 -0
- across_tools-0.1.dev42/docs/conf.py +66 -0
- across_tools-0.1.dev42/docs/ephemeris.rst +421 -0
- across_tools-0.1.dev42/docs/footprint.rst +510 -0
- across_tools-0.1.dev42/docs/index.rst +126 -0
- across_tools-0.1.dev42/docs/notebooks/README.md +36 -0
- across_tools-0.1.dev42/docs/notebooks/getting_started.ipynb +232 -0
- across_tools-0.1.dev42/docs/notebooks.rst +10 -0
- across_tools-0.1.dev42/docs/pre_executed/README.md +16 -0
- across_tools-0.1.dev42/docs/requirements.txt +10 -0
- across_tools-0.1.dev42/docs/tle.rst +311 -0
- across_tools-0.1.dev42/docs/visibility.rst +568 -0
- across_tools-0.1.dev42/pyproject.toml +134 -0
- across_tools-0.1.dev42/setup.cfg +4 -0
- across_tools-0.1.dev42/tests/tools/__init__.py +0 -0
- across_tools-0.1.dev42/tests/tools/conftest.py +0 -0
- across_tools-0.1.dev42/tests/tools/core/conftest.py +89 -0
- across_tools-0.1.dev42/tests/tools/core/test_bandpass.py +192 -0
- across_tools-0.1.dev42/tests/tools/core/test_base.py +25 -0
- across_tools-0.1.dev42/tests/tools/core/test_coordinate.py +77 -0
- across_tools-0.1.dev42/tests/tools/core/test_math.py +120 -0
- across_tools-0.1.dev42/tests/tools/core/test_polygon.py +77 -0
- across_tools-0.1.dev42/tests/tools/ephemeris/__init__.py +0 -0
- across_tools-0.1.dev42/tests/tools/ephemeris/conftest.py +436 -0
- across_tools-0.1.dev42/tests/tools/ephemeris/ephemeris_test.py +258 -0
- across_tools-0.1.dev42/tests/tools/ephemeris/ground_ephemeris_test.py +27 -0
- across_tools-0.1.dev42/tests/tools/ephemeris/jpl_ephem_test.py +17 -0
- across_tools-0.1.dev42/tests/tools/ephemeris/spice_ephem_test.py +25 -0
- across_tools-0.1.dev42/tests/tools/ephemeris/tle_ephemeris_test.py +17 -0
- across_tools-0.1.dev42/tests/tools/footprint/conftest.py +282 -0
- across_tools-0.1.dev42/tests/tools/footprint/footprint_test.py +188 -0
- across_tools-0.1.dev42/tests/tools/footprint/healpix_joins_test.py +166 -0
- across_tools-0.1.dev42/tests/tools/test_example_module.py +13 -0
- across_tools-0.1.dev42/tests/tools/tle/__init__.py +0 -0
- across_tools-0.1.dev42/tests/tools/tle/conftest.py +47 -0
- across_tools-0.1.dev42/tests/tools/tle/tle_fetch_test.py +161 -0
- across_tools-0.1.dev42/tests/tools/tle/tle_schema_test.py +93 -0
- across_tools-0.1.dev42/tests/tools/visibility/conftest.py +430 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/alt_az_test.py +229 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/conftest.py +234 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/constraints_test.py +49 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/earth_limb_test.py +132 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/moon_angle_test.py +116 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/polygon_test.py +78 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/saa_test.py +136 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints/sun_angle_test.py +128 -0
- across_tools-0.1.dev42/tests/tools/visibility/constraints_constructor_test.py +36 -0
- across_tools-0.1.dev42/tests/tools/visibility/ephemeris_visibility_test.py +95 -0
- across_tools-0.1.dev42/tests/tools/visibility/joint_visibility_test.py +222 -0
- across_tools-0.1.dev42/tests/tools/visibility/visibility_test.py +166 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# For explanation of this file and uses see
|
|
2
|
+
# https://git-scm.com/docs/gitattributes
|
|
3
|
+
# https://developer.lsst.io/git/git-lfs.html#using-git-lfs-enabled-repositories
|
|
4
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/git-lfs.html
|
|
5
|
+
#
|
|
6
|
+
# Used by https://github.com/lsst/afwdata.git
|
|
7
|
+
# *.boost filter=lfs diff=lfs merge=lfs -text
|
|
8
|
+
# *.dat filter=lfs diff=lfs merge=lfs -text
|
|
9
|
+
# *.fits filter=lfs diff=lfs merge=lfs -text
|
|
10
|
+
# *.gz filter=lfs diff=lfs merge=lfs -text
|
|
11
|
+
#
|
|
12
|
+
# apache parquet files
|
|
13
|
+
# *.parq filter=lfs diff=lfs merge=lfs -text
|
|
14
|
+
#
|
|
15
|
+
# sqlite files
|
|
16
|
+
# *.sqlite3 filter=lfs diff=lfs merge=lfs -text
|
|
17
|
+
#
|
|
18
|
+
# gzip files
|
|
19
|
+
# *.gz filter=lfs diff=lfs merge=lfs -text
|
|
20
|
+
#
|
|
21
|
+
# png image files
|
|
22
|
+
# *.png filter=lfs diff=lfs merge=lfs -text
|
|
23
|
+
|
|
24
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Bug
|
|
2
|
+
description: Issue a bug report
|
|
3
|
+
type: "bug"
|
|
4
|
+
projects: ["NASA-ACROSS/22"]
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Thanks for issuing a bug report! Please describe it in detail below.
|
|
11
|
+
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: description
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
attributes:
|
|
17
|
+
label: "Description"
|
|
18
|
+
description: What is the bug? Include images if appropriate.
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: steps_to_reproduce
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
attributes:
|
|
25
|
+
label: "Steps to Reproduce"
|
|
26
|
+
description: Describe the steps needed to take to reproduce the issue.
|
|
27
|
+
value: |
|
|
28
|
+
1. [Step 1]
|
|
29
|
+
2. [Step 2]
|
|
30
|
+
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: expected_behavior
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
attributes:
|
|
36
|
+
label: "Expected Behavior"
|
|
37
|
+
description: What is expected behavior instead of the bug?
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Spike
|
|
2
|
+
description: Investigative piece of work that is expected to lead into a feature issue once requirements are understood more concretely.
|
|
3
|
+
type: "spike"
|
|
4
|
+
projects: ["NASA-ACROSS/22"]
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Please use this template to describe a piece of investigative work.
|
|
11
|
+
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: goal
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
attributes:
|
|
17
|
+
label: "Goal"
|
|
18
|
+
description: Include the goal of the spike and why it is relevant.
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: description
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
attributes:
|
|
25
|
+
label: "Description"
|
|
26
|
+
description: Enter a summary description of what is being investigated.
|
|
27
|
+
placeholder: |
|
|
28
|
+
Some examples of spikes:
|
|
29
|
+
|
|
30
|
+
- New technology to be added and be a comparison between options to show usage/performance/etc
|
|
31
|
+
- A new feature that has many potential implementations that have unknown implications or considerations
|
|
32
|
+
- Investigating if it a particular idea is worth implementing by doing some preliminary code experiments to see it's complexity/usage/feasibility.
|
|
33
|
+
|
|
34
|
+
Add any additional information/considerations as a bulleted list.
|
|
35
|
+
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: references
|
|
38
|
+
attributes:
|
|
39
|
+
label: "References"
|
|
40
|
+
description: Optional section used to put a reference to another related issue, PR comment, Slack conversation, etc.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: Ticket
|
|
2
|
+
description: A ticket that relates to a tech spec requirement that will be refined during planning.
|
|
3
|
+
projects: ["NASA-ACROSS/22"]
|
|
4
|
+
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Please use this template to describe a piece of work that has gone through the requirement gathering process.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
attributes:
|
|
16
|
+
label: "Description"
|
|
17
|
+
description: |
|
|
18
|
+
Describe the piece of work to be accomplished, usually describes the purpose or goal and why it is important.
|
|
19
|
+
placeholder: |
|
|
20
|
+
The purpose of this ticket is to provide the ability for users of the system to register
|
|
21
|
+
themselves. This is a dependency to allow users to be able to log in and use the system.
|
|
22
|
+
|
|
23
|
+
- type: input
|
|
24
|
+
id: references
|
|
25
|
+
attributes:
|
|
26
|
+
label: "References"
|
|
27
|
+
description: Recommended section to provide links to feature design or tech spec
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: stakeholders
|
|
31
|
+
attributes:
|
|
32
|
+
label: "Stakeholders"
|
|
33
|
+
description: Please reference the stakeholders for this ticket
|
|
34
|
+
placeholder: "@NASA-ACROSS/developers"
|
|
35
|
+
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: interfaces
|
|
38
|
+
attributes:
|
|
39
|
+
label: "Interfaces"
|
|
40
|
+
description: Are there interfaces that need to be defined?
|
|
41
|
+
placeholder: |
|
|
42
|
+
```py
|
|
43
|
+
class UserCreate:
|
|
44
|
+
first_name: str
|
|
45
|
+
last_name: str
|
|
46
|
+
email: EmailStr
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- type: textarea
|
|
50
|
+
id: database
|
|
51
|
+
attributes:
|
|
52
|
+
label: "Database"
|
|
53
|
+
description: |
|
|
54
|
+
Are there database schema changes or additions?
|
|
55
|
+
placeholder: |
|
|
56
|
+
```txt
|
|
57
|
+
user
|
|
58
|
+
------------------------
|
|
59
|
+
first_name: varchar(255)
|
|
60
|
+
last_name: varchar(255)
|
|
61
|
+
email: varchar(100)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- type: textarea
|
|
65
|
+
id: functional_requirements
|
|
66
|
+
validations:
|
|
67
|
+
required: true
|
|
68
|
+
attributes:
|
|
69
|
+
label: "Functional Requirements (FR)"
|
|
70
|
+
description: |
|
|
71
|
+
What does the ticket need to do?
|
|
72
|
+
What are the steps to implement the requirements?
|
|
73
|
+
|
|
74
|
+
This should be as detailed as needed for anyone to be able to contribute.
|
|
75
|
+
placeholder: |
|
|
76
|
+
1. Create a new route `POST /user` in the `routes/user/router.py` file to create a new user.
|
|
77
|
+
2. Add the `UserCreate` schema to the `schemas.py` file.
|
|
78
|
+
3. The route should take the `UserCreate` schema as the `POST` body.
|
|
79
|
+
4. The initial type validation should be handled by the pydantic model/schema.
|
|
80
|
+
5. A new `create` method should be added to the `UserService`.
|
|
81
|
+
1. The `create` method should check to see if the user already exists by `email` by using the existing `exists` method on `UserService`
|
|
82
|
+
2. If a user exists a `DuplicateUserException` should be raised.
|
|
83
|
+
3. Otherwise, create the user in the db by converting the `UserCreate` schema into the `User` db model.
|
|
84
|
+
4. Return the newly created user.
|
|
85
|
+
6. Return a `200` HTTP status along with the newly created user.
|
|
86
|
+
|
|
87
|
+
- type: textarea
|
|
88
|
+
id: non_functional_requirements
|
|
89
|
+
attributes:
|
|
90
|
+
label: "Non-Functional Requirements (NFR)"
|
|
91
|
+
description: |
|
|
92
|
+
What constraints exist for this ticket? All constraints must be quantifiable.
|
|
93
|
+
placeholder: |
|
|
94
|
+
1. Creating a user does not take longer than 1 second.
|
|
95
|
+
|
|
96
|
+
- type: textarea
|
|
97
|
+
id: acceptance_criteria
|
|
98
|
+
attributes:
|
|
99
|
+
label: "Acceptance Criteria"
|
|
100
|
+
description: |
|
|
101
|
+
What needs to happen functionally for this work to pass review?
|
|
102
|
+
Usually a combination of FRs and NFRs as test cases written in plain text.
|
|
103
|
+
This should follow test description formats. "Should...when..."
|
|
104
|
+
placeholder: |
|
|
105
|
+
1. Should return a status code of `200` when a new user is created successfully.
|
|
106
|
+
2. Should return new user information when a user is created successfully.
|
|
107
|
+
3. Should raise a `422` exception when an email is not sent in the body.
|
|
108
|
+
4. Should raise a `422` exception when an email is not correctly formatted.
|
|
109
|
+
5. Should raise a `409` exception when a user already exists with the provided `email`.
|
|
110
|
+
|
|
111
|
+
- type: markdown
|
|
112
|
+
attributes:
|
|
113
|
+
value: |
|
|
114
|
+
Finally, make sure to add the type of the ticket as "Task" or "Feature" to help tracking of issues.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
# IMPORTANT: Please do not create a Pull Request without creating an issue first
|
|
3
|
+
-->
|
|
4
|
+
|
|
5
|
+
## Title
|
|
6
|
+
|
|
7
|
+
The title of the PR should follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary), as all the commits within the PR will be squashed under the title.
|
|
8
|
+
|
|
9
|
+
feat(location): add Foo to Bar
|
|
10
|
+
|
|
11
|
+
### Description
|
|
12
|
+
|
|
13
|
+
A one to two sentence summary of the PR for easy digestion, must be
|
|
14
|
+
different and more descriptive than title. Combination of tile and
|
|
15
|
+
description should summarize the issue + solution.
|
|
16
|
+
|
|
17
|
+
Feel free to add any additional information as a bulleted list.
|
|
18
|
+
|
|
19
|
+
### Related Issue(s)
|
|
20
|
+
|
|
21
|
+
Remove this line and link your issue here with the `Resolves` keyword
|
|
22
|
+
Resolves #1234
|
|
23
|
+
|
|
24
|
+
### Reviewers
|
|
25
|
+
|
|
26
|
+
List all reviewers here and briefly describe why they are invited for
|
|
27
|
+
review.
|
|
28
|
+
By default, the PR author should merge once the reviewers have had a
|
|
29
|
+
chance to review.
|
|
30
|
+
If you have a different preference or cannot merge after review for some
|
|
31
|
+
other constraint, leave a note about it here.
|
|
32
|
+
|
|
33
|
+
### Acceptance Criteria
|
|
34
|
+
|
|
35
|
+
What needs to happen functionally for this work to pass review, copy paste from issue.
|
|
36
|
+
|
|
37
|
+
### Testing
|
|
38
|
+
|
|
39
|
+
Add how you tested this PR and add a sequence of steps, with images where appropriate, for testing this PR.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# This workflow will install Python dependencies, build the package and then build the documentation.
|
|
3
|
+
|
|
4
|
+
name: Build documentation
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ main ]
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
- name: Set up Python 3.10
|
|
25
|
+
uses: actions/setup-python@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: '3.10'
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get update
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
|
|
33
|
+
pip install .
|
|
34
|
+
- name: Install notebook requirements
|
|
35
|
+
run: |
|
|
36
|
+
sudo apt-get install pandoc
|
|
37
|
+
- name: Build docs
|
|
38
|
+
run: |
|
|
39
|
+
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# This workflow runs pre-commit hooks on pushes and pull requests to main
|
|
3
|
+
# to enforce coding style. To ensure correct configuration, please refer to:
|
|
4
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html
|
|
5
|
+
name: Run pre-commit hooks
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ main ]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
pre-commit-ci:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.10'
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
sudo apt-get update
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install .[dev]
|
|
29
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
30
|
+
- uses: pre-commit/action@v3.0.1
|
|
31
|
+
with:
|
|
32
|
+
extra_args: --all-files --verbose
|
|
33
|
+
env:
|
|
34
|
+
SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check"
|
|
35
|
+
- uses: pre-commit-ci/lite-action@v1.1.0
|
|
36
|
+
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
3
|
+
# For more information see: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing
|
|
4
|
+
|
|
5
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
6
|
+
# They are provided by a third-party and are governed by
|
|
7
|
+
# separate terms of service, privacy policy, and support
|
|
8
|
+
# documentation.
|
|
9
|
+
|
|
10
|
+
name: Upload Python Package
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
release:
|
|
14
|
+
types: [published]
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
deploy:
|
|
21
|
+
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
id-token: write
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.10'
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install --upgrade pip
|
|
34
|
+
pip install build
|
|
35
|
+
- name: Build package
|
|
36
|
+
run: python -m build
|
|
37
|
+
- name: Publish package
|
|
38
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# This workflow will run daily at 06:45.
|
|
2
|
+
# It will install Python dependencies and run tests with a variety of Python versions.
|
|
3
|
+
# See documentation for help debugging smoke test issues:
|
|
4
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_testing.html#version-culprit
|
|
5
|
+
|
|
6
|
+
name: Unit test smoke test
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
|
|
10
|
+
# Runs this workflow automatically
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: 45 6 * * *
|
|
13
|
+
|
|
14
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
+
uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
sudo apt-get update
|
|
34
|
+
python -m pip install --upgrade pip
|
|
35
|
+
pip install -e .[dev]
|
|
36
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
37
|
+
- name: List dependencies
|
|
38
|
+
run: |
|
|
39
|
+
pip list
|
|
40
|
+
- name: Run unit tests with pytest
|
|
41
|
+
run: |
|
|
42
|
+
python -m pytest
|
|
43
|
+
- name: Send status to author's email
|
|
44
|
+
if: ${{ failure() }} && github.event_name != 'workflow_dispatch' }} # Only email if the workflow failed and was not manually started. Customize this as necessary.
|
|
45
|
+
uses: dawidd6/action-send-mail@v4
|
|
46
|
+
with:
|
|
47
|
+
# Required mail server address if not connection_url:
|
|
48
|
+
server_address: smtp.gmail.com
|
|
49
|
+
# Server port: (uses TLS by default if server_port is 465)
|
|
50
|
+
server_port: 465
|
|
51
|
+
|
|
52
|
+
# Mail server username:
|
|
53
|
+
username: ${{secrets.MAIL_USERNAME}}
|
|
54
|
+
# Mail server password:
|
|
55
|
+
password: ${{secrets.MAIL_PASSWORD}}
|
|
56
|
+
# Required recipients' addresses:
|
|
57
|
+
to: samuel.d.wyatt@nasa.gov
|
|
58
|
+
|
|
59
|
+
# Required mail subject:
|
|
60
|
+
subject: Smoke test ${{ job.status }} in ${{github.repository}}
|
|
61
|
+
# Required sender full name:
|
|
62
|
+
from: GitHub Actions Report
|
|
63
|
+
# Optional body:
|
|
64
|
+
html_body: |
|
|
65
|
+
<!DOCTYPE html>
|
|
66
|
+
<html>
|
|
67
|
+
<body>
|
|
68
|
+
<h3>Smoke test ${{ job.status }}</h3>
|
|
69
|
+
<p>The smoke test in <b>${{ github.repository }}</b> has completed with result: <b>${{ job.status }}</b></p>
|
|
70
|
+
<p><a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">
|
|
71
|
+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
72
|
+
</a></p>
|
|
73
|
+
</body>
|
|
74
|
+
</html>
|
|
75
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and report code coverage with a variety of Python versions
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Unit test and code coverage
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v6
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
sudo apt-get update
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install -e .[dev]
|
|
31
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
32
|
+
- name: Run unit tests with pytest
|
|
33
|
+
run: |
|
|
34
|
+
python -m pytest --cov=tools --cov-report=xml
|
|
35
|
+
- name: Upload coverage report to codecov
|
|
36
|
+
uses: codecov/codecov-action@v5
|
|
37
|
+
with:
|
|
38
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|