Skip to content

Commit

Permalink
add logo update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
not-a-feature committed Mar 9, 2024
1 parent a1512aa commit 0ac40b9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 159 deletions.
156 changes: 11 additions & 145 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
```{todo} THIS IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
The document assumes you are using a source repository service that promotes a
contribution model similar to [GitHub's fork and pull request workflow].
While this is true for the majority of services (like GitHub, GitLab,
BitBucket), it might not be the case for private repositories (e.g., when
using Gerrit).
Also notice that the code examples might refer to GitHub URLs or the text
might use GitHub specific terminology (e.g., *Pull Request* instead of *Merge
Request*).
Please make sure to check the document having these assumptions in mind
and update things accordingly.
```

```{todo} Provide the correct links/replacements at the bottom of the document.
```

```{todo} You might want to have a look on [PyScaffold's contributor's guide],
especially if your project is open source. The text should be very similar to
this template, but there are a few extra contents that you might decide to
also include, like mentioning labels of your issue tracker or automated
releases.
```

# Contributing

Expand Down Expand Up @@ -68,13 +42,6 @@ by adding missing information and correcting mistakes.
This means that the docs are kept in the same repository as the project code, and
that any documentation update is done in the same way was a code contribution.

```{todo} Don't forget to mention which markup language you are using.
e.g., [reStructuredText] or [CommonMark] with [MyST] extensions.
```

```{todo} If your project is hosted on GitHub, you can also mention the following tip:
:::{tip}
Please notice that the [GitHub web interface] provides a quick way of
propose changes in `wd_fw_update`'s files. While this mechanism can
Expand All @@ -89,30 +56,17 @@ that any documentation update is done in the same way was a code contribution.
which changes have you made and what are the motivations behind them and
submit your proposal.
:::
```

When working on documentation changes in your local machine, you can
compile them using [tox] :
compile them using `make`.

```
tox -e docs
```
cd docs
pip install -r requirements.txt
and use Python's built-in web server for a preview in your web browser
(`http://localhost:8000`):

```
python3 -m http.server --directory 'docs/_build/html'
make html
```

## Code Contributions

```{todo} Please include a reference or explanation about the internals of the project.
An architecture description, design principles or at least a summary of the
main concepts will make it easy for potential contributors to get started
quickly.
```

### Submit an issue

Expand All @@ -124,17 +78,9 @@ This often provides additional considerations and avoids unnecessary work.

Before you start coding, we recommend creating an isolated [virtual environment]
to avoid any problems with your installed Python packages.
This can easily be done via either [virtualenv]:

```
virtualenv <PATH TO VENV>
source <PATH TO VENV>/bin/activate
```

or [Miniconda]:

```
conda create -n wd_fw_update python=3 six virtualenv pytest pytest-cov
conda create -n wd_fw_update python=3 six virtualenv
conda activate wd_fw_update
```

Expand All @@ -160,8 +106,6 @@ conda activate wd_fw_update

to be able to import the package under development in the Python REPL.

```{todo} if you are not using pre-commit, please remove the following item:
```

5. Install [pre-commit]:

Expand Down Expand Up @@ -197,16 +141,13 @@ conda activate wd_fw_update

to record your changes in [git].

```{todo} if you are not using pre-commit, please remove the following item:
```

Please make sure to see the validation messages from [pre-commit] and fix
any eventual issues.
This should automatically use [flake8]/[black] to check/fix the code style
in a way that is compatible with the project.

:::{important}
Don't forget to add unit tests and documentation in case your
Don't forget to add documentation in case your
contribution adds an additional feature and is not just a bugfix.

Moreover, writing a [descriptive commit message] is highly recommended.
Expand All @@ -219,16 +160,6 @@ conda activate wd_fw_update
to look for recurring communication patterns.
:::

5. Please check that your changes don't break any unit tests with:

```
tox
```

(after having installed [tox] with `pip install tox` or `pipx`).

You can also use [tox] to run several other pre-configured tasks in the
repository. Try `tox -av` to see a list of the available checks.

### Submit your contribution

Expand All @@ -241,76 +172,15 @@ conda activate wd_fw_update
2. Go to the web page of your fork and click "Create pull request"
to send your changes for review.

```{todo} if you are using GitHub, you can uncomment the following paragraph
Find more detailed information in [creating a PR]. You might also want to open
the PR as a draft first and mark it as ready for review after the feedbacks
from the continuous integration (CI) system or any required fixes.
```

