-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies, sync project setup with Apify SDK
- Loading branch information
Showing
8 changed files
with
98 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,4 +123,3 @@ jobs: | |
run: gh release upload ${{ github.ref_name }} dist/* | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Development | ||
|
||
## Environment | ||
|
||
For local development, it is required to have Python 3.8 installed. | ||
|
||
It is recommended to set up a virtual environment while developing this package to isolate your development environment, | ||
however, due to the many varied ways Python can be installed and virtual environments can be set up, | ||
this is left up to the developers to do themselves. | ||
|
||
One recommended way is with the built-in `venv` module: | ||
|
||
```bash | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
``` | ||
|
||
To improve on the experience, you can use [pyenv](https://github.com/pyenv/pyenv) to have an environment with a pinned Python version, | ||
and [direnv](https://github.com/direnv/direnv) to automatically activate/deactivate the environment when you enter/exit the project folder. | ||
|
||
## Dependencies | ||
|
||
To install this package and its development dependencies, run `make install-dev` | ||
|
||
## Formatting | ||
|
||
We use `autopep8` and `isort` to automatically format the code to a common format. To run the formatting, just run `make format`. | ||
|
||
## Linting, type-checking and unit testing | ||
|
||
We use `flake8` for linting, `mypy` for type checking and `pytest` for unit testing. To run these tools, just run `make check-code`. | ||
|
||
## Documentation | ||
|
||
We use the [Google docstring format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) for documenting the code. | ||
We document every user-facing class or method, and enforce that using the flake8-docstrings library. | ||
|
||
The documentation is then rendered from the docstrings in the code, using `pydoc-markdown` and some heavy post-processing, | ||
and from Markdown documents in the `docs` folder in the `docs` branch, and then rendered using Docusaurus and published to GitHub pages. | ||
|
||
## Release process | ||
|
||
Publishing new versions to [PyPI](https://pypi.org/project/apify-client) happens automatically through GitHub Actions. | ||
|
||
On each commit to the `master` branch, a new beta release is published, taking the version number from `pyproject.toml` | ||
and automatically incrementing the beta version suffix by 1 from the last beta release published to PyPI. | ||
|
||
A stable version is published when a new release is created using GitHub Releases, again taking the version number from `pyproject.toml`. | ||
The built package assets are automatically uploaded to the GitHub release. | ||
|
||
If there is already a stable version with the same version number as in `pyproject.toml` published to PyPI, the publish process fails, | ||
so don't forget to update the version number before releasing a new version. | ||
The release process also fails when the released version is not described in `CHANGELOG.md`, | ||
so don't forget to describe the changes in the new version there. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters