Skip to content

Commit

Permalink
Release 0.1.0
Browse files Browse the repository at this point in the history
Added
-----

- New command `odood venv pip` that allows to run pip from current venv.
- New command `odood venv npm` that allows to run npm from current venv.
- New command `odood venv python` that allows to run python from current venv.
- New command `odood venv ipython` that allows to run ipython from current venv.
- Added new option `--ual` to command `odood repo add` that allows to automatically
  update list of addons when repository was added.
- New command `odood venv run` that allows to run any command from current venv.
- New command `odood repo run-pre-commit` to run [pre-commit](https://pre-commit.com/) for the repo.

Changed
-------

- Database restoration reimplemented in D,
  thus now it restores db dump and filestore in parallel.
  • Loading branch information
katyukha committed Aug 15, 2024
2 parents c3445c1 + 8f7ad03 commit a393101
Show file tree
Hide file tree
Showing 76 changed files with 1,969 additions and 644 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v*.*.*-RC*'

env:
ODOOD_DLANG_COMPILER: ldc-1.34.0
ODOOD_DLANG_COMPILER: ldc-1.39.0

jobs:
build-ubuntu-20_04:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-os-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- '*'
env:
ODOOD_DLANG_COMPILER: ldc-1.34.0
ODOOD_DLANG_COMPILER: ldc-1.39.0

# In this test, we build Odood on Ubuntu 20.04 and then try to run
# produced binary on different distros and versions
Expand Down Expand Up @@ -42,12 +42,14 @@ jobs:
run-integration-tests:
name: Run integration tests
strategy:
fail-fast: false
matrix:
image:
- "debian:bullseye"
- "ubuntu:20.04"
- "ubuntu:22.04"
- "ubuntu:23.04"
- "ubuntu:24.04"
runs-on: ubuntu-22.04
needs:
- compile-ubuntu-20_04
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
name: Tests
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
dc: [dmd-2.104.2, ldc-1.34.0]
os: [ubuntu-22.04, ubuntu-20.04, ubuntu-24.04]
dc: [dmd-2.109.1, ldc-1.39.0]

runs-on: ${{ matrix.os }}
steps:
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## Release 0.1.0 (2024-08-15)

### Added

- New command `odood venv pip` that allows to run pip from current venv.
- New command `odood venv npm` that allows to run npm from current venv.
- New command `odood venv python` that allows to run python from current venv.
- New command `odood venv ipython` that allows to run ipython from current venv.
- Added new option `--ual` to command `odood repo add` that allows to automatically
update list of addons when repository was added.
- New command `odood venv run` that allows to run any command from current venv.
- New command `odood repo run-pre-commit` to run [pre-commit](https://pre-commit.com/) for the repo.


### Changed

- Database restoration reimplemented in D,
thus now it restores db dump and filestore in parallel.

---

## Release 0.0.15 (2023-10-30)

### Added
Expand Down
64 changes: 58 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,29 @@ Following features currently implemented:
- [ ] CI utils (versions, forwardports, etc)
- [ ] Postgres utils
- [ ] Doc utils
- [ ] Linters
- [x] Linters - use pre-commit and per-repo configurations, instead of directly running linters


## Installation (as Debian Package)

This is the recommended way to install Odood.

1. Download package for your os from [Releases](https://github.com/katyukha/Odood/releases)
2. Install downloaded debian package
3. Run `odood --help` to get info about available commands


## Installation (locally from source)

*Note*, that this way is mostly useful for development of Odood, and requires
significant RAM amount to build Odood. Better, download and install it as debian package.

If you want to install it locally from source, follow steps below:

0. Clone this repository and checkout in the repository root.
1. Install system dependencies for this project (you can check lists of depenencies [here](https://github.com/katyukha/Odood/tree/main/.ci/deps)).
2. Install [DLang compiler](https://dlang.org/download.html)
3. Build Odood
- Find the version of python you use (`python3 --version`)
- Run command `dub build -b release --override-config=pyd/pythonXY` where `X` is major version of python and `Y` is minor version of python.
For example, if you use Python 3.11, then command to build Odoo will look like `dub build -b release --override-config=pyd/python311`
- After build completed, there will be generated binary `odood` in `build` directory.
3. Build Odood with command `dub build -b release`. After build completed, there will be generated binary `odood` in `build` directory.
4. Link Odoo binary to bin directory:
- Assume that current working directory is Odood source code root.
- `mkdir -p ~/bin`
Expand All @@ -66,6 +67,57 @@ project with Odood is to run command `odood discover odoo-helper` somewhere insi
[odoo-helper](https://katyukha.gitlab.io/odoo-helper-scripts/) project.


## Quick start

Use following command to create new local odoo instance:

```bash
odood init -v 17 -i odoo-17.0 --db-user=odoo17 --db-password=odoo --http-port=17069 --create-db-user
```

This command will create new virtual environment for Odoo and install odoo there.
Also, this command will automatically create database user for this Odoo instance.

Next, change current working directory to directory where we installed Odoo:

```bash
cd odoo-17.0
```

After this, just run command:

```bash
odood browse
```

and it will automatically start Odoo and open it in browser.

Next, you can use following commands to manage server:

```bash
odood server start
odood server stop
odood server restart
odood server log
```

Next, let's create some test database with pre-installed CRM module
for this instance:

```bash
odood db create --demo my-test-database --install=crm
```

After this command, you will have created odoo database `my-test-database` with
already installed module `crm`.

Additionally you can manage odoo addons from commandline via command `odood addons`.
See help for this command for more info:

```bash
odood addons --help
```

## Level up your service quality

Level up your service quality with [Service Desk](https://crnd.pro/solutions/service-desk) / [ITSM](https://crnd.pro/itsm) solution by [CR&D](https://crnd.pro/).
Expand Down
2 changes: 2 additions & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ copyright "Copyright © 2022-2023, Dmytro Katyukha"
license "MPL-2.0"

dependency ":exception" version="*"
dependency ":tipy" version="*"
dependency ":utils" version="*"
dependency ":lib" version="*"
dependency ":cli" version="*"
subPackage "./subpackages/exception"
subPackage "./subpackages/tipy"
subPackage "./subpackages/utils"
subPackage "./subpackages/lib"
subPackage "./subpackages/cli"
Expand Down
21 changes: 9 additions & 12 deletions dub.selections.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{
"fileVersion": 1,
"versions": {
"bindbc-common": "~master",
"bindbc-loader": "1.1.3",
"bindbc-common": "0.1.6",
"bindbc-loader": "1.1.5",
"cachetools": "0.3.1",
"color": "0.0.9",
"colored": "0.0.31",
"commandr": "~master",
"commandr": {"version":"~master","repository":"git+https://github.com/katyukha/commandr.git"},
"dini": "2.0.0",
"dlibzip": "1.9.2",
"dpq": "0.11.6",
"dshould": "1.7.1",
"dyaml": "0.9.2",
"dshould": "1.7.2",
"dyaml": "0.10.0",
"east_asian_width": "1.1.0",
"prettyprint": "1.0.9",
"requests": "2.1.1",
"semver": "0.5.0",
"requests": "2.1.3",
"silly": "1.1.1",
"tabletool": "0.5.0",
"thepath": "1.0.0",
"thepath": "1.2.0",
"theprocess": "0.0.5",
"tinyendian": "0.2.0",
"unit-threaded": "2.1.7",
"zipper": "0.0.4-bindbc"
"unit-threaded": "2.1.9",
"zipper": "0.0.5"
}
}
4 changes: 2 additions & 2 deletions source/odood/app.d
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module odood.app;

import std.stdio;
import std.stdio: write;
import std.format: format;

import odood.exception: OdoodException;
import odood.cli.app;
import odood.cli.app: App;

version(OdoodUnittestIntegrationUT) {
import unit_threaded;
Expand Down
4 changes: 2 additions & 2 deletions subpackages/cli/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ copyright "Copyright © 2022-2023, Dmytro Katyukha"
license "MPL-2.0"
dependency "colored" version=">=0.0.31"
dependency "tabletool" version="~>0.5.0"
dependency "commandr" version="~master"
/*dependency "commandr" version=">=1.0.0"*/
/*dependency "commandr" path="../../../commandr"*/
/*dependency "commandr" repository="git+https://github.com/katyukha/commandr.git" version="~dev-fx"*/
dependency "commandr" repository="git+https://github.com/katyukha/commandr.git" version="~master"

dependency "odood:lib" path="../../"

Expand Down
21 changes: 9 additions & 12 deletions subpackages/cli/dub.selections.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{
"fileVersion": 1,
"versions": {
"bindbc-common": "~master",
"bindbc-loader": "1.1.3",
"bindbc-common": "0.1.6",
"bindbc-loader": "1.1.5",
"cachetools": "0.3.1",
"color": "0.0.9",
"colored": "0.0.31",
"commandr": "~master",
"commandr": {"version":"~master","repository":"git+https://github.com/katyukha/commandr.git"},
"dini": "2.0.0",
"dlibzip": "1.9.2",
"dpq": "0.11.6",
"dshould": "1.7.1",
"dyaml": "0.9.2",
"dshould": "1.7.2",
"dyaml": "0.10.0",
"east_asian_width": "1.1.0",
"odood": {"path":"../../"},
"prettyprint": "1.0.9",
"requests": "2.1.1",
"semver": "0.5.0",
"requests": "2.1.3",
"tabletool": "0.5.0",
"thepath": "1.0.0",
"thepath": "1.2.0",
"theprocess": "0.0.5",
"tinyendian": "0.2.0",
"unit-threaded": "2.1.7",
"zipper": "0.0.4-bindbc"
"unit-threaded": "2.1.9",
"zipper": "0.0.5"
}
}
18 changes: 10 additions & 8 deletions subpackages/cli/source/odood/cli/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private import odood.cli.core: OdoodProgram, OdoodCommand;
private import odood.cli.commands.init: CommandInit;
private import odood.cli.commands.server:
CommandServer, CommandServerStart, CommandServerStop, CommandServerRestart,
CommandServerBrowse;
CommandServerBrowse, CommandServerLogView;
private import odood.cli.commands.database: CommandDatabase, CommandDatabaseList;
private import odood.cli.commands.status: CommandStatus;
private import odood.cli.commands.addons:
Expand All @@ -23,10 +23,8 @@ private import odood.cli.commands.config: CommandConfig;
private import odood.cli.commands.test: CommandTest;
private import odood.cli.commands.venv: CommandVenv;
private import odood.cli.commands.discover: CommandDiscover;
private import odood.cli.commands.log: CommandLogView;
private import odood.cli.commands.script: CommandScript;
private import odood.cli.commands.psql: CommandPSQL;
private import odood.cli.commands.ci: CommandCi;
private import odood.cli.commands.info: CommandInfo;
private import odood.cli.commands.odoo: CommandOdoo;

Expand All @@ -40,28 +38,32 @@ class App: OdoodProgram {
this() {
super("odood", _version);
this.summary("Easily manage odoo installations.");
this.topicGroup("Main");
this.add(new CommandInit());
this.add(new CommandServer());
this.add(new CommandStatus());
this.add(new CommandDatabase());
this.add(new CommandAddons());
this.add(new CommandConfig());
this.add(new CommandTest());
this.add(new CommandRepository());
this.add(new CommandVenv());
this.add(new CommandDiscover());
this.add(new CommandLogView());
this.add(new CommandScript());
this.add(new CommandPSQL());
this.add(new CommandCi());
this.add(new CommandInfo());
this.add(new CommandOdoo());

// System
this.topicGroup("System");
this.add(new CommandConfig());
this.add(new CommandDiscover());
this.add(new CommandInfo());

// shortcuts
this.topicGroup("Shortcuts");
this.add(new CommandServerStart());
this.add(new CommandServerStop());
this.add(new CommandServerRestart());
this.add(new CommandServerBrowse());
this.add(new CommandServerLogView());
this.add(new CommandDatabaseList("lsd"));
this.add(new CommandAddonsList("lsa"));
this.add(new CommandAddonsUpdateList("ual"));
Expand Down
7 changes: 5 additions & 2 deletions subpackages/cli/source/odood/cli/commands/addons.d
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module odood.cli.commands.addons;

private import std.stdio;
private import std.stdio: writeln, File;
private import std.logger;
private import std.format: format;
private import std.exception: enforce, basicExceptionCtors;
private import std.algorithm;
private import std.conv: to;
private import std.string: capitalize, strip, join;
private import std.regex;
private import std.array;
private import std.array: array;

private import thepath: Path;
private import commandr: Argument, Option, Flag, ProgramArgs;
Expand Down Expand Up @@ -215,6 +215,9 @@ class CommandAddonsList: OdoodCommand {
case "name":
row ~= [addon.manifest.name];
break;
case "summary":
row ~= [addon.manifest.summary];
break;
case "version":
row ~= [addon.manifest.module_version.toString];
break;
Expand Down
Loading

0 comments on commit a393101

Please sign in to comment.