Skip to content

Commit dbbc60f

Browse files
committed
Merge pull request #207 from JWCook/fontawesome
Add sphinx-panels and fontawesome icons
2 parents a478949 + f886c87 commit dbbc60f

20 files changed

Lines changed: 115 additions & 68 deletions

CONTRIBUTING.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,21 @@ Here are some general guidelines for submitting a pull request:
8080
- Submit the PR to be merged into the `main` branch.
8181

8282
### Releases
83-
For maintainers:
83+
Notes for maintainers on publishing new releases:
8484

8585
Releases are based on git tags. GitHub Actions will build and deploy packages to PyPi on tagged commits
8686
on the `main` branch. Release steps:
87-
- Update the version in `pyinaturalist/__init__.py`
87+
- Update the version in both `pyproject.toml` and `pyinaturalist/__init__.py`
8888
- Update the release notes in `HISTORY.md`
8989
- Merge changes into the `main` branch
90-
- Push a new tag, e.g.: `git tag v0.1 && git push origin --tags`
90+
- Push a new tag, e.g.: `git tag v0.1.0 && git push upstream --tags`
9191
- This will trigger a deployment. Verify that this completes successfully and that the new version
92-
can be installed from pypi with `pip install`
92+
can be installed from PyPI with `pip install pyinaturalist`.
93+
- Verify that the docs are built and published to [Read The Docs](https://pyinaturalist.readthedocs.io).
94+
- A PR for a new Conda release will be created by a bot on the [pyinaturalist-feedstock](https://github.com/conda-forge/pyinaturalist-feedstock/)
95+
repo. It may take a couple hours after PyPI deployment for this to happen. Typically this will be
96+
auto-merged and built without any manual action required. Just verify that this completes successfully
97+
and that the new version can be installed from conda-forge with `conda install -c conda-forge pyinaturalist`.
98+
- If new depedencies have been added, then those must also be added to the [conda recipe](https://github.com/conda-forge/pyinaturalist-feedstock/blob/master/recipe/meta.yaml).
99+
- Update and build the Docker image for [pyinaturalist-notebook](https://github.com/JWCook/pyinaturalist-notebook).
100+
- TODO: This should be fully automated, and triggered after the Conda build rather than the PyPI build.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![Coverage Status](https://coveralls.io/repos/github/niconoe/pyinaturalist/badge.svg?branch=main)](https://coveralls.io/github/niconoe/pyinaturalist?branch=main)
77

88
[![PyPI](https://img.shields.io/pypi/v/pyinaturalist?color=blue)](https://pypi.org/project/pyinaturalist)
9+
[![Conda](https://img.shields.io/conda/vn/conda-forge/pyinaturalist?color=blue)](https://anaconda.org/conda-forge/pyinaturalist)
910
[![PyPI - Python Versions](https://img.shields.io/pypi/pyversions/pyinaturalist)](https://pypi.org/project/pyinaturalist)
1011
[![PyPI - Format](https://img.shields.io/pypi/format/pyinaturalist?color=blue)](https://pypi.org/project/pyinaturalist)
1112

docs/_static/colors.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* Main theme colors */
2+
.md-primary {color: var(--color-brand-primary)}
3+
.md-secondary {color: var(--color-brand-content)}
4+
5+
/* Color for Font Awesome icons */
6+
span.fa {color: var(--color-brand-primary)}
7+
span.fas {color: var(--color-brand-primary)}
87.6 KB
Loading

docs/conf.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
# General information about the project.
4949
copyright = '2021, Nicolas Noé, Jordan Cook'
5050
exclude_patterns = ['_build', f'{MODULE_DOCS_DIR}/pyinaturalist.rst']
51-
html_static_path = ['_static']
5251
master_doc = 'index'
5352
needs_sphinx = '4.0'
5453
project = 'pyinaturalist'
@@ -68,6 +67,7 @@
6867
'sphinx_automodapi.smart_resolver',
6968
'sphinx_copybutton',
7069
'sphinx_inline_tabs',
70+
'sphinx_panels',
7171
'sphinxcontrib.apidoc',
7272
'myst_parser',
7373
'nbsphinx',
@@ -134,11 +134,17 @@
134134
numpydoc_show_class_members = False
135135

136136
# HTML general settings
137-
html_logo = join('images', 'pyinaturalist_logo.png')
138-
# html_logo = join('images', 'python-logo-green.png')
139-
html_favicon = join('images', 'favicon.ico')
137+
html_static_path = ['_static']
138+
html_favicon = join('_static', 'favicon.ico')
139+
html_logo = join('_static', 'pyinaturalist_logo.png')
140140
html_js_files = ['collapsible_container.js']
141-
html_css_files = ['collapsible_container.css', 'table.css']
141+
html_css_files = [
142+
'collapsible_container.css',
143+
'colors.css',
144+
'table.css',
145+
'https://use.fontawesome.com/releases/v5.15.3/css/all.css',
146+
'https://use.fontawesome.com/releases/v5.15.3/css/v4-shims.css',
147+
]
142148
html_show_sphinx = False
143149
pygments_style = 'friendly'
144150
pygments_dark_style = 'material'

poetry.lock

Lines changed: 54 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinaturalist/models/comment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
@define_model
88
class Comment(BaseModel):
9-
"""📝 An observation comment, based on the schema of comments
9+
""":fa:`comment` An observation comment, based on the schema of comments
1010
from `GET /observations <https://api.inaturalist.org/v1/docs/#!/Observations/get_observations>`_.
1111
"""
1212

pyinaturalist/models/controlled_term.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
@define_model
88
class Annotation(BaseModel):
9-
"""📝 An annotation, meaning a **controlled term value** applied by a **user** to an **observation**.
9+
""":fa:`tag` An annotation, meaning a **controlled term value** applied by a **user** to an **observation**.
1010
Based on the schema of annotations from
1111
`GET /observations <https://api.inaturalist.org/v1/docs/#!/Observations/get_observations>`_.
1212
"""
@@ -45,7 +45,7 @@ def __str__(self) -> str:
4545

4646
@define_model
4747
class ControlledTermValue(BaseModel):
48-
"""📋 A controlled term **value**, based on the schema of
48+
""":fa:`tag` A controlled term **value**, based on the schema of
4949
`GET /controlled_terms <https://api.inaturalist.org/v1/docs/#!/Controlled_Terms/get_controlled_terms>`_.
5050
"""
5151

@@ -62,7 +62,7 @@ def __str__(self):
6262

6363
@define_model
6464
class ControlledTerm(BaseModel):
65-
"""📋 A controlled term, based on the schema of
65+
""":fa:`tag` A controlled term, based on the schema of
6666
`GET /controlled_terms <https://api.inaturalist.org/v1/docs/#!/Controlled_Terms/get_controlled_terms>`_.
6767
"""
6868

pyinaturalist/models/identification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
@define_model
1616
class Identification(BaseModel):
17-
"""🔎 An observation identification, based on the schema of
17+
""":fa:`fingerprint,style=fas` An observation identification, based on the schema of
1818
`GET /identifications <https://api.inaturalist.org/v1/docs/#!/Identifications/get_identifications>`_.
1919
"""
2020

0 commit comments

Comments
 (0)