Skip to content

Commit fef2ca1

Browse files
authored
PYSCAN-59 Remove temporarily the For developers section of the documentation (#56)
1 parent 4b6d386 commit fef2ca1

File tree

2 files changed

+84
-85
lines changed

2 files changed

+84
-85
lines changed

CONTRIBUTING.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# For developers
2+
3+
## Prerequisites
4+
5+
- Python 3.12
6+
- [pipx](https://github.com/pypa/pipx)
7+
8+
## Install poetry
9+
10+
Install poetry with `pipx install poetry`
11+
12+
# Run the main script
13+
14+
Run `python src/pysonar`
15+
16+
# Run the tests
17+
18+
Run `poetry install` to install the dependencies. By default, the dependencies are installed from the Jfrog private repository.
19+
20+
To configure your credentials for Jfrog, go to your Jfrog user profile, and generate an identity token. Then set the following two environment variables:
21+
```shell
22+
poetry config http-basic.jfrog-server <username> <password>
23+
```
24+
Where `<username>` is your Jfrog username and `<password>` is the identity token you generated.
25+
26+
If you wish to install the dependencies from the public PyPI repository, remove the following source from `pyproject.toml`:
27+
```toml
28+
[[tool.poetry.source]]
29+
name = 'jfrog-server'
30+
url = 'https://repox.jfrog.io/artifactory/api/pypi/sonarsource-pypi/simple'
31+
```
32+
33+
## Run the tests only
34+
35+
Run `poetry run pytest test/`
36+
37+
## Run the tests with coverage and results displayed in the terminal
38+
39+
Run `poetry run pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --cov-branch tests`
40+
41+
## Run the tests with coverage and store the result in an xml file
42+
43+
Run `poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests`
44+
45+
# Build the package
46+
47+
Run `poetry build` to create the package.
48+
The binaries will be located in the `dist` directory at the root level of the project.
49+
50+
# Publish the script
51+
52+
Create a GitHub release.
53+
54+
# Update the package version
55+
56+
To update the version use the Poetry command:
57+
58+
```
59+
poetry version "X.Y.Z"
60+
```
61+
or
62+
```shell
63+
poetry version patch
64+
```
65+
For more options on the version update see [the Poetry documentation](https://python-poetry.org/docs/cli/#version)
66+
67+
# Tooling
68+
## Formatting
69+
70+
Run `poetry run black src/ tests/ --check` to run the check the formatting on all files.
71+
To automatically apply formatting, run `poetry run black src/ tests/`.
72+
73+
## Type checking
74+
75+
Run `poetry run mypy src/ tests/ --ignore-missing-imports` to execute the type checking on all files.
76+
77+
## License header
78+
79+
Before pushing, please check if all files have a license header.
80+
If not all files have a license header please execute:
81+
```
82+
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d src/
83+
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d tests/
84+
```

README.md

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -132,91 +132,6 @@ $ pysonar
132132

133133
See the __SonarScanner__ [documentation](https://docs.sonarsource.com/sonarqube/9.9/analyzing-source-code/scanners/sonarscanner/) for more information.
134134

135-
# For developers
136-
137-
## Prerequisites
138-
139-
- Python 3.12
140-
- [pipx](https://github.com/pypa/pipx)
141-
142-
## Install poetry
143-
144-
Install poetry with `pipx install poetry`
145-
146-
# Run the main script
147-
148-
Run `python src/pysonar`
149-
150-
# Run the tests
151-
152-
Run `poetry install` to install the dependencies. By default, the dependencies are installed from the Jfrog private repository.
153-
154-
To configure your credentials for Jfrog, go to your Jfrog user profile, and generate an identity token. Then set the following two environment variables:
155-
```shell
156-
poetry config http-basic.jfrog-server <username> <password>
157-
```
158-
Where `<username>` is your Jfrog username and `<password>` is the identity token you generated.
159-
160-
If you wish to install the dependencies from the public PyPI repository, remove the following source from `pyproject.toml`:
161-
```toml
162-
[[tool.poetry.source]]
163-
name = 'jfrog-server'
164-
url = 'https://repox.jfrog.io/artifactory/api/pypi/sonarsource-pypi/simple'
165-
```
166-
167-
## Run the tests only
168-
169-
Run `poetry run pytest test/`
170-
171-
## Run the tests with coverage and results displayed in the terminal
172-
173-
Run `poetry run pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --cov-branch tests`
174-
175-
## Run the tests with coverage and store the result in an xml file
176-
177-
Run `poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests`
178-
179-
# Build the package
180-
181-
Run `poetry build` to create the package.
182-
The binaries will be located in the `dist` directory at the root level of the project.
183-
184-
# Publish the script
185-
186-
Create a GitHub release.
187-
188-
# Update the package version
189-
190-
To update the version use the Poetry command:
191-
192-
```
193-
poetry version "X.Y.Z"
194-
```
195-
or
196-
```shell
197-
poetry version patch
198-
```
199-
For more options on the version update see [the Poetry documentation](https://python-poetry.org/docs/cli/#version)
200-
201-
# Tooling
202-
## Formatting
203-
204-
Run `poetry run black src/ tests/ --check` to run the check the formatting on all files.
205-
To automatically apply formatting, run `poetry run black src/ tests/`.
206-
207-
## Type checking
208-
209-
Run `poetry run mypy src/ tests/ --ignore-missing-imports` to execute the type checking on all files.
210-
211-
## License header
212-
213-
Before pushing, please check if all files have a license header.
214-
If not all files have a license header please execute:
215-
```
216-
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d src/
217-
poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d tests/
218-
```
219-
220135
# Installation from testPyPI
221136

222137
To install the latest pre-released version of Sonar Scanner Python. Execute the following command:

0 commit comments

Comments
 (0)