Skip to content

Commit

Permalink
Merge 048fbc2 into 0f4efd4
Browse files Browse the repository at this point in the history
  • Loading branch information
0golovatyi committed Apr 23, 2019
2 parents 0f4efd4 + 048fbc2 commit a1d0e28
Show file tree
Hide file tree
Showing 30 changed files with 582 additions and 302 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ install:
- pip install coveralls
- npm install -g markdownlint-cli
script:
- pytest tabpy-server/server_tests/ --cov=tabpy-server/tabpy_server
- pytest tabpy-tools/tools_tests/ --cov=tabpy-tools/tabpy_tools --cov-append
- export PYTHONPATH=./tabpy-server:./tabpy-tools:$PYTHONPATH
- pytest tests/unit --cov=tabpy-server/tabpy_server --cov=tabpy-tools/tabpy_tools --cov-append
- pytest tests/integration
- markdownlint .
after_success:
- coveralls
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: General",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal",
"env": {"${PYTHONTPATH}": "${PYTHONPATH};${workspaceRoot}/tabpy-server;${workspaceRoot}/tabpy-tools"}
}
]
}
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
},
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.enabled": true
"python.linting.enabled": true,
"python.unitTest.autoTestDiscoverOnSaveEnabled": true,
"python.unitTest.pyTestArgs": [
"tests"
],
"python.unitTest.unittestEnabled": false,
"python.unitTest.nosetestsEnabled": false,
"python.unitTest.pyTestEnabled": true
}
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Added request context logging as a feature controlled with
TABPY_LOG_DETAILS configuration setting.
- Updated documentation for /info method
- Added integration tests

## v0.4

Expand Down
52 changes: 35 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

- [Environment Setup](#environment-setup)
- [Prerequisites](#prerequisites)
- [Windows Specific Steps](#windows-specific-steps)
- [Linux and Mac Specific Steps](#linux-and-mac-specific-steps)
- [Cloning TabPy Repository](#cloning-tabpy-repository)
- [Setting Up Environment](#setting-up-environment)
- [Unit Tests](#unit-tests)
- [Code Coverage](#code-coverage)
- [TabPy in Pythong Virtual Environment](#tabpy-in-pythong-virtual-environment)
- [Documentation Updates](#documentation-updates)
- [TabPy with Swagger](#tabpy-with-swagger)
- [Code styling](#code-styling)
Expand All @@ -30,10 +33,10 @@ be able to work on TabPy changes:
- Create a new branch for your changes.
- When changes are ready push them on github and create merge request.

## Windows Specific Steps
## Cloning TabPy Repository

1. Open a windows command prompt.
2. In the command prompt, navigate to the folder in which you would like to save
1. Open your OS shell.
2. Navigate to the folder in which you would like to save
your local TabPy repository.
3. In the command prompt, enter the following commands:

Expand All @@ -42,36 +45,51 @@ be able to work on TabPy changes:
cd TabPy
```

To start a local TabPy instance:
## Setting Up Environment

Before making any code changes run environment setup script. For
Windows the next command from the repository root folder:

```sh
startup.cmd
utils\set_env.cmd
```

To run the unit test suite:
and for Linux or Mac the next command from the repository root folder:

```sh
python tests\runtests.py
utils/set_env.sh
```

Alternatively you can run unit tests to collect code coverage data. First
install `pytest`:
## Unit Tests

TabPy has test suites for `tabpy-server` and `tabpy-tools` components.
To run the unit test use `pytest` which you may need to install first
(see [https://docs.pytest.org](https://docs.pytest.org) for details):

```sh
pip install pytest
pytest tests/unit
```

And then run `pytest` either for server or tools test, or even combined:
Check `pytest` documentation for how to run individual tests or set of tests.

## Integration Tests

...

## Code Coverage

You can run unit tests to collect code coverage data. To do so run `pytest`
either for server or tools test, or even combined:

```sh
pytest tabpy-server/server_tests/ --cov=tabpy-server/tabpy_server
pytest tabpy-tools/tools_tests/ --cov=tabpy-tools/tabpy_tools --cov-append
pytest tests --cov=tabpy-server/tabpy_server --cov=tabpy-tools/tabpy_tools --cov-append
```

## Linux and Mac Specific Steps
## TabPy in Pythong Virtual Environment

If you have downloaded Tabpy and would like to manually install Tabpy Server
not using pip then follow the steps below [to run TabPy in Python virtual environment](docs/tabpy-virtualenv.md).
not using pip then follow the steps below
[to run TabPy in Python virtual environment](docs/tabpy-virtualenv.md).

## Documentation Updates

Expand Down

0 comments on commit a1d0e28

Please sign in to comment.