Skip to content

Commit

Permalink
Keywords and staging for read the docs (#18)
Browse files Browse the repository at this point in the history
* Updated keywords for package and added socket badge to readme.md

* Fixed Socket Badge

* Staging shift to read the docs
  • Loading branch information
nikothomas authored Aug 11, 2024
1 parent 0e063f7 commit f1bf7c2
Show file tree
Hide file tree
Showing 8 changed files with 474 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.codiumai
ctdfjorder/newsfragments
/Samples/
28 changes: 28 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
commands:
- python -m pip install --upgrade pip
- pip install build
- pip install pydata-sphinx-theme
- pip install sphinx-argparse
- pip install sphinx-design
- pip install git+https://github.com/choldgraf/sphinx-social-previews


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
python:
install:
- method: poetry
requirements: pyproject.toml
path: .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Tests](https://github.com/nikothomas/ctdfjorder/actions/workflows/tests.yml/badge.svg?branch=main)
[![PyPI version](https://badge.fury.io/py/ctdfjorder.svg)](https://badge.fury.io/py/ctdfjorder)
[![Socket Badge](https://socket.dev/api/badge/pypi/package/ctdfjorder/0.7.3)](https://socket.dev/pypi/package/ctdfjorder/overview/0.7.3)
[![Socket Badge](https://socket.dev/api/badge/pypi/package/ctdfjorder/0.7.31)](https://socket.dev/pypi/package/ctdfjorder/overview/0.7.3)

<p style=text-align:center;>
<img src="logo.png" alt="CTDFjorder Logo"/>
Expand Down
Binary file added docs/_static/fonts/Roboto.zip
Binary file not shown.
Binary file added docs/_static/github-brand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 20 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,33 @@

import os
import sys


import matplotlib.pyplot as plt
from matplotlib import font_manager
sys.path.insert(0, os.path.abspath('..'))
font_dirs = ["_static/fonts"]
print(os.getcwd())
font_files = font_manager.findSystemFonts(fontpaths=font_dirs)
for font_file in font_files:
font_manager.fontManager.addfont(font_file)
# Set the font family globally for Matplotlib
plt.rcParams['font.family'] = 'Roboto'
print(plt.rcParams['font.family'])
print(font_manager.findSystemFonts(fontpaths=font_dirs))
project = 'CTDFjorder'
copyright = '2024, Nikolas Yanek-Chrones'
author = 'Nikolas Yanek-Chrones'
release = '0.7.3'
release = '0.7.31'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon', 'pydata_sphinx_theme', 'sphinxarg.ext', 'sphinx_design', 'sphinx.ext.viewcode']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon', 'pydata_sphinx_theme', 'sphinxarg.ext', 'sphinx_design', 'sphinx.ext.viewcode', "sphinx_social_previews"]
ogp_site_url="https://nikothomas.github.io/ctdfjorder/"
ogp_image = "https://nikothomas.github.io/ctdfjorder/_static/logo.png"
ogp_social_previews = {
"image_mini": "_static/github-brand.png",
}
ogp_description_length = 500
autodoc_default_flags = ['members']
templates_path = ['_templates']
exclude_patterns = []
Expand All @@ -35,6 +50,7 @@
"navbar_align": "left",
"footer_start": ["copyright"],
"footer_end": [],
"announcement": f" v{release}",
"icon_links": [
{
# Label for this link
Expand Down
417 changes: 415 additions & 2 deletions poetry.lock

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
package-mode = true
name = "ctdfjorder"
version = "0.7.3"
version = "0.7.31"
description = "A package for processing and analyzing CTD data."
homepage = "https://github.com/nikothomas/ctdfjorder"
repository = "https://github.com/nikothomas/ctdfjorder"
Expand All @@ -28,7 +28,7 @@ exclude = [
]

[tool.poetry.dependencies]
python = ">=3.11"
python = ">=3.11,<4.0"
torch = ">=2.4.0"
polars = ">=1.4.1"
psutil = "^6.0.0"
Expand All @@ -53,7 +53,9 @@ pandas = ">=2.2.2"
sphinx = ">=8.0.2"
pydata-sphinx-theme = ">=0.15.4"
sphinx-design = "0.6.1"
sphinx-social-previews = { git = "https://github.com/choldgraf/sphinx-social-previews" }
pytest-cov = "5.0.0"
grayskull = "2.6.0"

[tool.poetry.extras]
phyto = ["ctdfjorder.phyto"]
Expand All @@ -70,7 +72,7 @@ name = "CTDFjorder"
package = "ctdfjorder"
package_dir = "."
filename = "docs/changelog.rst"
version = "0.7.2"
version = "0.7.31"
template = "docs/_templates/changelog.rst.jinja"
underlines = ["=", "^", "-", "~"]

Expand Down Expand Up @@ -105,4 +107,7 @@ showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous"
showcontent = true
showcontent = true

[tool.poetry2conda]
name = "ctdfjorder-conda"

0 comments on commit f1bf7c2

Please sign in to comment.