Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in validation of documentation construction. #81

Merged
merged 2 commits into from
May 6, 2024
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 .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM mcr.microsoft.com/devcontainers/python:0-3.10
ENV PYTHONUNBUFFERED 1

# [Optional] If your requirements rarely change, uncomment this section to add them to the image.
COPY docs/requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
COPY requirements-dev.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements-dev.txt \
&& rm -rf /tmp/pip-tmp

RUN apt-get update && apt-get -y install pandoc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Install notebook requirements
run: |
sudo apt-get install pandoc
- name: Build docs
run: |
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html -D exclude_patterns="notebooks/*"
- name: Run ghp-import
run: |
ghp-import -n -p -f -x docs/ docs/build/html
1 change: 1 addition & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Analyze code with linter

run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Run unit tests with pytest
run: |
python -m pytest tests
1 change: 1 addition & 0 deletions .github/workflows/testing-and-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Run unit tests with pytest
run: |
python -m pytest tests --cov=pzserver --cov-report=xml
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
# This hook should always pass. It will print a message if the local version
# is out of date.
- repo: https://github.com/lincc-frameworks/pre-commit-hooks
rev: v0.1
rev: v0.1.2
hooks:
- id: check-lincc-frameworks-template-version
name: Check template version
Expand Down Expand Up @@ -40,7 +40,7 @@ repos:

# prevents committing directly branches named 'main' and 'master'.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: no-commit-to-branch
name: Prevent main branch commits
Expand All @@ -52,15 +52,15 @@ repos:

# verify that pyproject.toml is well formed
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.12.1
rev: v0.16
hooks:
- id: validate-pyproject
name: Validate pyproject.toml
description: Verify that pyproject.toml adheres to the established schema.

# Automatically sort the imports used in .py files
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python files in src/ and tests/)
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/intro_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"\n",
"Contact author: [Julia Gschwend](mailto:[email protected])\n",
"\n",
"Last verified run: 2024-Jan-23<br>"
"Last verified run: 2024-May-06<br>"
]
},
{
Expand Down Expand Up @@ -927,9 +927,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "pz-lib",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "pz-lib"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand Down
10 changes: 0 additions & 10 deletions docs/requirements.txt

This file was deleted.

40 changes: 5 additions & 35 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "pzserver"
license = {file = "LICENSE"}
dynamic = ["version"]
dynamic = ["version", "dependencies", "optional-dependencies"]
readme = "README.md"
authors = [
{ name = "LIneA", email = "[email protected]" }
Expand All @@ -20,40 +20,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"deprecated",
"numpy>=1.23",
"pandas>=1.2.0",
"requests>=2.23.0",
"astropy>=5.0.0",
"matplotlib>=3.6.0",
"tables_io>=0.7.9",
"Jinja2>=3.1.2",
"ipython>=8.5.0",
"h5py>=3.8.0",
"pyarrow>=15.0.2",
]

# On a mac, install optional dependencies with `pip install '.[dev]'` (include the single quotes)
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov", # Used to report total code coverage
"pre-commit", # Used to run checks before finalizing a git commit
"sphinx>=7.0.0,<8", # Used to automatically generate documentation
"sphinx_rtd_theme>=1.2.0,<2", # Used to render documentation
"sphinx-autoapi>=3.0.0,<4", # Used to automatically generate api documentation
"pylint", # Used for static linting of files
# if you add dependencies here while experimenting in a notebook and you
# want that notebook to render in your documentation, please add the
# dependencies to ./docs/requirements.txt as well.
"ipykernel", # Support for Jupyter notebooks
"nbconvert", # Needed for pre-commit check to clear output from Python notebooks
"nbsphinx", # Used to integrate Python notebooks into Sphinx documentation
"ipython", # Also used in building notebooks into Sphinx
"jupyterlab",
"matplotlib", # Used in sample notebook intro_notebook.ipynb
]

[build-system]
requires = [
Expand All @@ -64,3 +30,7 @@ build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "src/pzserver/_version.py"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
optional-dependencies = {dev = { file = ["requirements-dev.txt"] }}
13 changes: 13 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pytest
pytest-cov
pre-commit
sphinx>=7.0.0,<8
sphinx_rtd_theme>=1.2.0,<2
sphinx-autoapi>=3.0.0,<4
pylint
ipykernel
nbconvert
nbsphinx
ipython
jupyterlab
matplotlib
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deprecated
numpy>=1.23
pandas>=1.2.0
requests>=2.23.0
astropy>=5.0.0
matplotlib>=3.6.0
tables_io>=0.7.9
Jinja2>=3.1.2
ipython>=8.5.0
h5py>=3.8.0
pyarrow>=15.0.2
Loading