### Troubleshooting

The following tips can be used when facing problems to build or test the
package:

1. Make sure to fetch all the tags from the upstream [repository].
The command `git describe --abbrev=0 --tags` should return the version you
are expecting. If you are trying to run CI scripts in a fork repository,
make sure to push all the tags.
You can also try to remove all the egg files or the complete egg folder, i.e.,
`.eggs`, as well as the `*.egg-info` folders in the `src` folder or
potentially in the root of your project.
Find more detailed information in [creating a PR]. You might also want to open
the PR as a draft first and mark it as ready for review after the feedbacks
from the continuous integration (CI) system or any required fixes.

2. Sometimes [tox] misses out when new dependencies are added, especially to
`setup.cfg` and `docs/requirements.txt`. If you find any problems with
missing dependencies when running a command with [tox], try to recreate the
`tox` environment using the `-r` flag. For example, instead of:

```
tox -e docs
```

Try running:

```
tox -r -e docs
```

3. Make sure to have a reliable [tox] installation that uses the correct
Python version (e.g., 3.7+). When in doubt you can run:

```
tox --version
# OR
which tox
```

If you have trouble and are seeing weird errors upon running [tox], you can
also try to create a dedicated [virtual environment] with a [tox] binary
freshly installed. For example:

```
virtualenv .venv
source .venv/bin/activate
.venv/bin/pip install tox
.venv/bin/tox -e all
```

4. [Pytest can drop you] in an interactive session in the case an error occurs.
In order to do that you need to pass a `--pdb` option (for example by
running `tox -- -k <NAME OF THE FALLING TEST> --pdb`).
You can also setup breakpoints manually instead of using the `--pdb` option.

## Maintainer tasks

### Releases

```{todo} This section assumes you are using PyPI to publicly release your package.
If instead you are using a different/private package index, please update
the instructions accordingly.
```

If you are part of the group of maintainers and have correct user permissions
on [PyPI], the following steps can be used to release a new version for
Expand Down Expand Up @@ -363,9 +233,5 @@ on [PyPI], the following steps can be used to release a new version for
[virtual environment]: https://realpython.com/python-virtual-environments-a-primer/
[virtualenv]: https://virtualenv.pypa.io/en/stable/


```{todo} Please review and change the following definitions:
```

[repository]: https://github.com/<USERNAME>/wd_fw_update
[issue tracker]: https://github.com/<USERNAME>/wd_fw_update/issues
[repository]: https://github.com/not_a_feature/wd_fw_update
[issue tracker]: https://github.com/not_a_feature/wd_fw_update/issues
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/wd_fw_update.svg)](https://anaconda.org/conda-forge/wd_fw_update)
[![Monthly Downloads](https://pepy.tech/badge/wd_fw_update/month)](https://pepy.tech/project/wd_fw_update)

# Western Digital SSD Firmware Update Tool
# wd_fw_update
<img alt="Western Digital SSD Firmware Update Tool" src=https://github.com/not-a-feature/wd_fw_update/raw/main/logo.png height=90>

This is a firmware update tool for Western Digital SSDs on Ubuntu / Linux Mint.
It provides a user-friendly interface to select the firmware version for the update process.
Expand Down
17 changes: 5 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# wd_fw_update
# Western Digital SSD Firmware Update Tool

Add a short description here!
<img alt="Western Digital SSD Firmware Update Tool" src=https://github.com/not-a-feature/wd_fw_update/raw/main/logo.png height=90>

This is a firmware update tool for Western Digital SSDs on Ubuntu / Linux Mint.
It provides a user-friendly interface to select the firmware version for the update process.

## Note

> This is the main page of your project's [Sphinx] documentation. It is
> formatted in [Markdown]. Add additional pages by creating md-files in
> `docs` or rst-files (formatted in [reStructuredText]) and adding links to
> them in the `Contents` section below.
>
> Please check [Sphinx] and [MyST] for more information
> about how to document your project and how to configure your preferences.
It uses the Western Digital API and the NVME toolbox `nvme-cli`.

## Contents

Expand Down
2 changes: 1 addition & 1 deletion docs/license.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# License

```{literalinclude} ../LICENSE.txt
```{literalinclude} ../LICENSE
:language: text
```
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0ac40b9

Please sign in to comment.