Giter Site home page Giter Site logo

batcave's Introduction

BatCave Python Module

A useful collection of tools for writing Python programs.

Developing

Development is best accomplished using virtualenv or virtualenv-wrapper where a virtual environment can be generated:

UNIX: util/new-env.sh
Windows: util\New-Env.ps1

To update the current development environment

UNIX: util/update-env.sh
Windows: util\Update-Env.ps1

Testing

Static Analysis

The static analysis test can be run with

vjer test

Unit Tests

The unit tests can be run with

python -m unittest -v [tests.test_suite[.test_class[.test_case]]]

Building

The build can be run with

vjer build

Publishing a Release

This is the procedure for releasing BatCave

  1. Validate that all issues are "Ready for Release".
  2. Update CHANGELOG.md.
  3. Run the Publish workflow against the Production environment.
  4. Validate the GitHub release and tag.
  5. Validate PyPi was published properly.
  6. Label the issues as res::complete and mark as "Closed".
  7. Close the Milestone.
  8. Update the source in Perforce.
  9. If this was a release branch, merge to master.

batcave's People

Contributors

tardis4500 avatar

Stargazers

 avatar

Watchers

 avatar

batcave's Issues

Replace pipenv

In GitLab by @arisilon on Oct 24, 2019, 14:52

Revert to use of "pip freeze" and "pip install -r requirements.txt" for package management and vitualenvwrapper for virtual environments.

Failure when CI/CD tags release

In GitLab by @arisilon on Oct 24, 2019, 10:04

Traceback (most recent call last):
  File "build.py", line 192, in <module>
    main()
  File "build.py", line 59, in main
    SubParser('delete_release', delete_release, release_args)], default=devbuild).execute()
  File "/builds/arisilon/batcave/batcave/commander.py", line 83, in execute
    return caller(*caller_args)
  File "build.py", line 114, in publish
    publish_to_pypi(args)
  File "build.py", line 132, in publish_to_pypi
    git.run(None, 'tag', f'v{args.release}')
AttributeError: 'Namespace' object has no attribute 'release'

Publish unit test results

In GitLab by @arisilon on Oct 21, 2019, 17:00

The unit test results aren't published in an easily consumable format.

Use new Python 3.8 features

In GitLab by @arisilon on Oct 16, 2019, 13:54

  • walrus operator (:=)
  • function position operator (/)
  • fstr operator (=)
  • shutil.copytree dir_exists_ok option

Fixup pylint unused variables

In GitLab by @arisilon on Nov 7, 2019, 19:42

Prefix them with _unused rather than using the pylint disable syntax.

Attempts to call kubectl fail

In GitLab by @arisilon on Oct 28, 2019, 17:15

Traceback (most recent call last):
  File ".\upgrade_dbs.py", line 152, in <module>
    main()
  File ".\upgrade_dbs.py", line 135, in main
    postgres_pod.dump_all(args.clean)
  File ".\upgrade_dbs.py", line 71, in dump_all
    self.pod.get_file(self.pod_dump_file)
  File "C:\Users\jgs10292\Envs\tenant-api\lib\site-packages\batcave\k8s.py", line 147, in get_file
    self.cp_file('out', source, target_path)
  File "C:\Users\jgs10292\Envs\tenant-api\lib\site-packages\batcave\k8s.py", line 138, in cp_file
    output = self._cluster_obj.kubectl('cp', str(source_path), str(target_path))
  File "C:\Users\jgs10292\Envs\tenant-api\lib\site-packages\batcave\k8s.py", line 90, in kubectl
    return kubectl(None, f'--kubeconfig={self.config}', *args).decode()

Reduce development requirement to Python 3.7

In GitLab by @arisilon on Oct 16, 2019, 13:51

psutil has not been built for Python 3.8 yet which causes an error on install if the developer does not Visual Studio C++ installed.

Install fails on android

In GitLab by @arisilon on Oct 16, 2019, 20:23

ERROR: Could not find a version that satisfies the requirement pywin32==225 (from batcave) (from versions: none)
ERROR: No matching distribution found for pywin32==225 (from batcave)

PyPi README format incorrect

In GitLab by @arisilon on Oct 30, 2019, 13:28

It is still formatting restructured even though the README was changed to markdown. This is a setting in the setup.py. Should probably have a different README for PyPi than what is used for GitLab. The PyPi README should be more user-facing whereas the GitLab one is developer-facing.

add logger attribute to logging module

In GitLab by @arisilon on Nov 5, 2019, 16:48

Need to create a .logger attribute to execute the underlying logging.getLogger() since using Logger() calls init which resets the logging level to INFO.

Need better k8s job control

In GitLab by @arisilon on Oct 29, 2019, 15:10

When creating a job the default should be to wait until the job starts. It should also be possible to wait for the job to finish or get the status without having to refresh the job.

Fix Enums

In GitLab by @arisilon on Nov 21, 2019, 21:13

The names should be written like Classes and the name in the constructor should match the name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.