Skip to content
Snippets Groups Projects
Verified Commit da86f38e authored by Daniel Hornung's avatar Daniel Hornung
Browse files

Initial commit: Copied files, still a lot of bogus content.

parents
No related branches found
No related tags found
No related merge requests found
# General
build/
include/libcaosdbConfig.h
# CMake
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
*ConfigVersion.cmake
# C
## Prerequisites
*.d
## Object files
*.o
*.ko
*.obj
*.elf
## Linker output
*.ilk
*.map
*.exp
## Precompiled Headers
*.gch
*.pch
## Libraries
*.lib
*.a
*.la
*.lo
## Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
## Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
## Debug files
*.dSYM/
*.su
*.idb
*.pdb
## Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
# VIM
## Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
## Session
Session.vim
Sessionx.vim
## Temporary
.netrwhist
*~
## Auto-generated tag files
tags
## Persistent undo
[._]*.un~
# Emacs
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
## Org-mode
.org-id-locations
*_archive
## flymake-mode
*_flymake.*
## eshell files
/eshell/history
/eshell/lastdir
## elpa packages
/elpa/
## reftex files
*.rel
## AUCTeX auto folder
/auto/
## cask packages
.cask/
dist/
## Flycheck
flycheck_*.el
## server auth directory
/server/
## projectiles files
.projectile
## directory configuration
.dir-locals.el
## network security
/network-security.data
# Python/Sphinx
env/
# Changelog #
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ##
### Added ###
### Changed ###
### Deprecated ###
### Removed ###
### Fixed ###
### Security ###
## [0.0.1] - 2021-XX-XX ##
### Added ###
- Everything.
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at **t.fitschen (AT) indiscale.com**,
**d.hornung (AT) indiscale.com**, **a.schlemmer (AT) indiscale.com**, or
**h.tomwoerden (AT) indiscale.com**. All complaints will be
reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
# Dependencies for caosdb-octavelib #
* caosdb-cpplib
* octave >= 4.4
* liboctave-dev ?
# Active Contributors
* Daniel Hornung <d.hornung@indiscale.com>
This diff is collapsed.
Makefile 0 → 100644
# ** header v3.0
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
# Copyright (C) 2021 Daniel Hornung <d.hornung@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ** end header
# This Makefile is a wrapper for several other scripts.
.PHONY: help
help:
@echo 'Type `make doc` for documentation, or `make install` for (local) installation.'
.PHONY: doc
doc:
$(MAKE) -C src/doc html
# README
## Welcome
This is the **CaosDB Octave Client Library** repository and a part of the
CaosDB project.
## Setup
Please read the [README_SETUP.md](README_SETUP.md) for instructions on how to
setup this code.
## Further Reading
Please refer to the [official documentation](https://docs.indiscale.com/caosdb-octavelib/) for more information.
## Contributing
Thank you very much to all contributers — past, present, and prospective ones.
### Code of Conduct
By participating, you are expected to uphold our [Code of Conduct](https://gitlab.com/caosdb/caosdb-octavelib/-/blob/dev/CODE_OF_CONDUCT.md).
### How to Contribute
* You found a bug, have a question, or want to request a feature? Please
[create an issue](https://gitlab.com/caosdb/caosdb-octavelib/-/issues).
* You want to contribute code? Please fork the repository and create a merge
request in GitLab and choose this repository as target. Make sure to select
"Allow commits from members who can merge the target branch" under Contribution
when creating the merge request. This allows our team to work with you on your request.
- If you have a suggestion for the [documentation](https://docs.indiscale.com/caosdb-octavelib/),
the preferred way is also a merge request as describe above (the documentation resides in `src/doc`).
However, you can also create an issue for it.
- You can also contact us at **info (AT) caosdb.de** and join the
CaosDB community on
[#caosdb:matrix.org](https://matrix.to/#/!unwwlTfOznjEnMMXxf:matrix.org).
## License
* Copyright (C) 2021 Indiscale GmbH <info@indiscale.com>
All files in this repository are licensed under the [GNU Affero General Public
License](LICENCE.md) (version 3 or later).
# Getting started with CaosDB for Octave #
## Installation ##
### Requirements ###
Of course you need Octave or Matlab, this version was developed with Octave 4.4. Additionally, the
following packages are required:
<!-- (they will typically be installed automatically): -->
- <!-- `lxml` -->
<!-- - `PyYaml` -->
<!-- - `PySocks` -->
### How to install ###
#### Linux ####
Make sure that Python (at least version 3.6) and pip is installed, using your system tools and
documentation.
Then open a terminal and continue in the [Generic installation](#generic-installation) section.
#### Windows ####
If a Python distribution is not yet installed, we recommend Anaconda Python, which you can download
for free from [https://www.anaconda.com](https://www.anaconda.com). The "Anaconda Individual Edition" provides most of all
packages you will ever need out of the box. If you prefer, you may also install the leaner
"Miniconda" installer, which allows you to install packages as you need them.
After installation, open an Anaconda prompt from the Windows menu and continue in the [Generic
installation](#generic-installation) section.
#### iOS ####
If there is no Python 3 installed yet, there are two main ways to obtain it: Either get the binary
package from [python.org](https://www.python.org/downloads/) or, for advanced users, install via [Homebrew](https://brew.sh/). After installation
from python.org, it is recommended to also update the TLS certificates for Python (this requires
administrator rights for your user):
```sh
# Replace this with your Python version number:
cd /Applications/Python\ 3.9/
# This needs administrator rights:
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 .
```
## Configuration ##
The configuration is done using `ini` configuration files.
PyCaosDB tries to read from the inifile specified in the environment variable `PYCAOSDBINI` or
alternatively in `~/.pycaosdb.ini` upon import. After that, the ini file `pycaosdb.ini` in the
current working directory will be read additionally, if it exists.
Here, we will look at the most common configuration options. For a full and
comprehensive description please check out
[pycaosdb.ini file](https://gitlab.com/caosdb/caosdb-pylib/-/blob/main/examples/pycaosdb.ini)
You can download this file and use it as a starting point.
Typically, you need to change at least the `url` and `username` fields as required.
(Ask your CaosDB administrator or IT crowd if
you do not know what to put there, but for the demo instances https://demo.indiscale.com, `username=admin`
and `password=caosdb` should work).
### Authentication ###
The default configuration (that your are asked for your password when ever a connection is created
can be changed by setting `password_method`:
* with `password_method=input` password (and possibly user) will be queried on demand (**default**)
* use the password manager [pass](https://www.passwordstore.org) by using `pass` as value, see also the [ArchWiki
entry](https://wiki.archlinux.org/index.php/Pass#Basic_usage). This also requires `password_identifier` which refers to the identifier within pass
for the desired password.
* install the python package [keyring](https://pypi.org/project/keyring), to use the system keyring/wallet (macOS, GNOME, KDE,
Windows). The password will be queried on first usage.
* with `password_method=plain` (**strongly discouraged**)
The following illustrates the recommended options:
```ini
[Connection]
# using "pass" password manager
#password_method=pass
#password_identifier=...
# using the system keyring/wallet (macOS, GNOME, KDE, Windows)
#password_method=keyring
```
### SSL Certificate ###
In some cases (especially if you are testing CaosDB) you might need to supply
an SSL certificate to allow SSL encryption.
```ini
[Connection]
cacert=/path/to/caosdb.ca.pem
```
### Further Settings ###
As mentioned above, a complete list of options can be found in the
[pycaosdb.ini file](https://gitlab.com/caosdb/caosdb-pylib/-/blob/main/examples/pycaosdb.ini) in
the examples folder of the source code.
## Try it out ##
Start Python and check whether the you can access the database. (You will be asked for the
password):
```python
In [1]: import caosdb as db
In [2]: db.Info()
Please enter the password: # It's `caosdb` for the demo server.
Out[2]: Connection to CaosDB with 501 Records.
```
Note: This setup will ask you for your password whenever a new connection is created. If you do not
like this, check out the "Authentication" section in the [configuration documentation](configuration.md).
Now would be a good time to continue with the [tutorials](tutorials/index).
## Run Unit Tests
tox
## Code Formatting
autopep8 -i -r ./
## Documentation ##
Build documentation in `build/` with `make doc`.
### Requirements ###
- `sphinx`
- `sphinx-autoapi`
- `recommonmark`
### Troubleshooting ###
If the client is to be executed directly from the `/src` folder, an initial `.\setup.py install --user` must be called.
# Release Guidelines for the CaosDB Python Client Library
This document specifies release guidelines in addition to the general release
guidelines of the CaosDB Project
([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md))
## General Prerequisites
* All tests are passing.
* CHANGELOG.md is up-to-date.
* DEPENDENCIES.md is up-to-date.
## Steps
1. Create a release branch from the dev branch. This prevents further changes
to the code base and a never ending release process. Naming: `release-<VERSION>`
2. Update CHANGELOG.md
3. Check all general prerequisites.
4. Merge the release branch into the main branch.
5. Tag the latest commit of the main branch with `v<VERSION>`.
6. Delete the release branch.
7. Merge the main branch back into the dev branch.
8. After the merge of main to dev, start a new development version by increasing at least the
`MICRO` version.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment