Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,7 +28,7 @@ jobs:
python -m pip install --upgrade pip
pip install flake8 pytest pytest-astropy pytest-cov sphinx-astropy codecov
# install package and requirements
pip install .
pip install ".[all]"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# To install:
# pip install pre-commit
# pre-commit install --allow-missing-config
repos:
- repo: https://github.com/akaihola/darker
rev: 1.7.2
hooks:
- id: darker
25 changes: 18 additions & 7 deletions astrodbkit2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# from ._astropy_init import * # noqa
# ----------------------------------------------------------------------------

__all__ = ['__version__']
__all__ = ["__version__"]

# from .example_mod import * # noqa
# Then you can be explicit to control what ends up in the namespace,
Expand All @@ -17,15 +17,26 @@
try:
from .version import version as __version__
except ImportError:
__version__ = ''
__version__ = ""

# Global variables

# These describe the various database tables and their links
REFERENCE_TABLES = ['Publications', 'Telescopes', 'Instruments', 'Modes', 'Filters', 'PhotometryFilters',
'Citations', 'References', 'Versions', 'Parameters', 'Regimes']
REFERENCE_TABLES = [
"Publications",
"Telescopes",
"Instruments",
"Modes",
"Filters",
"PhotometryFilters",
"Citations",
"References",
"Versions",
"Parameters",
"Regimes",
]
# REFERENCE_TABLES is a list of tables that do not link to the primary table.
# These are treated separately from the other data tables that are all assumed to be linked to the primary table.
PRIMARY_TABLE = 'Sources' # the primary table used for storing objects
PRIMARY_TABLE_KEY = 'source' # the name of the primary key in the primary table; this is used for joining tables
FOREIGN_KEY = 'source' # the name of the foreign key in other tables that refer back to the primary
PRIMARY_TABLE = "Sources" # the primary table used for storing objects
PRIMARY_TABLE_KEY = "source" # the name of the primary key in the primary table; this is used for joining tables
FOREIGN_KEY = "source" # the name of the foreign key in other tables that refer back to the primary
Loading