From 933d3a389b88f0b366afb34adc15c96b280e388a Mon Sep 17 00:00:00 2001 From: OrbisK <37191683+OrbisK@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:31:11 +0200 Subject: [PATCH] Refactor --- .github/workflows/test.yml | 4 +-- README.md | 60 ++------------------------------------ pyproject.toml | 2 +- setup.cfg | 2 +- 4 files changed, 6 insertions(+), 62 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3ffa3e..52a0bc5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: push: - branches: [ "feature/test-ci" ] + branches: [ "main" ] jobs: build-and-publish: @@ -22,7 +22,7 @@ jobs: run: | python -m pip install -r requirements.txt - name: Python Semantic Release - env: # Or as an environment variable + env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config --global user.email "info@singular-it.de" diff --git a/README.md b/README.md index b0d67aa..d58c0fa 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,6 @@ -## repository for pylint configurations and plugins - -Extensions in pylint are not implemented so as a workaround the extensions are implemented as pylint plugins. - -The following extensions exists in this repo: - -1. pylint_sit (pylint extension) -2. pylint_sit_django (pylint extension django) - -Every extension has its own directory with the following subdirectories and files: - -- `src` Directory -- an extension file inside `src`, for example ``src/pylint_sit.py`` -- a virtual environment, we are using ``venv`` -- a requirements file: ``requirements.txt`` -- a `README.md` as long description for the extension -- a `LICENSE` for the extension -- a `setup.cfg` for the extension -- a `setup.py` for the extension - -The ``dist`` directory will automatically be created. - -### Create a new extension - -We created an example directory ``example_extension`` with all its necessary files. -1. copy ``example_extension`` as a new extension and name it correctly. -2. ``cd`` into it and create a virtual environment: `virtualenv venv` -3. Install the packages from ``requirements.txt``: `pip install -r requirements.txt` -4. Rename ``src/example_extension.py`` and modify it to your needs. -5. Run ``python -m build``. A `dist` directory will be created with your packaged extension -7. Verify extension reading the paragraph **Verify extension** - - -### Update existing extension - -- Update the extension .py file to your needs -- Update the ``setup.cfg`` file: - - increase build version - - optional: update ``install_requires`` - - optional: update ``README.md`` - -### Verify extension -1. Install it locally: - - ``cd`` into extension root directory - - Run ``pip install -e .`` -2. Create an Error test file: - - Create an example file `test.py` and insert a failure in that file you want to check. -3. Run ``pylint test.py --load-plugins `` - -### Build a package extension - -- Create a new ``.wheel`` and ``.tar.gz`` - - ``cd`` into the root directory of the extension and create a virtual environment: `virtualenv venv` - - Install the packages from ``requirements.txt``: `pip install -r requirements.txt` - - Rename ``src/example_extension.py`` and modify it to your needs. - - Run ``python -m build``. A `dist` directory will be created with your packaged extension -- Optional: Upload the extension to ``pypi`` - - Run ``twine upload dist/pylint_sit-*`` & username and password are required +# pylint_sit +TODO @Grayknife pls fix this ### Contribute TODO \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a7fea76..dc5c842 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [semantic-release] -version= "0.0.1" \ No newline at end of file +version= "0.0.0" diff --git a/setup.cfg b/setup.cfg index 6c2e0b1..055aa17 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,5 +31,5 @@ where = src version_variable=pyproject.toml:version upload_to_pypi=False upload_to_release=True -branch=feature/test-ci +branch=main version_source=tag \ No newline at end of file