Utility code to perform QAG and SV analysis
Project description
Utility code to be used in the WEAVE-QAG/SV environment
This package is called wl-utilities
on PyPI and can be installed with pip install wl-utilities
and then imported with import wl_utilities
This package is a collaborative effort and will comprise the scientific code that allows the QAG tests and SV to run. wl_utilities
will be a dependency of those projects. wl_utilities
should not use weaveio
or qag
packages.
Please see setup for setting up github
Workflow
There will be 2 branches in use on this repository:
main
- where the production-ready version exists and which is uploaded automatically to PyPI for use by everyone.develop
- where changes and merges all take place before merging into themain
branch
You will likely have 2 versions of this code:
- from PyPI (with
pip install
). This will be the version you should use when running science tests in production - from your own development repo. This will be your test and development version which must be separate from everything else
setup
To setup git to deal with collaboration here
- On github click
Fork
. This creates a copy ofwl_utilities
for you to work on (WARNING: make sure your repo is called "wl_utilities" and not "utilities") - Check that your machine can use ssh key authentication with github
- On the pc where you develop QAG tests,
cd
somewhere for development on thiswl_utiltities
repository. There is no need to create awl_utilities
directory. - git clone
git@github.com:YOURUSERNAME/wl-utilities.git
(the link can be found under the greencode
button on your github page) cd wl_utilities
on your local machine.git remote add upstream git@github.com:WEAVE-LOFAR/wl-utilities.git
git fetch --all
pip install -r requirements.txt --user && pip install -r dev-requirements.txt --user && pre-commit install --hook-type pre-commit --hook-type pre-push
To add/modify this repository with your own changes and improvements please
- Pull the latest updates:
git fetch --all && git checkout main && git pull && git merge upstream/main
- Create a new branch for your changes to live on:
git checkout -b my-very-clever-edit
- Make your changes on this branch, committing as you go.
- Update
requirements.txt
andmanifest.IN
with your python package requirements and ancillary files that you used. For example, you would need to include the list of sky lines (writesky_lines.csv
tomanifest.IN
and you would need to addastroquery == version.number
torequirements.txt
if you use that package). - View what has happened:
git status
- Add your changes to be commited:
git add <file1> <file2> ...
- View what has changed:
git status
- Save your changes:
git commit -m "description of changes"
- Push changes to your fork only:
git push
- Open a pull request on this github page, referencing
myusername/my-very-clever-edit -> weave-lofar/develop
All changes therefore end up in the develop
branch of the weave-lofar shared repo.
All pull requests will be reviewed before merging, so we can limit mistakes.
Structure
The structure of this package will be:
wl_utilities/
misc/ # for random short but useful snippets
spectrum/ # for anything that processes spectra
e.g. cross-correlation.py
e.g. reduction.py
stats/ # for anything that looks like a statistical test
e.g. zscores.py
We will not use separate folders for individual's code since the objective is to put them together and not repeat.
Rules:
- This repo will be autoformatted according to
black
on server-side - No change is merged with the
main
branch until approved by "enough" people - Keep the code as modular as possible
Project details
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 wl_utilities-2022.0.1.tar.gz
.
File metadata
- Download URL: wl_utilities-2022.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50cb5e52baca9581fc2c39bc0e3887d25c452f26f3d776eac7892d1e8a74c2e0 |
|
MD5 | 86b438fbe8ff8bd97888eb57a16647e3 |
|
BLAKE2b-256 | 40587ee7c6bdbe735a5abc68f317d96253037e7884bf86492fa59acd22178786 |
File details
Details for the file wl_utilities-2022.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: wl_utilities-2022.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a89b90c8e4492b8f7b0b47b7a47878844f17f198abc45bf4c220d4eba74bd1db |
|
MD5 | f536e5cec2e7ea077832baea3276e6ec |
|
BLAKE2b-256 | cbfb9839c13913b66d267a9d3dfee0d751d68e6b2f3aa712a3ce0c8aa34cda53 |