mpcq 0.2.3.dev4__tar.gz → 0.2.4__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.
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/.gitignore +1 -0
- mpcq-0.2.4/.pre-commit-config.yaml +39 -0
- {mpcq-0.2.3.dev4/mpcq.egg-info → mpcq-0.2.4}/PKG-INFO +25 -1
- mpcq-0.2.3.dev4/PKG-INFO → mpcq-0.2.4/README.md +16 -7
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/client.py +2 -2
- mpcq-0.2.3.dev4/README.md → mpcq-0.2.4/mpcq.egg-info/PKG-INFO +31 -0
- mpcq-0.2.3.dev4/.pre-commit-config.yaml +0 -40
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/.github/workflows/lint.yaml +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/.github/workflows/publish.yaml +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/.python-version +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/__init__.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/observation.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/submission.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/tests/__init__.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/tests/test_integration.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/tests/test_submission.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/tests/test_utils.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/utils.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq/version.py +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq.egg-info/SOURCES.txt +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq.egg-info/dependency_links.txt +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq.egg-info/requires.txt +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/mpcq.egg-info/top_level.txt +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/pyproject.toml +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/requirements.txt +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/setup.cfg +0 -0
- {mpcq-0.2.3.dev4 → mpcq-0.2.4}/setup.py +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
+
default_language_version:
|
|
4
|
+
python: python3.11
|
|
5
|
+
repos:
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v4.4.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
args: [--markdown-linebreak-ext=md]
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
- id: check-yaml
|
|
13
|
+
- id: check-added-large-files
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/PyCQA/flake8
|
|
16
|
+
rev: 6.0.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: flake8
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/PyCQA/isort
|
|
21
|
+
rev: 5.12.0
|
|
22
|
+
hooks:
|
|
23
|
+
- id: isort
|
|
24
|
+
additional_dependencies:
|
|
25
|
+
- toml
|
|
26
|
+
|
|
27
|
+
- repo: https://github.com/psf/black
|
|
28
|
+
rev: 22.12.0
|
|
29
|
+
hooks:
|
|
30
|
+
- id: black
|
|
31
|
+
|
|
32
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
33
|
+
rev: v0.991
|
|
34
|
+
hooks:
|
|
35
|
+
- id: mypy
|
|
36
|
+
additional_dependencies:
|
|
37
|
+
- numpy
|
|
38
|
+
- sqlalchemy<2
|
|
39
|
+
- types-requests
|
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mpcq
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Requires-Python: >=3.9
|
|
5
5
|
Description-Content-Type: text/markdown
|
|
6
|
+
Requires-Dist: sqlalchemy<2
|
|
7
|
+
Requires-Dist: pandas
|
|
8
|
+
Requires-Dist: astropy
|
|
9
|
+
Requires-Dist: google-cloud-secret-manager
|
|
10
|
+
Requires-Dist: cloud-sql-python-connector[pg8000]
|
|
11
|
+
Requires-Dist: pg8000
|
|
6
12
|
Provides-Extra: tests
|
|
13
|
+
Requires-Dist: pre-commit; extra == "tests"
|
|
14
|
+
Requires-Dist: pytest; extra == "tests"
|
|
7
15
|
|
|
8
16
|
# mpcq
|
|
9
17
|
#### A Python package by the Asteroid Institute, a program of the B612 Foundation
|
|
10
18
|
|
|
11
19
|
This is a client library for interacting with an MPC observations database.
|
|
12
20
|
|
|
21
|
+
## Notice
|
|
22
|
+
|
|
23
|
+
The Asteroid Institute hosts a private mirror of the Minor Planet Center's Small Bodies Node.
|
|
24
|
+
|
|
25
|
+
To set up your own mirror, please see the [SBN guidelines](https://sbnwiki.astro.umd.edu/wiki/). While support is planned for connecting to an arbitrary database mirror, the current version of this package only supports connecting to a hosted Cloud SQL instance on GCP.
|
|
26
|
+
|
|
27
|
+
Two indices on the observation table have been added for performance reasons. They are listed below with their sql definitions:
|
|
28
|
+
- obs_sbn_submission_id
|
|
29
|
+
```sql
|
|
30
|
+
CREATE INDEX obs_sbn_submission_id ON public.obs_sbn USING hash (submission_id);
|
|
31
|
+
```
|
|
32
|
+
- obs_sbn_provid
|
|
33
|
+
```sql
|
|
34
|
+
CREATE INDEX obs_sbn_provid ON public.obs_sbn USING hash (provid)
|
|
35
|
+
```
|
|
36
|
+
|
|
13
37
|
## Usage
|
|
14
38
|
|
|
15
39
|
To connect to the Asteroid Institute's clone of the Small Bodies Node MPC database:
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: mpcq
|
|
3
|
-
Version: 0.2.3.dev4
|
|
4
|
-
Requires-Python: >=3.9
|
|
5
|
-
Description-Content-Type: text/markdown
|
|
6
|
-
Provides-Extra: tests
|
|
7
|
-
|
|
8
1
|
# mpcq
|
|
9
2
|
#### A Python package by the Asteroid Institute, a program of the B612 Foundation
|
|
10
3
|
|
|
11
4
|
This is a client library for interacting with an MPC observations database.
|
|
12
5
|
|
|
6
|
+
## Notice
|
|
7
|
+
|
|
8
|
+
The Asteroid Institute hosts a private mirror of the Minor Planet Center's Small Bodies Node.
|
|
9
|
+
|
|
10
|
+
To set up your own mirror, please see the [SBN guidelines](https://sbnwiki.astro.umd.edu/wiki/). While support is planned for connecting to an arbitrary database mirror, the current version of this package only supports connecting to a hosted Cloud SQL instance on GCP.
|
|
11
|
+
|
|
12
|
+
Two indices on the observation table have been added for performance reasons. They are listed below with their sql definitions:
|
|
13
|
+
- obs_sbn_submission_id
|
|
14
|
+
```sql
|
|
15
|
+
CREATE INDEX obs_sbn_submission_id ON public.obs_sbn USING hash (submission_id);
|
|
16
|
+
```
|
|
17
|
+
- obs_sbn_provid
|
|
18
|
+
```sql
|
|
19
|
+
CREATE INDEX obs_sbn_provid ON public.obs_sbn USING hash (provid)
|
|
20
|
+
```
|
|
21
|
+
|
|
13
22
|
## Usage
|
|
14
23
|
|
|
15
24
|
To connect to the Asteroid Institute's clone of the Small Bodies Node MPC database:
|
|
@@ -26,8 +26,8 @@ class MPCObservationsClient:
|
|
|
26
26
|
@classmethod
|
|
27
27
|
def connect_using_gcloud(
|
|
28
28
|
cls,
|
|
29
|
-
cloudsql_connection_name: str = "moeyens-thor-dev:us-west1:mpc-replica",
|
|
30
|
-
credentials_uri: str = "projects/moeyens-thor-dev/secrets/mpc-replica-readonly-credentials/versions/latest", # noqa: E501
|
|
29
|
+
cloudsql_connection_name: str = "moeyens-thor-dev:us-west1:mpc-sbn-replica",
|
|
30
|
+
credentials_uri: str = "projects/moeyens-thor-dev/secrets/mpc-sbn-replica-readonly-credentials/versions/latest", # noqa: E501
|
|
31
31
|
):
|
|
32
32
|
log.info("loading database credentials")
|
|
33
33
|
client = google.cloud.secretmanager.SecretManagerServiceClient()
|
|
@@ -1,8 +1,39 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: mpcq
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Requires-Python: >=3.9
|
|
5
|
+
Description-Content-Type: text/markdown
|
|
6
|
+
Requires-Dist: sqlalchemy<2
|
|
7
|
+
Requires-Dist: pandas
|
|
8
|
+
Requires-Dist: astropy
|
|
9
|
+
Requires-Dist: google-cloud-secret-manager
|
|
10
|
+
Requires-Dist: cloud-sql-python-connector[pg8000]
|
|
11
|
+
Requires-Dist: pg8000
|
|
12
|
+
Provides-Extra: tests
|
|
13
|
+
Requires-Dist: pre-commit; extra == "tests"
|
|
14
|
+
Requires-Dist: pytest; extra == "tests"
|
|
15
|
+
|
|
1
16
|
# mpcq
|
|
2
17
|
#### A Python package by the Asteroid Institute, a program of the B612 Foundation
|
|
3
18
|
|
|
4
19
|
This is a client library for interacting with an MPC observations database.
|
|
5
20
|
|
|
21
|
+
## Notice
|
|
22
|
+
|
|
23
|
+
The Asteroid Institute hosts a private mirror of the Minor Planet Center's Small Bodies Node.
|
|
24
|
+
|
|
25
|
+
To set up your own mirror, please see the [SBN guidelines](https://sbnwiki.astro.umd.edu/wiki/). While support is planned for connecting to an arbitrary database mirror, the current version of this package only supports connecting to a hosted Cloud SQL instance on GCP.
|
|
26
|
+
|
|
27
|
+
Two indices on the observation table have been added for performance reasons. They are listed below with their sql definitions:
|
|
28
|
+
- obs_sbn_submission_id
|
|
29
|
+
```sql
|
|
30
|
+
CREATE INDEX obs_sbn_submission_id ON public.obs_sbn USING hash (submission_id);
|
|
31
|
+
```
|
|
32
|
+
- obs_sbn_provid
|
|
33
|
+
```sql
|
|
34
|
+
CREATE INDEX obs_sbn_provid ON public.obs_sbn USING hash (provid)
|
|
35
|
+
```
|
|
36
|
+
|
|
6
37
|
## Usage
|
|
7
38
|
|
|
8
39
|
To connect to the Asteroid Institute's clone of the Small Bodies Node MPC database:
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# See https://pre-commit.com for more information
|
|
2
|
-
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
-
default_language_version:
|
|
4
|
-
python: python3.10
|
|
5
|
-
repos:
|
|
6
|
-
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
-
rev: v4.4.0
|
|
8
|
-
hooks:
|
|
9
|
-
- id: trailing-whitespace
|
|
10
|
-
args: [--markdown-linebreak-ext=md]
|
|
11
|
-
- id: end-of-file-fixer
|
|
12
|
-
- id: check-yaml
|
|
13
|
-
- id: check-added-large-files
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- repo: https://github.com/PyCQA/flake8
|
|
17
|
-
rev: 6.0.0
|
|
18
|
-
hooks:
|
|
19
|
-
- id: flake8
|
|
20
|
-
|
|
21
|
-
- repo: https://github.com/PyCQA/isort
|
|
22
|
-
rev: 5.12.0
|
|
23
|
-
hooks:
|
|
24
|
-
- id: isort
|
|
25
|
-
additional_dependencies:
|
|
26
|
-
- toml
|
|
27
|
-
|
|
28
|
-
- repo: https://github.com/psf/black
|
|
29
|
-
rev: 22.12.0
|
|
30
|
-
hooks:
|
|
31
|
-
- id: black
|
|
32
|
-
|
|
33
|
-
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
34
|
-
rev: v0.991
|
|
35
|
-
hooks:
|
|
36
|
-
- id: mypy
|
|
37
|
-
additional_dependencies:
|
|
38
|
-
- numpy
|
|
39
|
-
- sqlalchemy<2
|
|
40
|
-
- types-requests
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|