Skip to content

Commit

Permalink
docs(devs): development instruction workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsanima committed Aug 13, 2021
1 parent 6ee2d6b commit 7dfec4c
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
89 changes: 89 additions & 0 deletions docs/source/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Workflow `release`

Instruction steps how to implement the release and documentation.

## Add new module

Write a new module to an existing package. Commit changes based on
`conventional-commits` messages.

## Add documentation

Write `shpinx` documentation for this module in a `.py` file and in the
`docs/source` folder.

## Add changelog

First run this command:

```shell
standard-version release-test
```

If everything is ok run this command:

```shell
standard-version --skip.commit --skip.tag
```

After run this command you will create a new version in the `package.json` file,
bump it in `__init __.py` and you will automatically create `CHANGELOG.md`
based on commit messages.

## Build documentation

Then build the documentation by typing this command:

```shell
sudo python3 setup.py install build_sphinx
```

By executing this command you will create `html` documentation in `docs/html`.

## Commit changes

Now you just need to execute this command:

```shell
standard-version --skip.bump --skip.changelog --commit-all --sign
```

After executing this command all documentation files and other changed files
will be committed and a new tag with the current version will be created.
Commit `package.json`,`__init__.py` and `CHANGELOG.md` with signed GPG keys.
Create tagging release and signed approval with GPG keys.

## Build Pacage

We’re almost done. We just need to put commands in to terminal and which will
create an installable Python Package from your `code` and send it to `PyPi`.

Build Setpu:

```shell
python3 setup.py sdist bdist_wheel
```

It created some new directories for us, such as `dist`, `build`
and `your_package.egg-info`.

Check the Build:

```shell
twine check dist/*
```

Send to Test PyPi:

```shell
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

Go to [test.pypi.org](https://test.pypi.org) and check if everything is ok,
if yes, we can finally send our package to [PyPi](https://pypi.org/).

Finally Send To PyPi:

```shell
twine upload dist/*
```
4 changes: 4 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ This is all modules include of this package.
module_tools
```

## Devs

```{eval-rst}
.. toctree::
:maxdepth: 2
:caption: Development
development
changelog
```

0 comments on commit 7dfec4c

Please sign in to comment.