Skip to content

Commit 932b5fc

Browse files
authored
Merge pull request #151 from britive/develop
v1.8.0rc1
2 parents 8c09c14 + d41917d commit 932b5fc

30 files changed

+1558
-992
lines changed

CHANGELOG.md

Lines changed: 733 additions & 349 deletions
Large diffs are not rendered by default.
Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
1+
# CONTRIBUTING
2+
3+
> __TODO:__ _add development/convention sections._
4+
15
## Local Install
26

3-
~~~
7+
```sh
48
pip install --editable .
5-
~~~
9+
```
610

711
## Build
812

9-
* Update version in `setup.cfg` and `src/pybritive/__init__.py` (TODO: create some pre-build script that will update one of these automatically)
13+
* Update version in `src/pybritive/__init__.py`
1014
* Push code to GitHub
1115
* Cut a new PR and merge when appropriate
1216
* Run below commands
1317

14-
15-
~~~
18+
```sh
1619
python -m pip install --upgrade build
1720
python -m build
18-
~~~
21+
```
1922

2023
* Cut a new release in GitHub with the version tag
2124
* Add the assets from `dist` directory to the release
2225

2326
## Github Actions
27+
2428
There are 2 Github Actions in play that publish to PyPI.
2529

2630
1. Trigger off of a push to the `develop` branch. Will deploy to test PyPI.
2731
2. Trigger off of a new release being published. Will deploy to real PyPI.
2832

2933
## Testing
34+
3035
It is generally advisable to set environment variable `PYBRITIVE_HOME_DIR` to some temp location if you
3136
will be performing the full suite of tests. This will ensure that no changes are made to your existing
3237
configuration or credentials.
@@ -35,55 +40,65 @@ Environment variables that should be set for testing include the following.
3540

3641
* `PYBRITIVE_HOME_DIR` - a path to a home directory where `.britive` directory will be created
3742
* `PYBRITIVE_TEST_TENANT` - the tenant name to be used for testing purposes
38-
* `PYBRITIVE_NPM_IMPORT_PROFILE_ALIAS_VALUE` - the IDs of a profile that can be used to test the import process. This should be in format `"appid/envid/profileid/appname"`.
43+
* `PYBRITIVE_NPM_IMPORT_PROFILE_ALIAS_VALUE` - the IDs of a profile that can be used to test the import process. This
44+
should be in format `"appid/envid/profileid/appname"`
3945
* `PYBRITIVE_ENCRYPTED_CREDENTIAL_PASSPHRASE` - the password for encrypted file credential storage
40-
* `PYBRITIVE_PREPARE_DOT_BRITIVE` - set to true if you want to have the `.britive` directory cleared before starting the tests
41-
* `BRITIVE_API_TOKEN` - set if you want to avoid an interactive login process - the interactive login process will need to be tested separately
46+
* `PYBRITIVE_PREPARE_DOT_BRITIVE` - set to true if you want to have the `.britive` directory cleared before starting the
47+
tests
48+
* `BRITIVE_API_TOKEN` - set if you want to avoid an interactive login process - the interactive login process will need
49+
to be tested separately
4250

43-
Create `./testing-variables.txt` and load what you need so you can easily re-create the needed variables. This file is in `.gitignore`.
51+
Create `./testing-variables.txt` and load what you need so you can easily re-create the needed variables. This file is
52+
in `.gitignore`.
4453

4554
Package the code locally with `pip install -e .` so pytest can run against the python package.
46-
Then `pytest tests/ -vvv` to perform the testing.
55+
Then `pytest tests/ -vvv` to perform the testing.
56+
57+
The identity used for testing will require access to at least one profile to test `checkout` and `checkin`.
58+
Additionally, the identity will need access to 2 secrets:
4759

48-
The identity used for testing will require access to at least one profile to test `checkout` and `checkin`.
49-
Additionally, the identity will need access to 2 secrets
50-
* one standard secret with path `/pybritive-test-standard` to test `view` - the value of the secret should be generic note with note of `test`
51-
* one file secret with path `/pybritive-test-file` to test `download` - the filename should be `pybritive-test-secret-file.txt` and contain contents of `test`
60+
* one standard secret with path `/pybritive-test-standard` to test `view` - the value of the secret should be generic
61+
note with note of `test`
62+
* one file secret with path `/pybritive-test-file` to test `download` - the filename should be
63+
`pybritive-test-secret-file.txt` and contain contents of `test`
5264

5365
## Docs
5466

55-
https://docs.readthedocs.io/en/stable/intro/getting-started-with-mkdocs.html
67+
[mkdocs](https://docs.readthedocs.io/en/stable/intro/getting-started-with-mkdocs.html)
5668

5769
To set up the doc infrastructure the first time run the following from the base directory
5870

59-
~~~
71+
```sh
6072
pip install mkdocs
6173
mkdocs new .
62-
~~~
74+
```
6375

6476
For real time local updates in HTML...
65-
~~~
77+
78+
```sh
6679
mkdocs serve
67-
~~~
80+
```
6881

6982
To build...
7083

71-
~~~
84+
```sh
7285
mkdocs build
73-
~~~
86+
```
7487

7588
This will create a new directory `site`.
7689

7790
As we are using source code control we have added `site/` to `.gitignore` so you will have to build the docs locally.
7891

79-
We will ultimately deploy via GitHub pages. But you can also copy everything in `site/` and host as a static website anywhere you want.
92+
We will ultimately deploy via GitHub pages. But you can also copy everything in `site/` and host as a static website
93+
anywhere you want.
8094

8195
To deploy to GitHub project pages....
8296

83-
~~~
97+
```sh
8498
# checkout whichever branch is needed (main or develop most likely)
8599
mkdocs gh-deploy
86-
~~~
100+
```
87101

88-
This will build the docs by performing the actions of `mkdocs build` and shove those built docs into the `gh-pages` branch of the repo.
89-
`gh-pages` is auto-linked to `https://britive.github.io/python-cli/` and will update that site in near real time.
102+
This will build the docs by performing the actions of `mkdocs build` and shove those built docs into the `gh-pages`
103+
branch of the repo. `gh-pages` is auto-linked to `https://britive.github.io/python-cli/` and will update that site in
104+
near real time.

README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,41 @@ PyBritive is intended to be used as a CLI application for communicating with the
44

55
## Installation
66

7-
`pybritive` will be installed via Python `pip`.
7+
`pybritive` will be installed via the Python package installer, `pip`.
88

9-
~~~bash
9+
```sh
1010
pip install pybritive
11-
~~~
11+
```
1212

13-
Or you can always pull the latest version directly from GitHub using one of the following commands.
13+
> _NOTE: The end user is free to install the CLI into a virtual environment or in the global scope,
14+
> _so it is available everywhere._
1415
15-
~~~
16-
pip install $(curl -s https://api.github.com/repos/britive/python-cli/releases/latest | jq -r '.assets[] | select(.content_type == "application/x-gzip") | .browser_download_url')
16+
## Alternate Installation
1717

18-
OR
18+
You can always pull the latest version directly from GitHub using one of the following commands:
1919

20-
pip install $(curl -s https://api.github.com/repos/britive/python-cli/releases/latest | grep "browser_download_url.*.tar.gz" | cut -d : -f 2,3 | tr -d \")
21-
~~~
20+
```sh
21+
pip install $(curl -s https://api.github.com/repos/britive/python-cli/releases/latest \
22+
| jq -r '.assets[] | select(.content_type == "application/x-gzip") | .browser_download_url')
23+
```
2224

23-
The end user is free to install the CLI into a virtual environment or in the global scope, so it is available
24-
everywhere.
25+
Or
2526

27+
```sh
28+
pip install $(curl -s https://api.github.com/repos/britive/python-cli/releases/latest \
29+
| grep "browser_download_url.*.tar.gz" | cut -d : -f 2,3 | tr -d \")
30+
```
2631

2732
## Documentation
2833

29-
https://britive.github.io/python-cli/
30-
34+
* [Britive CLI](https://britive.github.io/python-cli)
3135

3236
## Community Projects
3337

34-
Note: Britive, Inc. does not provide support for community projects. Community projects are also not considered when ensuring backwards compatibility for releases. The list below is provided as-is and use of these projects is subject to the licensing/restrictions of each individual project.
35-
36-
* `vim-britive`: https://github.com/pbnj/vim-britive
38+
> _NOTE:_
39+
> _Britive, Inc. does not provide support for community projects._
40+
> _Community projects are also not considered when ensuring backwards compatibility for releases._
41+
> _The list below is provided as-is and use of these projects is subject to the licensing/restrictions of each_
42+
> _individual project._
3743
44+
* [`vim-britive`](https://github.com/pbnj/vim-britive)

0 commit comments

Comments
 (0)