Skip to content

Commit 13ab5bc

Browse files
Feature/update docs (#15)
* Updated Sphinx documentation New Index.rst page, Old index.rst page became corese.rst. Added new pages: python_api/api_root.rst with autogenerated API doc. Added python_api/bridges.rst page The example1.ipynb notebook is rendered as a uset_guide. INSTALL.md is rendered as an installation page * Updated pyproject.toml * Moved VIESION.txt to src/pycorese to update the version only in one place. * Minor fixes and updates
1 parent 203b617 commit 13ab5bc

File tree

6 files changed

+37
-15
lines changed

6 files changed

+37
-15
lines changed

CHANGES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Changelog
22

3+
## Version 0.1.5
4+
5+
- added corese-python/pycorese API documentation
6+
- wraps corese-core v4.6.0
7+
8+
## Version 0.1.4
9+
10+
- downgraded version to 0.1.4 since it's not ready for 1.0.0 yet
11+
- updated markdown documentation
12+
- wraps corese-core v4.6.0
13+
314
## Version 1.0.1
415

5-
- document local installaiton process (INSTALL.md)
16+
- document local installation process (INSTALL.md)
617
- build jar file then running `python -m build` (may need more work)
718
- add doc skeleton and github action files
819
- add coreseVersion (not fully implemented yet)

VERSION.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ sphinx-multiversion docs/source build/html
2222

2323
## Switcher generation
2424

25-
- To navigate between versions by means of the switcher (the dropdown list indicating the available version), the switcher.json object must be generated.
26-
- To improve navigability, a landing page must also be generated to redirect to the latest version of the documentation.
25+
- To navigate between versions by means of the switcher (the dropdown list indicating the available version), the switcher.json object must be generated.
26+
- To improve navigability, a landing page must also be generated to redirect to the latest version of the documentation.
2727

2828
To this end a script must be executed and write the output to the output html directory:
2929

@@ -33,4 +33,4 @@ To this end a script must be executed and write the output to the output html di
3333

3434
Both sphinx-multiversion and switcher_generator work on tags following the ```^v[0-9]+\.[0-9]+\.[0-9]+$``` syntax and ordered by refname.
3535

36-
The minimal version set in the switcher_generator allows to not generate entries in the switcher and landing page for unexisting or uncompatible documentation.
36+
The minimal version set in the switcher_generator allows to not generate entries in the switcher and landing page for nonexisting or incompatible documentation.

pyproject.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ build-backend = "setuptools.build_meta"
44

55

66
[tool.setuptools.dynamic]
7-
version = { file = "VERSION.txt" }
7+
version = { file = "src/pycorese/VERSION.txt" }
8+
readme = { file = "README.md" }
9+
810

911
[project]
1012
name = "pycorese"
11-
dynamic = ["version"]
13+
dynamic = ["version", "readme"]
1214
authors = [
1315
{ name = "Corese Team", email = "corese@inria.fr" },
1416
{ name = "Anna Bobasheva", email = "anna.bobasheva@inria.fr" },
@@ -19,7 +21,7 @@ authors = [
1921
description = "pycorese: Python API for CORESE Semantic Web platform"
2022
keywords = ["Query Engine", "SPARQL", "SHACL", "RDF",
2123
"RDFS", "OWL", "Reasoning", "Knowledge Graph"]
22-
readme = "README.md"
24+
2325
license = {file = "LICENSE"}
2426
requires-python = ">=3.10"
2527
dependencies = [
@@ -66,9 +68,11 @@ include-package-data = true
6668
where = ["src"]
6769

6870
# Adding the Java jars to the package.
69-
# The jar files are built by the custom build step in the setup.py.
70-
# One jar is built by the gradle build system,
71-
# the other is downloaded from the maven repository.
72-
# Both are copied to the `resources` directory.
71+
# The jar files are obtained by the custom `sdist` step in the setup.py.
72+
# (1) corese-python-{version}-with-dependencies.jar is built by the gradle build system,
73+
# (2) corese-core-{version}-with-dependencies.jar is downloaded from the maven repository
74+
# (https://mvnrepository.com/artifact/fr.inria.corese/corese-core).
75+
# Both files are copied to the `resources` directory
76+
# and installed to the `share/pycorese` directory of the venv.
7377
[tool.setuptools.data-files]
7478
"share/pycorese" = ["resources/*.jar"]

src/pycorese/VERSION.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.5

src/pycorese/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
"""The module provides a wrapper to corese library (Software platform for the Semantic Web of Linked Data)"""
22

3+
from .api import CoreseAPI
34

4-
__version__ = '1.0.1'
5-
__version_info__ = tuple([ int(num) for num in __version__.split('.')])
5+
all = ['CoreseAPI']
66

7-
from .api import CoreseAPI
7+
# Read version of the package from the file
8+
# that is in the project rood directory
9+
from pathlib import Path
10+
11+
with open(Path(__file__).parent / "VERSION.txt") as _f:
12+
__version__ = _f.read().strip()
13+
14+
__version_info__ = tuple([ int(num) for num in __version__.split('.')])
815

916
import logging
1017

0 commit comments

Comments
 (0)