Commit d09cbd2b authored by Thomas Nadovich's avatar Thomas Nadovich 🌸
Browse files

changed executable name, updated readme

parent cc713466
Pipeline #16800 passed with stages
in 1 minute and 13 seconds
## [dev-1.0.6]
- set up repo to build an executable binary like burt-util
- un-specified package versions
- command is now objdict-generate, not objdict_generate
## [dev-1.0.5]
......
......@@ -13,40 +13,96 @@
### Quick Start
The following commands are all you need:
To install objdict-generate, go to the latest tag in GitLab, download the .deb
installer (inside "release-job" and install with the following command:
```shell-session
$ sudo apt-get install -y python3 python3-pip
$ sudo pip3 install git+https://git.barrett.com/burt/tools/objdict-generate.git
$ sudo dpkg -i objdict-generate*.deb
```
### Development Setup
This project is set up to be developed in a pipenv virtual environment using
python 3.9.5 Since this may be too recent of a version for older development
systems, we use
pyenv to provide it to pipenv. The application can be run locally from the
virtual environment, or 'frozen' into a single-file application using
pyinstaller. This one-file application can then be installed on other systems
by building a .deb installer file using make.
The build server builds the .deb slightly differently. The environment in which
make is run is not a pipenv virtual environment, but rather a docker container
defined in the burt-ci-docker-image project. This docker container is set up so
that its internal global python setup is the same as the one defined by the
pipenv Pipfile. It is not defined by the Pipfile though, and if the Pipfile is
changed, the docker image should be updated as well to keep local & server
builds roughly compatible.
Development can be done in one of two ways
#### Recomended: Pipenv
ipenv is a tool for setting up your python development environment.
First download the repository:
```shell-session
$ git clone https://git.barrett.com/burt/tools/objdict-generate.git && cd objdict-generate
```
To install the dependencies
```shell-session
$ sudo apt-get install -y python3 python3-pip
make setup
```
Now we can run the program in this repo without installing on one of two ways
```shell-session
$ pipenv run objdict-generate
```
or
```
$ pipenv shell
(pipenv) $ objdict-generate
```
All python requirements are managed by the setup.py file and the application can
be installed by running:
You may be prompted to install python3.9 if you do not already have it
installed. Indicate yes when asked.
This allows for faster development because you don't need to do a system wide
install every time you make a change.
#### Advanced: Install after changes
First download the repository:
```shell-session
$ sudo ./setup.py install
$ git clone https://git.barrett.com/burt/tools/objdict-generate.git && cd objdict-generate
```
To verified it is installed properly you can now run the unit tests:
To install the system dependencies
```shell-session
$ sudo ./setup.py test
$ make setup
```
_Note_: Currently _virtualenv_ usage is broken.
The project should be built inside the pipenv virtual environment to ensure
that it is built with the dependencies specified in the Pipfile. To do so run:
```shell-session
$ pipenv install --dev
$ pipenv run make install
```
You may be prompted to install python3.9 if you do not already have it
installed. Indicate yes when asked.
This sets up the virtual environment as a development environment, builds the
package inside the virtual environment, and then installs the built debian
on the system. This method is preferable for testing, as it installs burt-util
at the system level.
## Dependencies
......@@ -60,7 +116,7 @@ _Note_: Currently _virtualenv_ usage is broken.
Reading an object dictionary yaml file and outputting sources:
```bash
$ objdict_generate project/uss-enterprise/uss_enterprise_od.yaml -o project/uss-enterprise/src -d docs -m projects/mainboard/src
$ objdict-generate project/uss-enterprise/uss_enterprise_od.yaml -o project/uss-enterprise/src -d docs -m projects/mainboard/src
```
The above command will read in the yaml file `project/uss-enterprise/uss_enterprise_od.yaml` and in the output directory (`projects/uss-enterprise/sources`) create two files:
......@@ -83,7 +139,7 @@ dictionary should be placed:
Get usage instructions and help:
```bash
$ objdict_generate --help
$ objdict-generate --help
```
## Example yaml file
......
......@@ -35,6 +35,6 @@ setup(
zip_safe=False,
entry_points={
"console_scripts": [
"objdict_generate=objdict_generate.scripts.objdict_generate:cli",
"objdict-generate=objdict_generate.scripts.objdict_generate:cli",
]},
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment