All Projects → smarie → python-pyfields

smarie / python-pyfields

Licence: BSD-3-Clause license
Define fields in python classes. Easily.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-pyfields

Object Oriented Programming Using Python
Python is a multi-paradigm programming language. Meaning, it supports different programming approach. One of the popular approach to solve a programming problem is by creating objects. This is known as Object-Oriented Programming (OOP).
Stars: ✭ 183 (+369.23%)
Mutual labels:  object, oop, class
python-autoclass
A python 3 library providing functions and decorators to automatically generate class code, such as constructor body or properties getters/setters along with optional support of validation contracts on the generated setters. Its objective is to reduce the amount of copy/paste code in your classes - and hence to help reducing human mistakes :).
Stars: ✭ 30 (-23.08%)
Mutual labels:  class, attribute, attr
LMPHP
Multi-language management and support on the site.
Stars: ✭ 19 (-51.28%)
Mutual labels:  oop, class
BashClass
BashClass is an Object Oriented Programming language that compiles to BASH 4.4
Stars: ✭ 40 (+2.56%)
Mutual labels:  oop, class
Stampit
OOP is better with stamps: Composable object factories.
Stars: ✭ 3,021 (+7646.15%)
Mutual labels:  oop, class
Python And Oop
Object-Oriented Programming concepts in Python
Stars: ✭ 123 (+215.38%)
Mutual labels:  oop, class
Cohesion
A tool for measuring Python class cohesion.
Stars: ✭ 129 (+230.77%)
Mutual labels:  oop, class
Ngx Dynamic Form Builder
FormBuilder + class-transformer + class-validator = dynamic form group builder for Angular10+
Stars: ✭ 93 (+138.46%)
Mutual labels:  object, class
python-yamlable
A thin wrapper of PyYaml to convert Python objects to YAML and back
Stars: ✭ 28 (-28.21%)
Mutual labels:  object, oop
DTE
Generate C# class from database table
Stars: ✭ 26 (-33.33%)
Mutual labels:  object, class
php-helpers
An extensive set of PHP helper functions and classes.
Stars: ✭ 27 (-30.77%)
Mutual labels:  object, class
js-class-is
Enhances a JavaScript class by adding an is<Class> property to compare types between realms.
Stars: ✭ 17 (-56.41%)
Mutual labels:  class
Java-Programs
Java Practiced Problems including concepts of OOPS, Interface, String , Collection.
Stars: ✭ 51 (+30.77%)
Mutual labels:  oop
DataTypes
Built-in data types
Stars: ✭ 34 (-12.82%)
Mutual labels:  object
SmartReplace
Unity plug-in for replacing scene objects while keeping their references.
Stars: ✭ 50 (+28.21%)
Mutual labels:  object
lovelace-attribute-entity-row
Show attribute(s) on entity rows in Home Assistant's Lovelace UI
Stars: ✭ 21 (-46.15%)
Mutual labels:  attribute
timeline
Timeline - A photo organizer
Stars: ✭ 39 (+0%)
Mutual labels:  object
BeFoR64
BeFoR64, Base64 encoding/decoding library for FoRtran poor men
Stars: ✭ 17 (-56.41%)
Mutual labels:  oop
nstate
A simple but powerful react state management library with low mind burden
Stars: ✭ 11 (-71.79%)
Mutual labels:  class
DenseDescriptorLearning-Pytorch
Official Repo for the paper "Extremely Dense Point Correspondences using a Learned Feature Descriptor" (CVPR 2020)
Stars: ✭ 66 (+69.23%)
Mutual labels:  descriptor

python-pyfields

Define fields in python classes. Easily.

Python versions Build Status Tests Status Coverage Status codecov Flake8 Status

Documentation PyPI Downloads Downloads per week GitHub stars

This is the readme for developers. The documentation for users is available here: https://smarie.github.io/python-pyfields/

Want to contribute ?

Contributions are welcome ! Simply fork this project on github, commit your contributions, and create pull requests.

Here is a non-exhaustive list of interesting open topics: https://github.com/smarie/python-pyfields/issues

nox setup

This project uses nox to define all lifecycle tasks. In order to be able to run those tasks, you should create python 3.7 environment and install the requirements:

>>> conda create -n noxenv python="3.7"
>>> activate noxenv
(noxenv) >>> pip install -r noxfile-requirements.txt

You should then be able to list all available tasks using:

>>> nox --list
Sessions defined in <path>\noxfile.py:

* tests-2.7 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.5 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.6 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.8 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.7 -> Run the test suite, including test reports generation and coverage reports.
- docs-3.7 -> Generates the doc and serves it on a local http server. Pass '-- build' to build statically instead.
- publish-3.7 -> Deploy the docs+reports on github pages. Note: this rebuilds the docs
- release-3.7 -> Create a release on github corresponding to the latest tag

Running the tests and generating the reports

This project uses pytest so running pytest at the root folder will execute all tests on current environment. However it is a bit cumbersome to manage all requirements by hand ; it is easier to use nox to run pytest on all supported python environments with the correct package requirements:

nox

Tests and coverage reports are automatically generated under ./docs/reports for one of the sessions (tests-3.7).

If you wish to execute tests on a specific environment, use explicit session names, e.g. nox -s tests-3.6.

Editing the documentation

This project uses mkdocs to generate its documentation page. Therefore building a local copy of the doc page may be done using mkdocs build -f docs/mkdocs.yml. However once again things are easier with nox. You can easily build and serve locally a version of the documentation site using:

>>> nox -s docs
nox > Running session docs-3.7
nox > Creating conda env in .nox\docs-3-7 with python=3.7
nox > [docs] Installing requirements with pip: ['mkdocs-material', 'mkdocs', 'pymdown-extensions', 'pygments']
nox > python -m pip install mkdocs-material mkdocs pymdown-extensions pygments
nox > mkdocs serve -f ./docs/mkdocs.yml
INFO    -  Building documentation...
INFO    -  Cleaning site directory
INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
  - long_description.md
INFO    -  Documentation built in 1.07 seconds
INFO    -  Serving on http://127.0.0.1:8000
INFO    -  Start watching changes
...

While this is running, you can edit the files under ./docs/ and browse the automatically refreshed documentation at the local http://127.0.0.1:8000 page.

Once you are done, simply hit <CTRL+C> to stop the session.

Publishing the documentation (including tests and coverage reports) is done automatically by the continuous integration engine, using the nox -s publish session, this is not needed for local development.

Packaging

This project uses setuptools_scm to synchronise the version number. Therefore the following command should be used for development snapshots as well as official releases: python setup.py sdist bdist_wheel. However this is not generally needed since the continuous integration engine does it automatically for us on git tags. For reference, this is done in the nox -s release session.

Merging pull requests with edits - memo

Ax explained in github ('get commandline instructions'):

git checkout -b <git_name>-<feature_branch> master
git pull https://github.com/<git_name>/python-pyfields.git <feature_branch> --no-commit --ff-only

if the second step does not work, do a normal auto-merge (do not use rebase!):

git pull https://github.com/<git_name>/python-pyfields.git <feature_branch> --no-commit

Finally review the changes, possibly perform some modifications, and commit.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].