SFERA Institute's Python codebase.
Project description
SFERA
This is a repository of all the open-source Python code from SFERA Institute. It's a pretty eclectic collection — from simple utilities, like alternative datetime and dictionary objects, to platforms that handle databases and webservers.
It's also a work in progress: we're adding (and changing) code, tests and documentation all the time, so stay tuned!
Installation
$ pip install sfera
Usage
>>> import sfera
>>> sfera.version
'0.1.0'
Development
Project Setup
We use a clean image of the latest Ubuntu distribution (currently 24.04). The easiest way to get it is to install VirtualBox and Vagrant, and run the following command in the project's root directory:
$ vagrant up
...
$ vagrant ssh
...
vagrant@ubuntu-focal64$
This creates a virtual machine, whose /app
directory is mapped to the project's root directory, and connects to
it via SSH. This way, you can keep working on your favorite operating system and using your favorite text editor,
and only use the virtual machine when you need to run tests or deploy the code.
Now, run the installation script, which will download pyenv, install the latest Python version and configure the working environment:
vagrant@ubuntu-focal64$ ./install.sh
...
vagrant@ubuntu-focal64$ . ~/.bashrc # reload your profile
/app$
Last but not least — update your .pypirc
, and set the password to a token that will let you publish the package
to PyPI; and complete gh auth
to log in with GitHub's CLI.
Project Management
Now, you can use the manage.py
script to list, add and remove dependencies; run the tests and coverage; preview
the documentation; submit a pull request and publish a version to GitHub and PyPI:
/app$ ./manage.py dep add flask
...
/app$ ./manage.py dep ls
flask
/app$ ./manage.py dep rm flask
...
/app$ ./manage.py dep ls
# Nothing!
/app$ ./manage.py test
...
/app$ ./manage.py test --coverage
... # See on localhost:8000
/app$ ./manage.py docs
... # See on localhost:8000
/app$ git checkout -b fix
/app$ # Edit stuff.
/app$ git add -a
/app$ git commit -m 'edited stuff'
/app$ ./manage.py submit
# Review, amend, and merge the pull request to the main branch.
/app$ git checkout main
/app$ git pull origin main
/app$ ./manage.py publish
publish version 0.1.0? [y/N] y
... # Creates a tag and uploads source and wheel distributions to PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sfera-1.0.0.tar.gz
.
File metadata
- Download URL: sfera-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b214d3d9ea2ae7ac368dbebd679b4eba423adf6e18888dba864912870ea8ffc4 |
|
MD5 | cd454c1445327805f89dbac7534b2ca2 |
|
BLAKE2b-256 | 8fba620717a23139bd4a436902eea3b77915f3622f8655e6b5e7f5f085395751 |
File details
Details for the file sfera-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: sfera-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6e23112fbe1d2112aa6da647c964648e4cd3af5df953b61c61f96ea4f9b8098 |
|
MD5 | 8018a87587b8367ffb6a8fbe4e69ced5 |
|
BLAKE2b-256 | a7ffdd42cf870b8572170b826ef88c64fffae396c215c70e0ce3d933f8ddd8ee |