Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
b590249b
Commit
b590249b
authored
4 months ago
by
I. Nüske
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-test-requirements' into 'dev'
WIP: Modernizing setup. See merge request
!163
parents
6a9d6561
c1dd2b8b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!175
BUG: Request responses without the "Set-Cookie" header no longer overwrite the...
,
!163
WIP: Modernizing setup.
Pipeline
#58527
passed
3 months ago
Stage: setup
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
2
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
README_SETUP.md
+34
-47
34 additions, 47 deletions
README_SETUP.md
with
36 additions
and
47 deletions
CHANGELOG.md
+
2
−
0
View file @
b590249b
...
...
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ###
*
New setup extra
`test`
which installs the dependencies for testing.
### Changed ###
### Deprecated ###
...
...
This diff is collapsed.
Click to expand it.
README_SETUP.md
+
34
−
47
View file @
b590249b
...
...
@@ -2,20 +2,40 @@
## Installation ##
###
Requirements
###
###
How to install
###
PyCaosDB needs
at least
Pyth
on 3.8
. Additionally, the following packages are require
d
(
th
ey will
t
ypically be installed automatically):
First ensure that python with
at least
versi
on 3.8
is installed. Shoul
d th
is not be
t
he case, you can use the
[
Installing python
](
#installing-python-
)
guide for your OS.
-
`lxml`
-
`PyYaml`
-
`PySocks`
#### Generic installation ####
Optional packages:
-
`keyring`
-
`jsonschema`
To install this LinkAhead python client locally, use
`pip`
/
`pip3`
:
### How to install ###
```
sh
pip
install
linkahead
```
#### Additional dependencies ####
To test using tox, you also need to install tox:
`pip install tox`
To install dependencies used by optional functionality, the following pip extras
keywords are defined:
-
`test`
for testing with pytest
-
`mypy`
for mypy and types
-
`jsonschema`
-
`keyring`
These extras can be installed using:
```
sh
pip
install
.[KEYWORD]
```
A current list of the dependencies installed with this program as well as those installed with
the keywords can be found in
`setup.py`
s
`setup_package()`
method, in the
`metadata`
dictionary
entries
`install_requires`
and
`extras_require`
.
### Installing python ###
#### Linux ####
...
...
@@ -51,34 +71,7 @@ cd /Applications/Python\ 3.9/
sudo
./Install
\
Certificates.command
```
After these steps, you may continue with the
[
Generic
installation
](
#generic-installation
)
.
#### Generic installation ####
To install PyCaosDB locally, use
`pip3`
(also called
`pip`
on some systems):
```
sh
pip3
install
--user
caosdb
```
---
Alternatively, obtain the sources from GitLab and install from there (
`git`
must be installed for
this option):
```
sh
git clone https://gitlab.com/caosdb/caosdb-pylib
cd
caosdb-pylib
pip3
install
--user
.
```
For installation of optional packages, install with an additional option, e.g. for
validating with the caosdb json schema:
```
sh
pip3
install
--user
.[jsonschema]
```
After these steps, you may continue with the
[
Generic installation
](
#generic-installation
)
section.
## Configuration ##
...
...
@@ -87,7 +80,7 @@ is described in detail in the [configuration section of the documentation](https
## Try it out ##
Start Python and check whether
the
you can access the database. (You will be asked for the
Start Python and check whether you can access the database. (You will be asked for the
password):
```
python
...
...
@@ -107,6 +100,7 @@ Now would be a good time to continue with the [tutorials](tutorials/index).
-
Run all tests:
`tox`
or
`make unittest`
-
Run a specific test file: e.g.
`tox -- unittests/test_schema.py`
-
Run a specific test function: e.g.
`tox -- unittests/test_schema.py::test_config_files`
-
To run using pytest:
`pytest .`
## Documentation ##
We use sphinx to create the documentation. Docstrings in the code should comply
...
...
@@ -114,13 +108,6 @@ with the Googly style (see link below).
Build documentation in
`build/`
with
`make doc`
.
### Requirements ###
-
`sphinx`
-
`sphinx-autoapi`
-
`recommonmark`
-
`sphinx_rtd_theme`
### How to contribute ###
-
[
Google Style Python Docstrings
](
https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
)
...
...
@@ -128,7 +115,7 @@ Build documentation in `build/` with `make doc`.
-
[
References to other documentation
](
https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#role-external
)
### Troubleshooting ###
If the client is to be executed directly from the
`/src`
folder, an initial
`.\setup.py install
--user
`
must be called.
If the client is to be executed directly from the
`/src`
folder, an initial
`.\setup.py install`
must be called.
## Migration ##
TODO
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment