Contributors
Last updated
Was this helpful?
Last updated
Was this helpful?
Refer to
Comments: Add comments to make the code readable. NB: Elaborate!
Use PEP-8 to guide you in writing beautiful code. Read and apply the PyCharm tips found here:
Use Google style docstrings to enhance readability. In PyCharm: Settings-> Integrated Tools -> Docstring format: Google
Create a serializable training pipeline by deriving the objects from pydantic.BaseModel
or pydantic.dataclasses.dataclass
. Add them to the job settings to ensure parameters are available on the platform.
When building new features to the code base, use the JIRA task to create a new feature branch.
Then follow the guidelines:
ISSUE_KEY #comment <comment_string> Example
JRA-34 #comment corrected indent issue
Create pull request
Have a reviewer approve the pull request
test that documentation works after the merge:
merge fast-forward into master
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format
The code documentation See and edit the python package documentation by installing pdoc3 and using this command, from your main source directory and listing the paths to the modules you want to document pdoc --http :8888 core/brevettiai telescope
If you want to develop features on the brevettiai library follow these steps:
Alternatives:
Install the package directly with pip from the source files
add the repository directory to PYTHONPATH
add the code repositories to source directories in e.g. PyCharm
Python poetry: https://python-poetry.org/docs/master/#installing-with-the-official-installer
Pull the sources from the repository git clone git@bitbucket.org:criterionai/core.git
Create folder for your code and navigate to it
Add the following content to the pyproject.toml file, alternatively use poetry init to generate it:Update the path of the brevettiai package if your project folder is not adjacent to the core repository.
Install additional dependencies / development dependencies with poetry add ...
Run your virtual environment poetry run or poetry shell
The Bitbucket pipeline for the core repository now builds and uploads the library to PyPi.
For the deployment step you must be aware of the following three things:
Once a version exists on PyPi it cannot be removed. Please test the code well beforehand
When updating dependencies run poetry update
find new versions and then commit the poetry.lock
to apply the changes to the build on the pipeline. poetry update
can also get a package name if you are only looking to change one package version
test that documentation works:
Manage the release number, following :
Only one version may exist with the same version number poetry version
can help you manage updates.