Giter Club home page Giter Club logo

pybamm.org's Introduction

pybamm.org

Netlify Links pre-commit.ci Gitpod

Source code for pybamm.org, released under the BSD-3-Clause License.

Steps to contribute

Tip

Gitpod can also be used to contribute to the website. To do so, click on the Gitpod button above to open the repository in an online text editor (Visual Studio Code). Once the workspace is ready, you can follow a subset of the steps below to contribute to the website. You can learn more about Gitpod here: https://www.gitpod.io/docs/introduction/getting-started

  1. Fork this repository
  2. Install the extended version of Hugo from https://gohugo.io/installation/ and dart-sass and add them to your PATH
  3. Clone your forked repository and add the theme repository as a submodule, from https://github.com/scientific-python/scientific-python-hugo-theme. You may update the submodule and pull the latest changes with
git submodule update --init --recursive

or clone directly with

git clone --recurse-submodules https://github.com/pybamm-team/pybamm.org.git
  1. Create pages and run the server locally with
nox

or alternatively

nox -s html
nox -s serve

In development mode, run the server with

nox -s html
nox -s serve-dev

You may use nox -s clean to clean up build artefacts.

  1. Before committing your changes, install pre-commit, update the hooks, and run with
pip install pre-commit
pre-commit install

to ensure that there are no style errors before committing your changes. The current hooks provide support for checking spelling errors and typos, Markdown style, and common file-based issues.

Rather than just the files changed due to a commit, you may run the hooks on all files using the pre-commit run --all-files command.

  1. To generate the teams page, run
nox -s teams

It is recommended to verify the changes to the teams page before committing. The teams page is generated from the files in static/teams/ and the script scripts/get_teams_info.py and the output is displayed in content/teams.md.

Caution

The nox -s teams command will overwrite the files in the static/teams/ directory.

Alternatively, the teams page can be generated via a pull request by manually triggering the teams.yml workflow.

  1. To add a news item, create a new .md file in content/news/YYYY/MM/DD/ with the following YAML frontmatter
---
title: "Title of the news item"
date: YYYY-MM-DD
summary: "Summary of the news item"
---

You may use the toc: true parameter to add a table of contents to the news item. This works on all pages, not just news items. The shortcutDepth: X parameter can be used to limit the depth of the headings referenced in the page.

The newsHeader parameter will automatically be set to the title: of the latest news item and will show up on the homepage of the website.

Deployment

The website is built using the Hugo static site generator and is hosted on Netlify.

Style guidelines (shortcodes, content, etc.)

Some shortcodes for adding general-purpose buttons and links are available in layouts/shortcodes/ and can be used as follows:

{{< name-of-shortcode shortcode-parameters >}}
  1. To render external links from GitHub repositories or any API endpoint(s) that can return base64-encoded Markdown content, the external-content shortcode may be used, as follows:
{{< external-content "https://api.github.com/repos/example-org/example-repo/contents/path/to/file.md" >}}
  1. To include an optional table of contents at the top of a page, set toc: true in the YAML front matter of a page. The table of contents will be generated from the headings referenced in the page.

  2. To change how things look, edit assets/css/overrides.css or add any additional CSS file to the assets/css/ directory. These files are loaded after the theme-specific CSS files, so they can be used to override any styles set by the theme.

For more information, please refer to the Hugo documentation and the Scientific Python Hugo theme guides.

Analytics

The website uses a privacy-friendly analytics service called Plausible. The analytics data is available for authorised users at https://plausible.io/pybamm.org.

pybamm.org's People

Contributors

agriyakhetarpal avatar arjxn-py avatar bashamega avatar brosaplanella avatar dependabot[bot] avatar github-actions[bot] avatar julian-evers avatar martinjrobins avatar pre-commit-ci[bot] avatar saransh-cpp avatar valentinsulzer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pybamm.org's Issues

Blog posts

Add a few recent blog posts:

  • Feb 2023: launch Ionworks
  • March 2023: Hackathon
  • May 2023: new release + new release schedule

