Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.8%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: RachelAlcraft
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 812 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 14
Created almost 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

app-lib-py

Hosted at: streamlit:app-lib-py

This template is a suggestion of good practice for a scientific python library that includes continuous integration and conntinuous development and continuous documentation. The application is demonstrated though streamlist which is deployed with continuous deployment, and also made a available via pypi as a python library with pip install

The single github repo contains 2 seperate software artefacts, a python library that can be installed and used by others, and a streamlit web application that demonstreates the library and provides a simple usage. Additionally there is a docker file which allows the upload of a docker image to dockerhub for a middle use of locally hosted web application.

To use this library yourself, use the "Template" button as described below.

1. Create a template for yourself

The template can be downloaded from github at app-lib-py. Once using the template and giving your own name and repo, you will need to make some changes to the files.

2. Change the default name

Primarily do this by searching on app-lib-py and applibpy, don't forget there is a directory to change too. Examples of changes are: - in the yml files (/.github/workflows/) in pydoctor line 24 - docker yml line 26 - pypi's publish.yml line 43

2. Setup development environments

See dev environments

3. Setup precommit hooks

https://pre-commit.com/ Run it to check pre-commit run --all-files ruff --target-version=py311 --line-length 88 . --fix black ./ --check --line-length 88 --diff

4. PyDoctor automatic documentaion

The documentation is generated with the workflow pydoctor.yml. The branch gh-pages will be created after your first commit to main, and will fail the first time.

The branch gh-pages will be created after your first commit to main, and will fail the first time, so re-run the action from github actions on your github after you have done your first commit.

The pydoctor command does not need to be run locally (installing if you want to, and add the created files to .gitignore: pydoctor --make-html --html-output=./docs/api lib/src/app_lib_py --theme readthedocs Permissions need to be added so that the action has the appropriate permissions to be run. In repo/settings/Actions at the bottom give Read and Write permissions to Workflow and Allow github to create and approve pull requests.

Then re-run the failed action. This should create the branch gh-actions.

Now in order to activate it you must go to your github settings/pages and choose deply from a branch, and then gh-pages and root. An action will be triggered automatically to build the pages, with the link at: https://rachelalcraft.github.io/your-repo/

For pydoctor, you need the setting Actions/General/Allow GitHib Actions to create and approve pull requests checked. Turn on gh-pages in the settings to be published from the branch gh-pages.

5. Test driven development, design the functionality

Write the tests in science, speed and utility before you write the functional implementation.

6. Implement

The src/applibpy directory is the place to write the functional code for the library. This will become available on pypi as a pip install.

7. Distribute and deploy

The github actions automate the distribtion to pypi, test running, and docker. If you choose to distribute on streamlit this will be automated by checkin to main.

7a. Pypi

Tokens are needed from pypi and from github. You create a token in pypi, and then add it in github/secrets and variables/Actions with the name PYPIAPITOKEN. Follow these instructions: pypi gha token

You will need to create a 0.01 or some such release to get the workflow going and test it. To release to pypi you need to either: - Create a release in github, the tag will be the version number of the library - Or if it is only a minor incremebt, you can run the workflow in Actions Create a new patch release. This will increment the minor version and release.

7b. Streamlit

Streamlit will be automatically deployed when the main branch is updated after the link with streamlit is made. 1. Create an account with streamlit io 2. Go to the deploy 3. Choose your repo: RachelAlcraft/app-lib-py 4. Choose Branch: Main 5. Choose entry file: app/home.py 6. Amend the domain to your liking app-lib-py 7. Press deploy

7c. Docker

The application can also be added to docker for self hosting. API tokens need to be added. 1. First create an api token in docker/My Account/Security/Access Tokens 2. In github/Settings/Secrets and Variables/Actions - add the copied token as a secret with the name DOCKERHUBTOKEN - add your docker user name with the name DOCKERHUBUSERNAME

Owner

  • Name: Rachel A
  • Login: RachelAlcraft
  • Kind: user
  • Location: London

Citation (citation.cff)

cff-version: 0.1.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Alcraft"
  given-names: "Rachel"
  orcid: "https://orcid.org/0000-0003-2674-6321"
title: "APP-LIB-PY: A template for scientific python development
version: 1.0.0
doi: xxx
date-released: 01-May-2024
url: "https://github.com/RachelAlcraft/app-lib-py"

GitHub Events

Total
Last Year

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 70 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 6
  • Total maintainers: 1
pypi.org: app-lib-py

Example library for scientific software.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 70 Last month
Rankings
Dependent packages count: 9.6%
Average: 36.4%
Dependent repos count: 63.2%
Maintainers (1)
Last synced: 7 months ago
pypi.org: app-lib-py-rachelalcraft

Example library for scientific software.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.6%
Forks count: 33.1%
Average: 37.2%
Stargazers count: 42.8%
Dependent repos count: 63.3%
Maintainers (1)
Last synced: over 1 year ago