Skip to content

Commit

Permalink
fix: Fix SciCookie documentation (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab authored Mar 12, 2024
1 parent 8ed1b9f commit fdff49e
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
publish_dir: ./build/
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# vscode
.vscode
2 changes: 1 addition & 1 deletion .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ groups:
preview:
help: Preview documentation page locally
run: echo "[EE] Not implemented yet!"
run: mkdocs serve --watch docs --config-file mkdocs.yaml

release:
vars:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cookiecutter Python Package
# SciCookie

**SciCookie** is a template developed by
[Open Science Labs](https://opensciencelabs.org/) that creates projects from
Expand Down Expand Up @@ -27,7 +27,7 @@ and can be adjusted to meet particular project requirements.
a Python package.

- GitHub repo: <https://github.com/osl-incubator/scicookie/>
- Free software: BSD license
- Software License: BSD license

## Features

Expand Down
Binary file added docs/images/logo-original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions docs/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 93 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,114 @@
# Cookiecutter Python Package
# SciCookie

**SciCookie** is a template developed by
[Open Science Labs](https://opensciencelabs.org/) that creates projects from
project templates and is based on
[Cookieninja](https://github.com/cookieninja-generator/cookieninja) **A
Cookiecutter Fork** command-line utility. It serves as a boilerplate which can
be used by beginners as well as full fledged developers to simplify the project
creation process and save considerable amount of time. Cookieninja enables
projects with an initial layout that includes recommended tools, workflows, and
project structure.

Cookieninja also offers other features that can enhance the workflow of the
development process. Features such as _automatic documentation generation,
automated testing,_ and _project-specific configuration_ are part of this.
Overall, Cookieninja is an efficient tool that gives users the ability to
effortlessly create consistent, high-quality projects.

Open Science Labs Scientific Python cookiecutter template is primarily based on
the **PyOpenSci** recommendations who is actively conducting research to
determine the tools, libraries, best practices, and workflows utilized by
significant scientific Python groups. As a result, this template offers to
authors a starting point for their project that adheres with industry standards
and can be adjusted to meet particular project requirements.

[Cookieninja](https://github.com/cookieninja-generator/cookieninja) template for
a Python package.

- GitHub repo: <https://github.com/osl-incubator/scicookie/>
- Free software: BSD license
- Software License: BSD license

## Features

- TBD
- Allows package slug (use `_` instead of `-`)
- Licenses supported: MIT, BSD 3 Clause, ISC License, Apache Software License
2.0, and GPL 3
- Documentation engines: mkdocs, sphinx, jupyter-boook
- Test library: pytest, hypothesis
- Auto format code tool: black
- Initial integration with git
- Support to conda (as base environment) and poetry as packaging and dependency
management
- Support to pre-commit
- CI with github actions
- Release workflow with semantic release and github actions
- Flexible build system selection: Choose between popular build systems like
[Poetry](https://python-poetry.org/), [Flit](https://flit.pypa.io),
[meson-python](https://meson-python.readthedocs.io/en/latest/index.html),
[Setuptools](https://setuptools.pypa.io/en/latest/),
[PDM](https://pdm.fming.dev/), [Hatch](https://hatch.pypa.io),
[Maturin](https://pypi.org/project/maturin/0.8.2/),
[scikit-build-core](https://scikit-build-core.readthedocs.io/en/latest/) or
[setuptools + pybind11](https://pybind11.readthedocs.io/en/stable/) based on
your preference.
- The structure of the project can use the _src layout_ or _flat layout_. The
“src layout” moving the code that is intended to be importable into a
subdirectory. This subdirectory is typically named src. "Flat layout" refers
to organising a project's files in a folder or repository so that the various
configuration files and import packages are all in the top-level directory.
You can read about their differences at
https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/
- Finding common security problems in Python code using
[bandit](https://bandit.readthedocs.io/en/latest/)
- Offers the option to use [pydocstyle](http://www.pydocstyle.org/en/stable/)
for checking compliance with Python documentation conventions.
- Finds unused code in Python programs using
[vulture](https://github.com/jendrikseipp/vulture).
- To automatically detect overly complex code based on cyclomatic complexity,
the template gives you the option to use the
[McCabe](https://github.com/PyCQA/mccabe) library, which is included via
flake8.
- Provides the option to add initial files that allow you to run and orchestrate
containers using [Docker](https://docs.docker.com/) or
[Podman](https://podman.io/) in your project.

## Quickstart

Install the latest Cookieninja if you haven't installed it yet (this requires
Cookieninja 1.0.0):

```bash
pip install scicookie
```
pip install cookieninja

Go to a desired folder to create your new project, for example:

```bash
cd ~/dev/my-python-projects
```

Generate a Python package project:

```bash
scicookie
```
cookieninja https://github.com/cookieninja-generator/cookieninja

## Development

For testing your changes locally, you can run:

```bash
makim tests.lint
makim tests.unittest
makim tests.smoke
```

## Maintainers

- Anavelyz Perez - [@Anavelyz](https://github.com/Anavelyz)
- Ever Vino - [@EverVino](https://github.com/EverVino)
- Ivan Ogasawara - [@xmnlab](https://github.com/xmnlab)
- Saransh Chopra - [@Saransh-cpp](https://github.com/Saransh-cpp)
- Yurely Camacho - [@YurelyCamacho](https://github.com/YurelyCamacho)
- Ankit Kumar - [@ayeankit](https://github.com/ayeankit)
33 changes: 17 additions & 16 deletions mkdocs.yml → mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
site_name: SciCookie
site_description: Documentation for SciCookie
site_author: OpenScienceLabs Team
site_url: https://osl-incubator.github.io/scicookie
site_dir: ./build/
docs_dir: ./docs/

repo_url: https://github.com/osl-incubator/scicookie
repo_name: osl-incubator/scicookie
edit_uri: ./edit/main/docs

nav:
- Home: "index.md"
- Guide: "guide.md"
- Contributing: "contributing.md"

theme:
name: material
features:
Expand All @@ -19,15 +35,7 @@ theme:
text: Lato
icon:
repo: fontawesome/brands/github

site_name: SciCookie
site_description: Documentation for SciCookie
site_author: OpenScienceLabs Team
site_url: https://osl-incubator.github.io/scicookie

repo_url: https://github.com/osl-incubator/scicookie
repo_name: osl-incubator/scicookie
edit_uri: ./edit/main/docs
logo: images/logo.png

# strict: true

Expand Down Expand Up @@ -56,10 +64,3 @@ markdown_extensions:
- toc:
permalink: "¤" # Adds a clickable permalink to each section heading
toc_depth: 4

docs_dir: docs

nav:
- Home: "index.md"
- Guide: "guide.md"
- Contributing: "contributing.md"
2 changes: 1 addition & 1 deletion src/scicookie/{{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% if is_open_source -%}

- Free software: {{ cookiecutter.project_license }}
- Software License: {{ cookiecutter.project_license }}
{%- endif %}
- Documentation: {{ cookiecutter.documentation_url }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ theme:
- search.suggest
icon:
repo: fontawesome/brands/github
logo: /images/logo.png
favicon: /images/favicon.png
# note: the path should be investigate a bit more
logo: images/logo.png
favicon: images/favicon.png
palette:
scheme: slate
primary: white
Expand Down

0 comments on commit fdff49e

Please sign in to comment.