Skip to content

Commit

Permalink
build: Move requirements into pyproject.toml. Reconfigure Sphinx. Rem…
Browse files Browse the repository at this point in the history
…ove installation page.
  • Loading branch information
jpmckinney committed Feb 6, 2025
1 parent 4493390 commit b64bce8
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 113 deletions.
12 changes: 12 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python:
install:
- path: .
- requirements: docs/requirements.txt
sphinx:
configuration: docs/conf.py
fail_on_warning: true
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Nightingale is a Python package designed to transform flat data from an SQLite d
## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
Expand All @@ -16,17 +15,13 @@ Nightingale is a Python package designed to transform flat data from an SQLite d
- Load data from SQLite databases and map data fields to the OCDS format based on configuration
- Optionally package transformed data into OCDS release packages

## Installation

Please refer to the [Installation Guide](docs/installation.rst).

## Usage

Please refer to the [Tutorial](docs/tutorial.rst) or read [Examples](docs/examples.rst)

## Documentation

Comprehensive documentation for Nightingale, including an overview, installation guide, tutorial, examples, API reference, CLI reference, and configuration reference, is available in the `docs` directory.
Comprehensive documentation for Nightingale, including an overview, tutorial, examples, API reference, CLI reference, and configuration reference, is available in the `docs` directory.

To generate the HTML documentation:

Expand Down
35 changes: 24 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,48 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import sys

sys.path.insert(0, os.path.abspath("../.."))
sys.path.insert(0, os.path.abspath(".."))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "nightingale"
copyright = "2024, Open Contracting"
author = "Open Contracting"
copyright = "2024, Open Contracting Partnership"
author = "Open Contracting Partnership"

version = "0.0.1"
release = version

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx.ext.todo",
]


templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_static_path = ["_static"]
html_theme = "furo"
html_static_path = []

# -- Extension configuration -------------------------------------------------

autodoc_default_options = {
"members": None,
"member-order": "bysource",
}
autodoc_typehints = "description"
autodoc_type_aliases = {}

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
}
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Welcome to nightingale's documentation!
:maxdepth: 2
:caption: Contents:

installation
tutorial
examples
data_flow
Expand Down
36 changes: 0 additions & 36 deletions docs/installation.rst

This file was deleted.

1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
furo
69 changes: 29 additions & 40 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,60 +1,49 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "nightingale"
version = "0.0.1"
readme = "README.rst"
authors = [{name = "Open Contracting Partnership", email = "[email protected]"}]
description = "An ETL to transform US cities procurement data into OCDS format."
#description-file = "README.rst"
authors = [
{ name = "Open Contracting Partnership", email = "[email protected]" },
]

readme = "README.rst"
license = {text = "BSD"}
urls = {Homepage = "https://github.com/open-contracting/nightingale"}
classifiers = [
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]


[project.license]
file = "LICENSE"
dependencies = [
"click",
"click-pathlib",
"dict-hash",
"ocdskit",
"openpyxl",
"pydantic",
"simplejson",
]

[project.scripts]
nightingale = "nightingale.cli:run"

[project.urls]
Documentation = "https://github.com/open-contracting/nightingale"
Source = "https://github.com/open-contracting/nightingale"

[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[tool.pylint.BASIC]
good-names = 'e,f,i,n,io' # exception, file, enumerate, number

[tool.pylint.'MESSAGES CONTROL']
disable = [
'too-many-arguments',
# Defer to flake8
'line-too-long',
# Defer to pydocstyle
'missing-module-docstring',
'missing-class-docstring',
'missing-function-docstring',
[project.optional-dependencies]
test = [
"coverage",
"pytest",
]

[tool.setuptools]
packages = ["nightingale"]


[tool.coverage.run]
omit = ["tests/*"]
[tool.setuptools.packages.find]
exclude = [
"tests",
"tests.*",
]

[tool.ruff]
ignore = ['E501']
line-length = 119
target-version = "py311"
ignore = ["E501"]
19 changes: 0 additions & 19 deletions requirements.txt

This file was deleted.

0 comments on commit b64bce8

Please sign in to comment.