Dark Mode Theme

Is your feature request related to a problem? Please describe.
No, my feature request is not related to a problem. My idea is to add a dark mode theme similar to the one in the docs

I would like to work on this

Setup pre-commit hooks

Some tasks

  • For linting Markdown and setting line length
  • Ruff and Black for Python scripts if needed
  • Codespell to detect grammatical errors and typos

404 page not working

Hello:)
I have noticed that with the new update the 404 page broke.
I would like to work on it

Removing the all-contributors note

Hello:)
I noticed that in the teams page their is a not stating that we use a bot for the contributions.
image
But I saw the code and we are auto generating it from the api. I think we should remove the note because it is not necessary.

PyBaMM News pages

  • Older pages from Blogspot (2020, 2021)
  • Check if links are mapping correctly

Redesigning the Publications Page

Hello :)
While crawling through the website I found the Publications page.
The contributions parts look horrible:
image
I am thinking of turning it into a grid design.
Similar to the one in the teams page.

Github link

Right now you have to scroll to the footer or navigate a long way to get from the homepage. It would be good to have a link to the repo right at the top and maybe also add the github star badge (https://buttons.github.io/)

Summary issue: pages and embeds for `pybamm.org`

A placeholder issue for keeping track of complete and pending tasks, and summarising the repository in its current state

New pages to add

Community pages

  • #15
  • #17
  • Grid of maintainers and core contributors to pybamm.org (#31 and #34)
  • PyBaMM Wiki page and sub-pages, with links to the PyBaMM repository and pybamm-team/.github#2

Showcase

Other packages and projects that build upon PyBaMM (liionpack, pybamm-param, BattBot) – not planned

Pages and links already on https://www.pybamm.org to be replicated

  • Training
  • #9
  • Getting started (installation and supporting material)
  • Contact
  • Examples (set up as a link to PyBaMM repository examples – can be populated with case studies
  • Documentation is currently hyperlinked to https://pybamm.readthedocs.io and needs to be set to https://docs.pybamm.org
  • Publications and citing PyBaMM

Repository infrastructure

  • #7
  • pre-commit hooks: #4
  • Developer and contributor documentation for setting up locally and links to relevant material
  • Link checker: #3

Miscellaneous

Example gallery from slides on YouTube – not planned and not needed

Add a 404 page

For now, the page should link down to a separate file that informs the user of an invalid link when rendered

Main branch not protected

Just noticed the main branch is not protected. Unless this breaks our pipeline, I think it would be good to add some protection rules. Happy to give @agriyakhetarpal admin rights on this repo to sort it out, if that works better.

Switch to `nox` as a task runner

Switching to nox (https://nox.thea.codes/en/stable/) would provide a more Pythonic interface to the current task runner through the use of a noxfile, which can call relevant Hugo commands in a subprocess and stream the output.

The targets in the Makefile can then be converted into corresponding nox sessions and invoked with a very similar command-line interface (say, nox -s teams instead of make teams). It is also (slightly) easier to install and use Python on a Windows system rather than make, iirc.

Incorrect ionworks link

You can get help by posting questions on the [PyBaMM Slack channels](https://pybamm.org/slack/) or preferably in [GitHub discussions](https://github.com/pybamm-team/PyBaMM/discussions). You can also get paid support from [Ionworks](https://ion-works.com/services).

https://github.com/pybamm-team/pybamm.org/actions/runs/7509871896

Just noticed and wanted to highlight that this link fails in the scheduled tests, @tinosulzer or @rtimms please feel free to change as you wish

Add summaries in frontmatter for all pages

The summary: section in the YAML frontmatter shows up in search engines as a brief description of the page. Most pages don't have this currently, which means that the same text gets displayed.

Every separate page should have its own summary, and other fields such as dates or etc. that are permitted by Hugo parameters or YAML itself.

Notebook links not working

Describe the bug
The links to notebooks in https://pybamm.org/learn/ do not work.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.