Skip to content

Commit

Permalink
Merge pull request #207 from JWCook/fontawesome
Browse files Browse the repository at this point in the history
Add sphinx-panels and fontawesome icons
  • Loading branch information
JWCook committed Jul 14, 2021
2 parents a478949 + f886c87 commit dbbc60f
Show file tree
Hide file tree
Showing 20 changed files with 115 additions and 68 deletions.
16 changes: 12 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,21 @@ Here are some general guidelines for submitting a pull request:
- Submit the PR to be merged into the `main` branch.

### Releases
For maintainers:
Notes for maintainers on publishing new releases:

Releases are based on git tags. GitHub Actions will build and deploy packages to PyPi on tagged commits
on the `main` branch. Release steps:
- Update the version in `pyinaturalist/__init__.py`
- Update the version in both `pyproject.toml` and `pyinaturalist/__init__.py`
- Update the release notes in `HISTORY.md`
- Merge changes into the `main` branch
- Push a new tag, e.g.: `git tag v0.1 && git push origin --tags`
- Push a new tag, e.g.: `git tag v0.1.0 && git push upstream --tags`
- This will trigger a deployment. Verify that this completes successfully and that the new version
can be installed from pypi with `pip install`
can be installed from PyPI with `pip install pyinaturalist`.
- Verify that the docs are built and published to [Read The Docs](https://pyinaturalist.readthedocs.io).
- A PR for a new Conda release will be created by a bot on the [pyinaturalist-feedstock](https://github.com/conda-forge/pyinaturalist-feedstock/)
repo. It may take a couple hours after PyPI deployment for this to happen. Typically this will be
auto-merged and built without any manual action required. Just verify that this completes successfully
and that the new version can be installed from conda-forge with `conda install -c conda-forge pyinaturalist`.
- 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).
- Update and build the Docker image for [pyinaturalist-notebook](https://github.com/JWCook/pyinaturalist-notebook).
- TODO: This should be fully automated, and triggered after the Conda build rather than the PyPI build.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Coverage Status](https://coveralls.io/repos/github/niconoe/pyinaturalist/badge.svg?branch=main)](https://coveralls.io/github/niconoe/pyinaturalist?branch=main)

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

Expand Down
7 changes: 7 additions & 0 deletions docs/_static/colors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* Main theme colors */
.md-primary {color: var(--color-brand-primary)}
.md-secondary {color: var(--color-brand-content)}

/* Color for Font Awesome icons */
span.fa {color: var(--color-brand-primary)}
span.fas {color: var(--color-brand-primary)}
File renamed without changes.
Binary file added docs/_static/pyinaturalist_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
# General information about the project.
copyright = '2021, Nicolas NoΓ©, Jordan Cook'
exclude_patterns = ['_build', f'{MODULE_DOCS_DIR}/pyinaturalist.rst']
html_static_path = ['_static']
master_doc = 'index'
needs_sphinx = '4.0'
project = 'pyinaturalist'
Expand All @@ -68,6 +67,7 @@
'sphinx_automodapi.smart_resolver',
'sphinx_copybutton',
'sphinx_inline_tabs',
'sphinx_panels',
'sphinxcontrib.apidoc',
'myst_parser',
'nbsphinx',
Expand Down Expand Up @@ -134,11 +134,17 @@
numpydoc_show_class_members = False

# HTML general settings
html_logo = join('images', 'pyinaturalist_logo.png')
# html_logo = join('images', 'python-logo-green.png')
html_favicon = join('images', 'favicon.ico')
html_static_path = ['_static']
html_favicon = join('_static', 'favicon.ico')
html_logo = join('_static', 'pyinaturalist_logo.png')
html_js_files = ['collapsible_container.js']
html_css_files = ['collapsible_container.css', 'table.css']
html_css_files = [
'collapsible_container.css',
'colors.css',
'table.css',
'https://use.fontawesome.com/releases/v5.15.3/css/all.css',
'https://use.fontawesome.com/releases/v5.15.3/css/v4-shims.css',
]
html_show_sphinx = False
pygments_style = 'friendly'
pygments_dark_style = 'material'
Expand Down
86 changes: 54 additions & 32 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyinaturalist/models/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@define_model
class Comment(BaseModel):
"""πŸ“ An observation comment, based on the schema of comments
""":fa:`comment` An observation comment, based on the schema of comments
from `GET /observations <https://api.inaturalist.org/v1/docs/#!/Observations/get_observations>`_.
"""

Expand Down
6 changes: 3 additions & 3 deletions pyinaturalist/models/controlled_term.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@define_model
class Annotation(BaseModel):
"""πŸ“ An annotation, meaning a **controlled term value** applied by a **user** to an **observation**.
""":fa:`tag` An annotation, meaning a **controlled term value** applied by a **user** to an **observation**.
Based on the schema of annotations from
`GET /observations <https://api.inaturalist.org/v1/docs/#!/Observations/get_observations>`_.
"""
Expand Down Expand Up @@ -45,7 +45,7 @@ def __str__(self) -> str:

@define_model
class ControlledTermValue(BaseModel):
"""πŸ“‹ A controlled term **value**, based on the schema of
""":fa:`tag` A controlled term **value**, based on the schema of
`GET /controlled_terms <https://api.inaturalist.org/v1/docs/#!/Controlled_Terms/get_controlled_terms>`_.
"""

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

@define_model
class ControlledTerm(BaseModel):
"""πŸ“‹ A controlled term, based on the schema of
""":fa:`tag` A controlled term, based on the schema of
`GET /controlled_terms <https://api.inaturalist.org/v1/docs/#!/Controlled_Terms/get_controlled_terms>`_.
"""

Expand Down
2 changes: 1 addition & 1 deletion pyinaturalist/models/identification.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@define_model
class Identification(BaseModel):
"""πŸ”Ž An observation identification, based on the schema of
""":fa:`fingerprint,style=fas` An observation identification, based on the schema of
`GET /identifications <https://api.inaturalist.org/v1/docs/#!/Identifications/get_identifications>`_.
"""

Expand Down
Loading

0 comments on commit dbbc60f

Please sign in to comment.