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

Update documentation for new Python frontend #3178

Merged
merged 17 commits into from
Aug 30, 2023

Conversation

lonvia
Copy link
Member

@lonvia lonvia commented Aug 28, 2023

This is a rather massive overhaul of the documentation including:

  • new chapter on using Nominatim as a library with reference and a simple getting started guide
  • reworked API documentation with better presentation of parameters and additional hints
  • updated installation guide to take Python frontend into account
  • new deployment guide for Python frontend
  • documentation of new configuration parameters

I've reached the limits of the ReadtheDocs theme, so finally had to switch to the Material theme. I've also updated to a newer version of mkdocsstring which brings some visual changes how the parameters are presented.

choice between [Falcon](https://falcon.readthedocs.io/en/stable/)
and [Starlette](https://www.starlette.io/) as the ASGI framework.

This section gives a quick overview on how to configure Nginx to server
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to serve

[Nginx](https://nginx.org/en/docs/) for background information on how to configure it.

!!! Note
Throughout this page, we assume that your Nominatim project directory is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"that" in this and next line can be removed


### Installing the required packages

The recommended way to deploy Python ASGI application is to run
Copy link
Collaborator

@mtmail mtmail Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deploy the


### Setting up Nominatim as a systemd job

Next you need to set up the application that serves Nominatim. This is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

section starts with "set up the application" but ends "this sets the service up". I think it should be service


If you want to be able to search for places by their type through
If you want to be able to search for places by their type using
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd skip the "If you want"

@@ -2,13 +2,18 @@

Show all details about a single place saved in the database.

This API endpoint is meant for visual inspection of the data in the database
and is meant for use with [Nominatim-UI](https://github.com/osm-search/nominatim-ui/).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second "is meant" can be removed


Wrap JSON output in a callback function (JSONP) i.e. `<string>(<json>)`.
When given, then JSON output will be wrapped in a callback function with
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"When set" might work to avoid using "given" twice


The `address` layer contains all places that make up an address:
address points with house numbers, streets, inhabited places (suburbs, villages,
cities, states tec.) and administrative boundaries.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

etc.

address points with house numbers, streets, inhabited places (suburbs, villages,
cities, states tec.) and administrative boundaries.

The `poi` layer selects all point of interest. This includes classic POIs like
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

points of interest

@@ -0,0 +1,58 @@
# Result handling

The search functions of the Nominatim API always return a result object that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of 'that'.
return a result object containing ...
results and utility functions which allow...


When the `address_details` parameter is set, then functions return not
only information about the result place but also about the place that
make up the address. This information is almost always required, when you
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comma not needed

list of `AddressLine` objects with the country information last. The list also
contains the result place itself and some artificial entries, for example,
for the housenumber or the country code. This makes processing and creating
a full address easiert.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

easier

ADDRESS = enum.auto()
""" The address layer contains all places that have a fully qualified
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3x 'that'
all places having a fully ...
places which can be part of ...


Arguments:
conn: Open connection to the database which may be used to
retrive the words.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrieve

@lonvia
Copy link
Member Author

lonvia commented Aug 29, 2023

Thank you for the extensive review. The comments should be all fixed in the latest commit.

@lonvia lonvia merged commit aff43fb into osm-search:master Aug 30, 2023
8 checks passed
@lonvia lonvia deleted the library-documentation branch August 30, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants