psat-server-web
Python 3 web interface for the Pan-STARRS and ATLAS surveys.
To install:
pip install psat-server-web
Once installed, don't forget to add the "data" symlinks in the:
site-packages/psat_server_web/atlas/media/images site-packages/psat_server_web/ps1/media/images
directories which point to the location of the image stamps.
Local development version
A localised development instance can be run with docker compose. You will need a
.env file in your repository root to define some environment variables,
looking something like:
# Django settings
SECRET_KEY={YOUR_SECRET_KEY_HERE}
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
# MySQL/MariaDB settings
MYSQL_ROOT_USER=root
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=atlas
MYSQL_USER=atlas
MYSQL_PASSWORD=atlas
MYSQL_PORT=3306
MYSQL_TEST_DATABASE=atlas_test
MYSQL_TEST_PORT=3306
MYSQL_TEST_USER=root
MYSQL_TEST_PASSWORD=root
DJANGO_MYSQL_DBUSER=atlas
DJANGO_LASAIR_TOKEN=
Several of the values are omitted but aren't necessary to run a development environment. Also ruch simple passwords should not be used in production, but this should get you something running locally. Hopefully it's then as simple as running the following:
docker compose up
Which will start 4 services, comprised of:
db- A MariaDB instance. By default served atlocalhost:3036atlas-web- A mod-wsgi instance to serve the django front end. By default served atlocalhost:8086and requiresdbto be running.adminer- A web interface for interacting with the db. By default served atlocalhost:8080and requiresdbto be running.tests- A single-use run of the unit tests using django'smanage.py test. Requiresdbto be running.
Each of these services can be run independently with
docker compose up {service_name}
So if, for example, you wanted to run the tests you could execute
docker compose up tests and it would – after starting db if it is not
already running – perform a single run of the unit tests.
A dummy database
There are a few things you will likely need to do to get a fully working version of the web-server so as to make your local version useful, namely:
- Get a dummy database dump .sql file from one of the developers and place it into
data/init.sql - [Optional] Get an image dump and place it into
data/db_data/ - Fix a mild issue with the database model (see next section)
If you are having problems with any of this, contact one of the developers.
Issue with TcsGravityEventAnnotations.map_iteration
If you are getting an error along the lines of
atlas-web-1 | ERRORS:
atlas-web-1 | atlas.TcsGravityEventAnnotations.map_iteration: (fields.E311) 'TcsGravityAlerts.map_iteration' must be unique because it is referenced by a foreign key.
atlas-web-1 | HINT: Add unique=True to this field or add a UniqueConstraint (without condition) in the model Meta.constraints.
Then you may need to make an adjustment to the models, specifically by
uncommenting the line declaring TcsGravityAlerts.map_iteration which adds a
unique kwarg, and commenting the line without the unique kwarg, should solve
the problem. Specifically, the lines should look like
# map_iteration = models.CharField(max_length=100, blank=True, null=True)
map_iteration = models.CharField(max_length=100, blank=True, null=True, unique=True)
This is within the TcsGravityAlerts(models.Model) class. Again, please speak
to one of the developers if this is unclear.
Metadata
Release files for psat-server-web 0.10.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psat_server_web-0.10.2.tar.gz | 8.0 MB | Without provenance | Details for psat_server_web-0.10.2.tar.gz |
Release files / psat_server_web-0.10.2.tar.gz
| Download URL | psat_server_web-0.10.2.tar.gz |
|---|---|
| Size | 8.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c78300e761e5f482533d9223553a03fade28090ccf536a7dc520d69b818525d1
|
|
BLAKE2b-256 checksum How to use checksums |
d60b1407147b1c0eca1ded582b68e5efaa6f113fb95cafabf1b9f6523b2f0d21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for psat-server-web 0.10.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.