-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Reason for Change - #11 ## Changes - renamed constants.py to _constants.py to not expose constants in API docs - use pdoc to generate documentation based on docstring - add gha to deploy docsite changes on merge to main ## Testing steps - update GHA to test that docsite won't break as a 'push test', but only deploy new site on merge to main ## Notes for Reviewer - tidying up docstrings, adding more README infos and markdowns - versioning support > not including at this time. - pdoc docs: https://pdoc.dev/docs/pdoc.html#add-documentation --------- Co-authored-by: Bento007 <[email protected]> Co-authored-by: Trent Smith <[email protected]>
- Loading branch information
1 parent
c52c436
commit b7591bc
Showing
10 changed files
with
131 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build Docsite | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
cd api/python | ||
make docs/install | ||
- name: Build the docsite | ||
run: | | ||
cd api/python | ||
make docs/build | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: api/python/docs/ | ||
|
||
# Deploy the artifact to GitHub pages. | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,35 @@ | ||
# Python API | ||
|
||
# Install | ||
API Documentation: https://chanzuckerberg.github.io/cellxgene-ontology-guide/cellxgene_ontology_guide.html | ||
|
||
pypi: https://pypi.org/project/cellxgene-ontology-guide/ | ||
|
||
# Developer Setup | ||
|
||
## Install | ||
|
||
```bash | ||
make install | ||
``` | ||
|
||
# Uninstall | ||
## Uninstall | ||
|
||
```bash | ||
make uninstall | ||
``` | ||
|
||
# Run Unit Tests | ||
## Run Unit Tests | ||
|
||
```bash | ||
make install-dev | ||
make unit-tests | ||
``` | ||
|
||
## Release | ||
|
||
The [release.yml](../../.github/workflows/release.yml) GHA should handle the release process for the pypi package. | ||
However if you need to manually release the package, you can use the following commands: | ||
|
||
```bash | ||
make release/pypi | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
API Documentation: https://chanzuckerberg.github.io/cellxgene-ontology-guide/cellxgene_ontology_guide.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,34 @@ build-backend = "setuptools.build_meta" | |
[project] | ||
name = "cellxgene_ontology_guide" | ||
dynamic = ["version"] | ||
description = "Access ontology data used by CZ cellxgene" | ||
description = "Access ontology metadata used by CZ cellxgene" | ||
authors = [ | ||
{ name = "Chan Zuckerberg Initiative Foundation", email = "[email protected]" } | ||
] | ||
license = { file = "LICENSE" } | ||
readme = "README.md" | ||
readme = "pypi_README.md" | ||
requires-python = "~= 3.10" | ||
dependencies = ["semantic_version>=2.10.0,<3"] | ||
|
||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12" | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://chanzuckerberg.github.io/cellxgene-ontology-guide/cellxgene_ontology_guide.html" | ||
Repository = "https://github.com/chanzuckerberg/cellxgene-ontology-guide.git" | ||
Issues = "https://github.com/chanzuckerberg/cellxgene-ontology-guide/issues" | ||
Changelog = "https://github.com/chanzuckerberg/cellxgene-ontology-guide/blob/main/api/python/CHANGELOG.md" | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest", "coverage"] | ||
docs = ["pdoc"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
@@ -30,4 +47,3 @@ root = "../.." # relative to the location of the pyproject.toml file | |
|
||
[tool.pytest.ini_options] | ||
pythonpath = ["src/cellxgene_ontology_guide"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
""" | ||
.. include:: ../../../../README.md | ||
.. include:: ../../CHANGELOG.md | ||
""" | ||
|
||
import cellxgene_ontology_guide._version as version | ||
|
||
__version__ = version.__version__ | ||
__all__ = ["curated_ontology_term_lists", "entities", "ontology_parser", "supported_versions"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters